| libgrss Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
FeedsPool; FeedsPool* feeds_pool_new (); void feeds_pool_listen (FeedsPool *pool,GList *feeds); GList* feeds_pool_get_listened (FeedsPool *pool); void feeds_pool_switch (FeedsPool *pool,gboolean run); SoupSession* feeds_pool_get_session (FeedsPool *pool);
The FeedsPool permits to automatically "listen" for more feeds: it
provides to fetch them on regular intervals (as defined by
feed_channel_get_update_interval() for each channel), parse them with
FeedParser, and emits signals when feeds are ready
void feeds_pool_listen (FeedsPool *pool,GList *feeds);
To set the list of feeds to be managed by the pool. The previous list, if
any, is invalidated. After invokation to the function, feeds_pool_switch()
must be call to run the auto-fetching (always, also if previous state was
"running").
The list in feeds can be freed after calling this; linked FeedChannel
are g_object_ref'd here
|
a FeedsPool |
|
a list of FeedChannel |
GList* feeds_pool_get_listened (FeedsPool *pool);
Returns number of feeds under the pool control, as provided by
feeds_pool_listen(). To get the complete list of those feeds, check
feeds_pool_get_listened()
void feeds_pool_switch (FeedsPool *pool,gboolean run);
Permits to pause or resume the pool fetching feeds. If run is TRUE, the
pool starts immediately
|
a FeedsPool |
|
TRUE to run the pool, FALSE to pause it |
SoupSession* feeds_pool_get_session (FeedsPool *pool);
To access the internal SoupSession used by the pool to fetch items
|
a FeedsPool |
Returns : |
istance of SoupSession. Do not free it |
"feed-fetching" signalvoid user_function (FeedsPool *pool, GObject *feed, gpointer user_data) : Run Last
Emitted when the pool starts fetching a new FeedChannel. To be
used to know the internal status of the component
|
the FeedsPool emitting the signal |
|
the FeedChannel which is going to be fetched |
|
user data set when the signal handler was connected. |
"feed-ready" signalvoid user_function (FeedsPool *pool, GObject *feed, gpointer items, gpointer user_data) : Run Last
Emitted when a FeedChannel assigned to the pool has been fetched
and parsed. If items may be NULL, if an error occourred while
fetching and/or parsing. List of items is freed, and his elements
are unref'd, when signal ends
|
the FeedsPool emitting the signal |
|
the FeedChannel which has been fetched and parsed |
|
list of FeedItem obtained parsing the feed |
|
user data set when the signal handler was connected. |