Top |
Functions
Description
GrssFeedItem is an abstraction for an item, collects all information about a single element found into a feed. It mostly is a passive container for attributes.
Functions
grss_feed_item_new ()
GrssFeedItem *
grss_feed_item_new (GrssFeedChannel *parent
);
To allocate a new empty GrssFeedItem.
grss_feed_item_get_parent ()
GrssFeedChannel *
grss_feed_item_get_parent (GrssFeedItem *item
);
Retrieves the feed from which the item belongs.
grss_feed_item_set_id ()
void grss_feed_item_set_id (GrssFeedItem *item
,gchar *id
);
To set the ID of the item
. This parameter has not a particular format: it
is just a string used to identify in unique way the item.
grss_feed_item_get_id ()
const gchar *
grss_feed_item_get_id (GrssFeedItem *item
);
Retrieves the ID assigned to the item
. If no ID was set with
grss_feed_item_set_id()
this returns the same of grss_feed_item_get_source()
.
Pay attention to the fact this library do not check uniqueness of assigned
IDs.
grss_feed_item_set_title ()
void grss_feed_item_set_title (GrssFeedItem *item
,gchar *title
);
To set a title to the item
.
grss_feed_item_get_title ()
const gchar *
grss_feed_item_get_title (GrssFeedItem *item
);
Retrieves the title assigned to item
.
grss_feed_item_set_description ()
void grss_feed_item_set_description (GrssFeedItem *item
,gchar *description
);
To set the description of item
. Usually "description" means his content.
grss_feed_item_get_description ()
const gchar *
grss_feed_item_get_description (GrssFeedItem *item
);
Retrieves the description of the item
.
grss_feed_item_add_category ()
void grss_feed_item_add_category (GrssFeedItem *item
,gchar *category
);
Adds a category to the item
. The complete list can be obtained with
grss_feed_item_get_categories()
.
grss_feed_item_get_categories ()
const GList *
grss_feed_item_get_categories (GrssFeedItem *item
);
Retrieves list of categories assigned to the item
.
grss_feed_item_set_source ()
gboolean grss_feed_item_set_source (GrssFeedItem *item
,gchar *source
);
To set the source of the item
.
grss_feed_item_get_source ()
const gchar *
grss_feed_item_get_source (GrssFeedItem *item
);
Retrieves the URL where the item
can be found.
grss_feed_item_set_real_source ()
gboolean grss_feed_item_set_real_source (GrssFeedItem *item
,gchar *realsource
,gchar *title
);
To set an alternative real source for item
. This parameter is used by web
aggregators to explicit the origin of a content reproduced in them.
Parameters
item |
a GrssFeedItem. |
|
realsource |
URL of the real source for the item. |
|
title |
title of the real source. |
grss_feed_item_get_real_source ()
void grss_feed_item_get_real_source (GrssFeedItem *item
,const gchar **realsource
,const gchar **title
);
Retrieves references to the real source of item
.
Parameters
item |
a GrssFeedItem. |
|
realsource |
will be assigned to the URL of the real source, or |
|
title |
will be assigned to the title of the real source, or |
grss_feed_item_set_related ()
void grss_feed_item_set_related (GrssFeedItem *item
,gchar *related
);
To set reference to a post related to item
.
grss_feed_item_get_related ()
const gchar *
grss_feed_item_get_related (GrssFeedItem *item
);
Retrieves indication about posts related to item
.
grss_feed_item_set_copyright ()
void grss_feed_item_set_copyright (GrssFeedItem *item
,gchar *copyright
);
To set a copyright reference to item
.
grss_feed_item_get_copyright ()
const gchar *
grss_feed_item_get_copyright (GrssFeedItem *item
);
Retrieves copyright reference for the item
.
grss_feed_item_set_author ()
void grss_feed_item_set_author (GrssFeedItem *item
,GrssPerson *author
);
To assign an author to the item
.
grss_feed_item_get_author ()
GrssPerson *
grss_feed_item_get_author (GrssFeedItem *item
);
Retrieves the author of item
.
grss_feed_item_add_contributor ()
void grss_feed_item_add_contributor (GrssFeedItem *item
,GrssPerson *contributor
);
To add a contributor to the item
.
grss_feed_item_get_contributors ()
const GList *
grss_feed_item_get_contributors (GrssFeedItem *item
);
Retrieves contributors for item
.
grss_feed_item_set_comments_url ()
gboolean grss_feed_item_set_comments_url (GrssFeedItem *item
,gchar *url
);
To assign the URL where to fetch comments for the item.
grss_feed_item_get_comments_url ()
const gchar *
grss_feed_item_get_comments_url (GrssFeedItem *item
);
Retrieves the URL where to catch comments to the item
.
grss_feed_item_set_geo_point ()
void grss_feed_item_set_geo_point (GrssFeedItem *item
,double latitude
,double longitude
);
To assign geographic context to the item
.
Passing -1 as latitude
or longitude
, the relative value is untouched in
the object. This is to easy assignment of coordinates in more than a
single step. If both are -1, nothing happens.
Parameters
item |
a GrssFeedItem. |
|
latitude |
latitude of the point, or -1 to leave the previous one. |
|
longitude |
longitude of the point, or -1 to leave the previous one. |
grss_feed_item_get_geo_point ()
gboolean grss_feed_item_get_geo_point (GrssFeedItem *item
,double *latitude
,double *longitude
);
Retrieves the geo reference of the item
.
Parameters
item |
a GrssFeedItem. |
|
latitude |
will be assigned to the latitude of the point, or |
|
longitude |
will be assigned to the longitude of the point, or |
grss_feed_item_set_publish_time ()
void grss_feed_item_set_publish_time (GrssFeedItem *item
,time_t publish
);
To set the publish time of the item.
grss_feed_item_get_publish_time ()
time_t
grss_feed_item_get_publish_time (GrssFeedItem *item
);
Retrieves the publish time of the item. By default this value is the
current timestamp assigned when creating the GrssFeedItem, and may be
changed with grss_feed_item_set_publish_time()
.
grss_feed_item_add_enclosure ()
void grss_feed_item_add_enclosure (GrssFeedItem *item
,GrssFeedEnclosure *enclosure
);
Adds an enclosure to the item
. That external elements may be references
to images, videos, or other contents (usually multimedial) embedded in the
element.
grss_feed_item_get_enclosures ()
const GList *
grss_feed_item_get_enclosures (GrssFeedItem *item
);
Retrieves the list of enclosures added with grss_feed_item_add_enclosure()
.
Returns
a list of GrssFeedEnclosure. This is a direct reference to the internal list, do not free or modify it.
[element-type GrssFeedEnclosure][transfer none]