|  |  |  | libgrss Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
struct GrssFeedChannel; GrssFeedChannel * grss_feed_channel_new (); GrssFeedChannel * grss_feed_channel_new_with_source (gchar *source); GrssFeedChannel * grss_feed_channel_new_from_file (const gchar *path,GError **error); void grss_feed_channel_set_format (GrssFeedChannel *channel,gchar *format); const gchar * grss_feed_channel_get_format (GrssFeedChannel *channel); void grss_feed_channel_set_source (GrssFeedChannel *channel,gchar *source); const gchar * grss_feed_channel_get_source (GrssFeedChannel *channel); void grss_feed_channel_set_title (GrssFeedChannel *channel,gchar *title); const gchar * grss_feed_channel_get_title (GrssFeedChannel *channel); void grss_feed_channel_set_homepage (GrssFeedChannel *channel,gchar *homepage); const gchar * grss_feed_channel_get_homepage (GrssFeedChannel *channel); void grss_feed_channel_set_description (GrssFeedChannel *channel,gchar *description); const gchar * grss_feed_channel_get_description (GrssFeedChannel *channel); void grss_feed_channel_set_image (GrssFeedChannel *channel,gchar *image); const gchar * grss_feed_channel_get_image (GrssFeedChannel *channel); void grss_feed_channel_set_icon (GrssFeedChannel *channel,gchar *icon); const gchar * grss_feed_channel_get_icon (GrssFeedChannel *channel); void grss_feed_channel_set_language (GrssFeedChannel *channel,gchar *language); const gchar * grss_feed_channel_get_language (GrssFeedChannel *channel); void grss_feed_channel_set_category (GrssFeedChannel *channel,gchar *category); const gchar * grss_feed_channel_get_category (GrssFeedChannel *channel); void grss_feed_channel_set_pubsubhub (GrssFeedChannel *channel,gchar *hub); gboolean grss_feed_channel_get_pubsubhub (GrssFeedChannel *channel,gchar **hub); void grss_feed_channel_set_rsscloud (GrssFeedChannel *channel,gchar *path,gchar *protocol); gboolean grss_feed_channel_get_rsscloud (GrssFeedChannel *channel,gchar **path,gchar **protocol); void grss_feed_channel_set_copyright (GrssFeedChannel *channel,gchar *copyright); const gchar * grss_feed_channel_get_copyright (GrssFeedChannel *channel); void grss_feed_channel_set_editor (GrssFeedChannel *channel,gchar *editor); const gchar * grss_feed_channel_get_editor (GrssFeedChannel *channel); void grss_feed_channel_add_contributor (GrssFeedChannel *channel,gchar *contributor); const GList * grss_feed_channel_get_contributors (GrssFeedChannel *channel); void grss_feed_channel_set_webmaster (GrssFeedChannel *channel,gchar *webmaster); const gchar * grss_feed_channel_get_webmaster (GrssFeedChannel *channel); void grss_feed_channel_set_generator (GrssFeedChannel *channel,gchar *generator); const gchar * grss_feed_channel_get_generator (GrssFeedChannel *channel); void grss_feed_channel_set_publish_time (GrssFeedChannel *channel,time_t publish); time_t grss_feed_channel_get_publish_time (GrssFeedChannel *channel); void grss_feed_channel_set_update_time (GrssFeedChannel *channel,time_t update); time_t grss_feed_channel_get_update_time (GrssFeedChannel *channel); void grss_feed_channel_set_update_interval (GrssFeedChannel *channel,int minutes); int grss_feed_channel_get_update_interval (GrssFeedChannel *channel); gboolean grss_feed_channel_fetch (GrssFeedChannel *channel,GError **error); void grss_feed_channel_fetch_async (GrssFeedChannel *channel,GAsyncReadyCallback callback,gpointer user_data); gboolean grss_feed_channel_fetch_finish (GrssFeedChannel *channel,GAsyncResult *res,GError **error); GList * grss_feed_channel_fetch_all (GrssFeedChannel *channel,GError **error); void grss_feed_channel_fetch_all_async (GrssFeedChannel *channel,GAsyncReadyCallback callback,gpointer user_data); GList * grss_feed_channel_fetch_all_finish (GrssFeedChannel *channel,GAsyncResult *res,GError **error);
GrssFeedChannel rappresents a single feed which may be fetched and parsed. It mostly is a passive container for attributes.
GrssFeedChannel * grss_feed_channel_new ();
Allocates a new GrssFeedChannel.
| Returns : | a GrssFeedChannel. | 
GrssFeedChannel *   grss_feed_channel_new_with_source   (gchar *source);
Allocates a new GrssFeedChannel and assign it the given remote source.
| 
 | URL of the feed. | 
| Returns : | a GrssFeedChannel. | 
GrssFeedChannel * grss_feed_channel_new_from_file (const gchar *path,GError **error);
Allocates a new GrssFeedChannel and init it with contents found in specified file.
| 
 | path of the file to parse. | 
| 
 | if an error occourred, NULLis returned and this is filled with the
message. | 
| Returns : | a GrssFeedChannel, or NULLif the file inpathis not a
valid document. | 
void grss_feed_channel_set_format (GrssFeedChannel *channel,gchar *format);
To assign a file format to the feed.
| 
 | a GrssFeedChannel. | 
| 
 | format of the file, such as "application/atom+xml" or "application/rss+xml". | 
const gchar *       grss_feed_channel_get_format        (GrssFeedChannel *channel);
Retrieves the file format of channel.
| 
 | a GrssFeedChannel. | 
| Returns : | file format of channel. | 
void grss_feed_channel_set_source (GrssFeedChannel *channel,gchar *source);
To assign the URL where to fetch the feed.
| 
 | a GrssFeedChannel. | 
| 
 | URL of the feed. | 
const gchar *       grss_feed_channel_get_source        (GrssFeedChannel *channel);
Retrieves URL where to fetch the channel.
| 
 | a GrssFeedChannel. | 
| Returns : | URL of the channel. | 
void grss_feed_channel_set_title (GrssFeedChannel *channel,gchar *title);
To set a title to the channel.
| 
 | a GrssFeedChannel. | 
| 
 | title of the feed. | 
const gchar *       grss_feed_channel_get_title         (GrssFeedChannel *channel);
Retrieves title of the channel.
| 
 | a GrssFeedChannel. | 
| Returns : | title of the feed, or NULL. | 
void grss_feed_channel_set_homepage (GrssFeedChannel *channel,gchar *homepage);
To set the homepage of the site the channel belongs.
| 
 | a GrssFeedChannel. | 
| 
 | homepage for the main website. | 
const gchar *       grss_feed_channel_get_homepage      (GrssFeedChannel *channel);
Retrieves the homepage of the site for which channel is the feed.
| 
 | a GrssFeedChannel. | 
| Returns : | reference homepage of the feed, or NULL. | 
void grss_feed_channel_set_description (GrssFeedChannel *channel,gchar *description);
To set the description of channel.
| 
 | a GrssFeedChannel. | 
| 
 | description of the feed. | 
const gchar *       grss_feed_channel_get_description   (GrssFeedChannel *channel);
Retrieves the description of channel.
| 
 | a GrssFeedChannel. | 
| Returns : | description of the feed, or NULL. | 
void grss_feed_channel_set_image (GrssFeedChannel *channel,gchar *image);
To set a rappresentative image to channel.
| 
 | a GrssFeedChannel. | 
| 
 | URL of the image. | 
const gchar *       grss_feed_channel_get_image         (GrssFeedChannel *channel);
Retrieves the URL of the image assigned to the channel.
| 
 | a GrssFeedChannel. | 
| Returns : | URL of the image, or NULL. | 
void grss_feed_channel_set_icon (GrssFeedChannel *channel,gchar *icon);
To set the URL of the icon rappresenting channel.
| 
 | a GrssFeedChannel. | 
| 
 | URL where to retrieve the favicon. | 
const gchar *       grss_feed_channel_get_icon          (GrssFeedChannel *channel);
Retrieves URL of the favicon of the channel (and/or the website for which this is the feed).
| 
 | a GrssFeedChannel. | 
| Returns : | URL of the favicon, or NULL. | 
void grss_feed_channel_set_language (GrssFeedChannel *channel,gchar *language);
To set the language of channel.
| 
 | a GrssFeedChannel. | 
| 
 | string holding the language of the feed. | 
const gchar *       grss_feed_channel_get_language      (GrssFeedChannel *channel);
Retrieves the language of the channel.
| 
 | a GrssFeedChannel. | 
| Returns : | string rappresenting the language of channel, or NULL. | 
void grss_feed_channel_set_category (GrssFeedChannel *channel,gchar *category);
To set the category of the channel.
| 
 | a GrssFeedChannel. | 
| 
 | category of the feed. | 
const gchar *       grss_feed_channel_get_category      (GrssFeedChannel *channel);
Retrieves category of the channel.
| 
 | a GrssFeedChannel. | 
| Returns : | category of the feed, or NULL. | 
void grss_feed_channel_set_pubsubhub (GrssFeedChannel *channel,gchar *hub);
To set information about PubSubHubbub for the channel. To unset the hub,
pass NULL as parameter.
| 
 | a GrssFeedChannel. | 
| 
 | hub for the feed, or NULL. | 
gboolean grss_feed_channel_get_pubsubhub (GrssFeedChannel *channel,gchar **hub);
Retrieves information about the PubSubHubbub hub of the channel.
| 
 | a GrssFeedChannel. | 
| 
 | location for the hub string, or NULL. | 
| Returns : | TRUEif a valid PubSubHubbub hub has been set for thechannel,FALSEotherwise. | 
void grss_feed_channel_set_rsscloud (GrssFeedChannel *channel,gchar *path,gchar *protocol);
To set information about RSSCloud notifications for the channel.
| 
 | a GrssFeedChannel. | 
| 
 | complete references of the URL where to register subscription, e.g. http://example.com/rsscloudNotify . | 
| 
 | type of protocol used for notifications. | 
gboolean grss_feed_channel_get_rsscloud (GrssFeedChannel *channel,gchar **path,gchar **protocol);
Retrieves information about the RSSCloud coordinates of the channel.
| 
 | a GrssFeedChannel. | 
| 
 | location for the path string, or NULL. | 
| 
 | location for the protocol string, or NULL. | 
| Returns : | TRUEif a valid RSSCloud path has been set for thechannel,FALSEotherwise. | 
void grss_feed_channel_set_copyright (GrssFeedChannel *channel,gchar *copyright);
To set the copyright of the feed.
| 
 | a GrssFeedChannel. | 
| 
 | copyright of the channel. | 
const gchar *       grss_feed_channel_get_copyright     (GrssFeedChannel *channel);
Retrieves indications about the copyright.
| 
 | a GrssFeedChannel. | 
| Returns : | copyright of the channel, orNULL. | 
void grss_feed_channel_set_editor (GrssFeedChannel *channel,gchar *editor);
To set the editor of the channel.
| 
 | a GrssFeedChannel. | 
| 
 | editor of the feed. | 
const gchar *       grss_feed_channel_get_editor        (GrssFeedChannel *channel);
Retrieves reference to the editor or the channel.
| 
 | a GrssFeedChannel. | 
| Returns : | editor of the feed, or NULL. | 
void grss_feed_channel_add_contributor (GrssFeedChannel *channel,gchar *contributor);
To add a contributor to the channel.
| 
 | a GrssFeedChannel. | 
| 
 | contributor of the feed. | 
const GList *       grss_feed_channel_get_contributors  (GrssFeedChannel *channel);
Retrieves reference to the contributors of the channel.
| 
 | a GrssFeedChannel. | 
| Returns : | list of contributors to the channel, or NULL. | 
void grss_feed_channel_set_webmaster (GrssFeedChannel *channel,gchar *webmaster);
To assign a webmaster to the channel.
| 
 | a GrssFeedChannel. | 
| 
 | webmaster of the feed. | 
const gchar *       grss_feed_channel_get_webmaster     (GrssFeedChannel *channel);
Retrieves reference to the webmaster of the feed.
| 
 | a GrssFeedChannel. | 
| Returns : | webmaster of channel, orNULL. | 
void grss_feed_channel_set_generator (GrssFeedChannel *channel,gchar *generator);
To set information about the software generator of channel.
| 
 | a GrssFeedChannel. | 
| 
 | software generator of the feed. | 
const gchar *       grss_feed_channel_get_generator     (GrssFeedChannel *channel);
Retrieves information about the feed's software generator.
| 
 | a GrssFeedChannel. | 
| Returns : | generator of channel, orNULL. | 
void grss_feed_channel_set_publish_time (GrssFeedChannel *channel,time_t publish);
To set the time of publishing for the feed.
| 
 | a GrssFeedChannel. | 
| 
 | timestamp of publishing. | 
time_t              grss_feed_channel_get_publish_time  (GrssFeedChannel *channel);
Retrieves the publishing time of channel.
| 
 | a GrssFeedChannel. | 
| Returns : | time of feed's publish. | 
void grss_feed_channel_set_update_time (GrssFeedChannel *channel,time_t update);
To set the latest update time of channel.
| 
 | a GrssFeedChannel. | 
| 
 | update time of the feed. | 
time_t              grss_feed_channel_get_update_time   (GrssFeedChannel *channel);
Retrieves the update time of channel.
| 
 | a GrssFeedChannel. | 
| Returns : | time of the feed's latest update. If this value was not set
(with grss_feed_channel_set_update_time()) returnsgrss_feed_channel_get_publish_time(). | 
void grss_feed_channel_set_update_interval (GrssFeedChannel *channel,int minutes);
To set the update interval for channel.
| 
 | a GrssFeedChannel. | 
| 
 | update interval, in minutes. | 
int                 grss_feed_channel_get_update_interval
                                                        (GrssFeedChannel *channel);
Retrieves the update interval for the feed. Pay attention to the fact the
value can be unset, and the function returns 0: in this case the caller
must manually set a default update interval with
grss_feed_channel_set_update_interval().
| 
 | a GrssFeedChannel. | 
| Returns : | update interval for the channel, in minutes. | 
gboolean grss_feed_channel_fetch (GrssFeedChannel *channel,GError **error);
Utility to fetch and populate a GrssFeedChannel for the first time, and init
all his internal values. Only the source URL has to be set in channel
(with grss_feed_channel_set_source()). Be aware this function is sync, do not
returns until the feed isn't downloaded and parsed.
| 
 | a GrssFeedChannel. | 
| 
 | if an error occourred, FALSEis returned and this is filled with the
message. | 
| Returns : | TRUEif the feed is correctly fetched and parsed,FALSEotherwise. | 
void grss_feed_channel_fetch_async (GrssFeedChannel *channel,GAsyncReadyCallback callback,gpointer user_data);
Similar to grss_feed_channel_fetch(), but asyncronous.
| 
 | a GrssFeedChannel. | 
| 
 | function to invoke at the end of the download. | 
| 
 | data passed to the callback. | 
gboolean grss_feed_channel_fetch_finish (GrssFeedChannel *channel,GAsyncResult *res,GError **error);
Finalizes an asyncronous operation started with
grss_feed_channel_fetch_async().
| 
 | a GrssFeedChannel. | 
| 
 | the GAsyncResult passed to the callback. | 
| 
 | if an error occourred, FALSEis returned and this is filled with the
message. | 
| Returns : | TRUEifchannelinformations have been successfully fetched,FALSEotherwise. | 
GList * grss_feed_channel_fetch_all (GrssFeedChannel *channel,GError **error);
Utility to fetch and populate a GrssFeedChannel, and retrieve all its items.
| 
 | a GrssFeedChannel. | 
| 
 | if an error occourred, NULLis returned and this is filled with the
message. | 
| Returns : | a GList of GrssFeedItem, to be completely unreferenced and
freed when no longer in use, or NULLif an error occurs. | 
void grss_feed_channel_fetch_all_async (GrssFeedChannel *channel,GAsyncReadyCallback callback,gpointer user_data);
Similar to grss_feed_channel_fetch_all(), but asyncronous.
| 
 | a GrssFeedChannel. | 
| 
 | function to invoke at the end of the download. | 
| 
 | data passed to the callback. | 
GList * grss_feed_channel_fetch_all_finish (GrssFeedChannel *channel,GAsyncResult *res,GError **error);
Finalizes an asyncronous operation started with
grss_feed_channel_fetch_all_async().
| 
 | a GrssFeedChannel. | 
| 
 | the GAsyncResult passed to the callback. | 
| 
 | if an error occourred, NULLis returned and this is filled with the
message. | 
| Returns : | list of items fetched from the GrssFeedChannel, or NULLiferroris set. The list (and contained items) is freed at the end of the
callback |