GrssFeedsStore

GrssFeedsStore — abstract class for feeds permanent storage

Types and Values

Object Hierarchy

    GObject
    ╰── GrssFeedsStore

Description

GrssFeedsStore is a class which abstracts storage of feeds, implementing some behaviours valid for all. Extensions of this must provide implementation of different callbacks so to permit permanent saving of channels and feeds.

Functions

grss_feeds_store_get_channels ()

GList *
grss_feeds_store_get_channels (GrssFeedsStore *store);

To retrieve list of feeds permanently saved into the store.

Parameters

store

a GrssFeedsStore.

 

Returns

list of GrssFeedChannel found in the store . Do not modify or free it.

[element-type GrssFeedChannel][transfer none]


grss_feeds_store_get_items_by_channel ()

GList *
grss_feeds_store_get_items_by_channel (GrssFeedsStore *store,
                                       GrssFeedChannel *channel);

To retrieve list of items saved into the store, assigned to the given channel .

Parameters

store

a GrssFeedsStore.

 

channel

parent feed containing required items.

 

Returns

list of GrssFeedItem found in the store . Do not modify or free it.

[element-type GrssFeedItem][transfer none]


grss_feeds_store_has_item ()

gboolean
grss_feeds_store_has_item (GrssFeedsStore *store,
                           GrssFeedChannel *channel,
                           const gchar *id);

To retrieve an item into a feed, given his unique ID.

Parameters

store

a GrssFeedsStore.

 

channel

parent feed containing required item.

 

id

unique ID to look for.

 

Returns

TRUE if the specified item exists, FALSE otherwise.


grss_feeds_store_add_item_in_channel ()

void
grss_feeds_store_add_item_in_channel (GrssFeedsStore *store,
                                      GrssFeedChannel *channel,
                                      GrssFeedItem *item);

To save a new GrssFeedItem into the store . It performs a check to grant item is not already saved.

Parameters

store

a GrssFeedsStore.

 

channel

parent feed for the new item.

 

item

new item to permanently save.

 

grss_feeds_store_switch ()

void
grss_feeds_store_switch (GrssFeedsStore *store,
                         gboolean run);

This is to permit the store to auto-update itself: it creates an internal GrssFeedsPool and listens for his signals, so to implement the whole loop fetch-parse-save trasparently.

Parameters

store

a GrssFeedsStore.

 

run

TRUE to run the store , FALSE to stop.

 

Types and Values

GRSS_FEEDS_STORE_TYPE

#define GRSS_FEEDS_STORE_TYPE		(grss_feeds_store_get_type())