On Fri, 2016-02-26 at 19:42 +0100, Peter Hoffmann wrote:
I try to write a Soup.RequestSocket class as described in https://developer.gnome.org/libsoup/stable/libsoup-request-howto.html section "Supported URI types, and adding your own" but could not get it to work as - naturally - the type of the javascript "class" is "object" and not GObject_Object as expected. Is it at all possible to write a Soup.Request-subclass like Soup.RequestFile …HTTP …Data?
In principle, it ought to be possible, using Lang.Class, like other GObject-derived classes. (See https://people.gnome.org/~gcampagna/docs/GObject-2.0/GObject.Class .html ) In practice, you cannot modify the SoupRequestClass->schemes field to set your supported URI schemes. The way to do so would be to add a class method to libsoup of the form soup_request_class_set_schemes (SoupRequestClass *, const gchar **); Until that method exists, I'm afraid you cannot implement a SoupRequest subclass in JS. Cheers, Giovanni
Attachment:
signature.asc
Description: This is a digitally signed message part