Grss.FeedsPool¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when an error raises in fetching or parsing a |
|
Emitted when the pool starts fetching a new |
|
Emitted when a |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Grss.FeedsPool(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
Grss.FeedsPool
.- Return type:
Allocates a new
Grss.FeedsPool
.
- get_listened()¶
- Returns:
a list of
Grss.FeedChannel
, to be freed with g_list_free() when no longer in use. Do not modify elements found in this list.- Return type:
Returns the list of feeds currently managed by the self. Please consider this function has to build the list that returns, and of course this is a time and resources consuming task: if you only need to know how many feeds are currently handled, check
Grss.FeedsPool.get_listened_num
().
- get_listened_num()¶
- Returns:
number of feeds currently managed by the
Grss.FeedsPool
.- Return type:
Returns number of feeds under the self control, as provided by
Grss.FeedsPool.listen
(). To get the complete list of those feeds, checkGrss.FeedsPool.get_listened
().
- get_session()¶
- Returns:
instance of
Soup.Session
. Do not free it.- Return type:
To access the internal
Soup.Session
used by the self to fetch items.
- listen(feeds)¶
- Parameters:
feeds ([
Grss.FeedChannel
]) – a list ofGrss.FeedChannel
.
To set the list of feeds to be managed by the pool. The previous list, if any, is invalidated. After invokation to the function,
Grss.FeedsPool.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; linkedGrss.FeedChannel
areGObject.Object.ref
'd here.
- switch(run)¶
-
Permits to pause or resume the self fetching feeds. If run is
True
, the self starts immediately.
- do_feed_fetching(feed) virtual¶
- Parameters:
feed (
Grss.FeedChannel
) –
Signal Details¶
- Grss.FeedsPool.signals.feed_fail(feeds_pool, feed)¶
- Signal Name:
feed-fail
- Flags:
- Parameters:
feeds_pool (
Grss.FeedsPool
) – The object which received the signalfeed (
GObject.Object
) – theGrss.FeedChannel
which failed to fetch or parse.
Emitted when an error raises in fetching or parsing a
Grss.FeedChannel
assigned to the pool.
- Grss.FeedsPool.signals.feed_fetching(feeds_pool, feed)¶
- Signal Name:
feed-fetching
- Flags:
- Parameters:
feeds_pool (
Grss.FeedsPool
) – The object which received the signalfeed (
GObject.Object
) – theGrss.FeedChannel
which is going to be fetched.
Emitted when the pool starts fetching a new
Grss.FeedChannel
. To be used to know the internal status of the component.
- Grss.FeedsPool.signals.feed_ready(feeds_pool, feed, items)¶
- Signal Name:
feed-ready
- Flags:
- Parameters:
feeds_pool (
Grss.FeedsPool
) – The object which received the signalfeed (
GObject.Object
) – theGrss.FeedChannel
which has been fetched and parsed.items ([
Grss.FeedItem
]) – list ofGrss.FeedItem
obtained parsing the feed.
Emitted when a
Grss.FeedChannel
assigned to the pool has been fetched and parsed. All parsed items are exposed in the array, with no regards about previously existing elements. items may beNone
, if an error occurred while fetching and/or parsing. List of items is freed, and his elements are unref’d, when signal ends.