Grss.FeedsSubscriber¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
Properties¶
None
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when a notification has been received and parsed. |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Grss.FeedsSubscriber(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new()¶
- Returns:
a new
Grss.FeedsSubscriber
.- Return type:
Allocates a new
Grss.FeedsSubscriber
.
- get_address()¶
- Returns:
the
Gio.InetAddress
used by self, orNone
if theGrss.FeedsSubscriber
is switched off.- Return type:
This function returns the Internet address where self is listening for external events. It is often required by #GrssFeedsSubscriberHandlers while subscribing contents to specify the local endpoint for communications.
- 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 self.
- get_port()¶
- Returns:
the port of the socket locally opened by self.
- Return type:
This function returns the Internet port where self is listening for external events. It is often required by #GrssFeedsSubscriberHandlers while subscribing contents to specify the local endpoint for communications.
- get_session()¶
- Returns:
the
Soup.Session
used by the providedGrss.FeedsSubscriber
.- Return type:
To obtain the internal
Soup.Session
of aGrss.FeedsSubscriber
, so to re-use it in #GrssFeedsSubscriberHandlers or similar tasks.
- listen(feeds)¶
- Parameters:
feeds ([
Grss.FeedChannel
]) – a list ofGrss.FeedChannel
.- Returns:
True
if allGrss.FeedChannels
involved in feeds are valid and can be listened with one of the implemented procotols,False
otherwise.- Return type:
To set the list of feeds to be managed by self. The previous list, if any, is invalidated. After invokation to the function,
Grss.FeedsSubscriber.switch
() must be call to run the subscription. The list in feeds can be freed after calling this; linkedGrss.FeedChannel
areGObject.Object.ref
'd here.
- set_port(port)¶
- Parameters:
port (
int
) – new listening port for the server.
To customize the port opened by the local server to catch incoming publishers’ events. By default this is 8444. Changing the port while the subscriber is running imply restart the local server. Pay attention to the fact many publishers’ implementations accept only certain ports.
- switch(run)¶
-
Permits to pause or resume self listening for events.
- do_notification_received(feed, item) virtual¶
- Parameters:
feed (
Grss.FeedChannel
) –item (
Grss.FeedItem
) –
Signal Details¶
- Grss.FeedsSubscriber.signals.notification_received(feeds_subscriber, feed, item)¶
- Signal Name:
notification-received
- Flags:
- Parameters:
feeds_subscriber (
Grss.FeedsSubscriber
) – The object which received the signalfeed (
GObject.Object
) – theGrss.FeedChannel
which has been updated.item (
GObject.Object
) – theGrss.FeedItem
received.
Emitted when a notification has been received and parsed. The item is cached and unref’d when the
Grss.FeedsSubscriber
is destroyed or a new set of feeds is provided.