From: Rico Tzschichholz Date: Tue, 28 Feb 2017 08:00:24 +0000 (+0100) Subject: vapi: Add libgrss bindings X-Git-Tag: 0.35.7~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ee89e8696393668cb927d0b02d8ea199d30d6e5;p=thirdparty%2Fvala.git vapi: Add libgrss bindings https://bugzilla.gnome.org/show_bug.cgi?id=779318 --- diff --git a/vapi/Makefile.am b/vapi/Makefile.am index 400933c8c..64820a498 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -212,6 +212,8 @@ dist_vapi_DATA = \ libgnome-menu-3.0.vapi \ libgnomeui-2.0.deps \ libgnomeui-2.0.vapi \ + libgrss.deps \ + libgrss.vapi \ libgsf-1.deps \ libgsf-1.vapi \ libgvc.vapi \ @@ -438,6 +440,7 @@ GIR_BINDINGS = \ json-glib-1.0 \ libgdata \ libgnome-menu-3.0 \ + libgrss \ libnotify \ libpeas-1.0 \ libpeas-gtk-1.0 \ @@ -757,6 +760,9 @@ libgnome-menu-3.0: libgnomeui-2.0: $(GENVAPI) --library $(srcdir)/libgnomeui-2.0 $(PACKAGESDIR)/libgnomeui-2.0/libgnomeui-2.0-custom.vala $(PACKAGESDIR)/libgnomeui-2.0/libgnomeui-2.0.gi +libgrss: + $(GENVAPI) --library $(srcdir)/libgrss --metadatadir $(METADATADIR) --pkg gio-2.0 --pkg libsoup-2.4 --pkg libxml-2.0 $(GIRDIR)/Grss-0.7.gir + libgsf-1: $(GENVAPI) --library $(srcdir)/libgsf-1 $(PACKAGESDIR)/libgsf-1/libgsf-1-custom.vala $(PACKAGESDIR)/libgsf-1/libgsf-1.gi diff --git a/vapi/libgrss.deps b/vapi/libgrss.deps new file mode 100644 index 000000000..45c0487c2 --- /dev/null +++ b/vapi/libgrss.deps @@ -0,0 +1,3 @@ +gio-2.0 +libsoup-2.4 +libxml-2.0 diff --git a/vapi/libgrss.vapi b/vapi/libgrss.vapi new file mode 100644 index 000000000..59232cfb8 --- /dev/null +++ b/vapi/libgrss.vapi @@ -0,0 +1,210 @@ +/* libgrss.vapi generated by vapigen, do not modify. */ + +[CCode (cprefix = "Grss", gir_namespace = "Grss", gir_version = "0.7", lower_case_cprefix = "grss_")] +namespace Grss { + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feed_atom_formatter_get_type ()")] + public class FeedAtomFormatter : Grss.FeedFormatter { + [CCode (has_construct_function = false)] + public FeedAtomFormatter (); + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feed_channel_get_type ()")] + public class FeedChannel : GLib.Object { + [CCode (has_construct_function = false)] + public FeedChannel (); + public void add_contributor (Grss.Person contributor); + public void add_cookie (Soup.Cookie cookie); + public bool fetch () throws GLib.Error; + public GLib.List fetch_all () throws GLib.Error; + public async unowned GLib.List fetch_all_async () throws GLib.Error; + public async bool fetch_async () throws GLib.Error; + public bool fetch_cancel (); + [CCode (has_construct_function = false)] + public FeedChannel.from_file (string path) throws GLib.Error; + [CCode (has_construct_function = false)] + public FeedChannel.from_memory (string data) throws GLib.Error; + [CCode (has_construct_function = false)] + public FeedChannel.from_xml ([CCode (type = "xmlDocPtr")] Xml.Doc* doc) throws GLib.Error; + public unowned string get_category (); + public unowned GLib.List get_contributors (); + public GLib.SList get_cookies (); + public unowned string get_copyright (); + public unowned string get_description (); + public Grss.Person get_editor (); + public unowned string get_format (); + public unowned string get_generator (); + public bool get_gzip_compression (); + public unowned string get_homepage (); + public unowned string get_icon (); + public unowned string get_image (); + public unowned string get_language (); + public long get_publish_time (); + public bool get_pubsubhub (string hub); + public bool get_rsscloud (string path, string protocol); + public unowned string get_source (); + public unowned string get_title (); + public int get_update_interval (); + public long get_update_time (); + public unowned string get_webmaster (); + public void set_category (string category); + public void set_copyright (string copyright); + public void set_description (string description); + public void set_editor (Grss.Person editor); + public void set_format (string format); + public void set_generator (string generator); + public void set_gzip_compression (bool value); + public bool set_homepage (string homepage); + public bool set_icon (string icon); + public bool set_image (string image); + public void set_language (string language); + public void set_publish_time (long publish); + public bool set_pubsubhub (string hub); + public void set_rsscloud (string path, string protocol); + public bool set_source (string source); + public void set_title (string title); + public void set_update_interval (int minutes); + public void set_update_time (long update); + public void set_webmaster (string webmaster); + [CCode (has_construct_function = false)] + public FeedChannel.with_source (string source); + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feed_enclosure_get_type ()")] + public class FeedEnclosure : GLib.Object { + [CCode (has_construct_function = false)] + public FeedEnclosure (string url); + public GLib.File fetch () throws GLib.Error; + public async GLib.File fetch_async () throws GLib.Error; + public unowned string get_format (); + public size_t get_length (); + public unowned string get_url (); + public void set_format (string type); + public void set_length (size_t length); + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feed_formatter_get_type ()")] + public abstract class FeedFormatter : GLib.Object { + [CCode (has_construct_function = false)] + protected FeedFormatter (); + public void add_item (Grss.FeedItem item); + public void add_items (GLib.List items); + public virtual string format (); + public unowned Grss.FeedChannel get_channel (); + public unowned GLib.List get_items (); + public void reset (); + public void set_channel (Grss.FeedChannel channel); + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feed_item_get_type ()")] + public class FeedItem : GLib.Object { + [CCode (has_construct_function = false)] + public FeedItem (Grss.FeedChannel parent); + public void add_category (string category); + public void add_contributor (Grss.Person contributor); + public void add_enclosure (Grss.FeedEnclosure enclosure); + public Grss.Person get_author (); + public unowned GLib.List get_categories (); + public unowned string get_comments_url (); + public unowned GLib.List get_contributors (); + public unowned string get_copyright (); + public unowned string get_description (); + public unowned GLib.List get_enclosures (); + public bool get_geo_point (double latitude, double longitude); + public unowned string get_id (); + public unowned Grss.FeedChannel get_parent (); + public long get_publish_time (); + public void get_real_source (string realsource, string title); + public unowned string get_related (); + public unowned string get_source (); + public unowned string get_title (); + public void set_author (Grss.Person author); + public bool set_comments_url (string url); + public void set_copyright (string copyright); + public void set_description (string description); + public void set_geo_point (double latitude, double longitude); + public void set_id (string id); + public void set_publish_time (long publish); + public bool set_real_source (string realsource, string title); + public void set_related (string related); + public bool set_source (string source); + public void set_title (string title); + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feed_parser_get_type ()")] + public class FeedParser : GLib.Object { + [CCode (has_construct_function = false)] + public FeedParser (); + public GLib.List parse (Grss.FeedChannel feed, [CCode (type = "xmlDocPtr")] Xml.Doc* doc) throws GLib.Error; + public void parse_channel (Grss.FeedChannel feed, [CCode (type = "xmlDocPtr")] Xml.Doc* doc) throws GLib.Error; + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feed_rss_formatter_get_type ()")] + public class FeedRssFormatter : Grss.FeedFormatter { + [CCode (has_construct_function = false)] + public FeedRssFormatter (); + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feeds_group_get_type ()")] + public class FeedsGroup : GLib.Object { + [CCode (has_construct_function = false)] + public FeedsGroup (); + public bool export_file (GLib.List channels, string format, string uri) throws GLib.Error; + public GLib.List get_formats (); + public GLib.List parse_file (string path) throws GLib.Error; + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feeds_pool_get_type ()")] + public class FeedsPool : GLib.Object { + [CCode (has_construct_function = false)] + public FeedsPool (); + public GLib.List get_listened (); + public int get_listened_num (); + public unowned Soup.Session get_session (); + public void listen (GLib.List feeds); + public void @switch (bool run); + public signal void feed_fail (GLib.Object feed); + public virtual signal void feed_fetching (GLib.Object feed); + public signal void feed_ready (GLib.Object feed, GLib.List items); + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feeds_publisher_get_type ()")] + public class FeedsPublisher : GLib.Object { + [CCode (has_construct_function = false)] + public FeedsPublisher (); + [Version (deprecated = true, deprecated_since = "0.6")] + public string format_content (Grss.FeedChannel channel, GLib.List items) throws GLib.Error; + public void hub_set_port (int port); + public void hub_set_topics (GLib.List topics); + public void hub_switch (bool run); + public bool publish_file (Grss.FeedChannel channel, GLib.List items, string uri) throws GLib.Error; + public bool publish_web (Grss.FeedChannel channel, GLib.List items, string id) throws GLib.Error; + public virtual signal void delete_subscription (Grss.FeedChannel topic, string callback); + public virtual signal void new_subscription (Grss.FeedChannel topic, string callback); + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feeds_store_get_type ()")] + public abstract class FeedsStore : GLib.Object { + [CCode (has_construct_function = false)] + protected FeedsStore (); + public virtual void add_item_in_channel (Grss.FeedChannel channel, Grss.FeedItem item); + public virtual unowned GLib.List get_channels (); + public virtual unowned GLib.List get_items_by_channel (Grss.FeedChannel channel); + public virtual bool has_item (Grss.FeedChannel channel, string id); + public void @switch (bool run); + } + [CCode (cheader_filename = "libgrss/libgrss.h", type_id = "grss_feeds_subscriber_get_type ()")] + public class FeedsSubscriber : GLib.Object { + [CCode (has_construct_function = false)] + public FeedsSubscriber (); + public unowned GLib.InetAddress get_address (); + public GLib.List get_listened (); + public int get_port (); + public unowned Soup.Session get_session (); + public bool listen (GLib.List feeds); + public void set_port (int port); + public void @switch (bool run); + public virtual signal void notification_received (GLib.Object feed, GLib.Object item); + } + [CCode (cheader_filename = "libgrss/libgrss.h", ref_function = "grss_person_ref", type_id = "grss_person_get_type ()", unref_function = "grss_person_unref")] + [Compact] + [Version (since = "0.7")] + public class Person { + [CCode (has_construct_function = false)] + public Person (string name, string? email, string? uri); + public unowned string get_email (); + public unowned string get_name (); + public unowned string get_uri (); + public unowned Grss.Person @ref (); + public void unref (); + } +} diff --git a/vapi/metadata/Grss-0.7.metadata b/vapi/metadata/Grss-0.7.metadata new file mode 100644 index 000000000..3bfb1b422 --- /dev/null +++ b/vapi/metadata/Grss-0.7.metadata @@ -0,0 +1,9 @@ +* cheader_filename="libgrss/libgrss.h" + +*.ref unowned + +FeedChannel + .new_from_xml.doc type="Xml.Doc*" +FeedParser + .parse.doc type="Xml.Doc*" + .parse_channel.doc type="Xml.Doc*"