|  |  |  | libgrss Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
struct GrssFeedItem; GrssFeedItem * grss_feed_item_new (GrssFeedChannel *parent); GrssFeedChannel * grss_feed_item_get_parent (GrssFeedItem *item); void grss_feed_item_set_id (GrssFeedItem *item,gchar *id); const gchar * grss_feed_item_get_id (GrssFeedItem *item); void grss_feed_item_set_title (GrssFeedItem *item,gchar *title); const gchar * grss_feed_item_get_title (GrssFeedItem *item); void grss_feed_item_set_description (GrssFeedItem *item,gchar *description); const gchar * grss_feed_item_get_description (GrssFeedItem *item); void grss_feed_item_add_category (GrssFeedItem *item,gchar *category); const GList * grss_feed_item_get_categories (GrssFeedItem *item); void grss_feed_item_set_source (GrssFeedItem *item,gchar *source); const gchar * grss_feed_item_get_source (GrssFeedItem *item); void grss_feed_item_set_real_source (GrssFeedItem *item,gchar *realsource,gchar *title); void grss_feed_item_get_real_source (GrssFeedItem *item,const gchar **realsource,const gchar **title); void grss_feed_item_set_related (GrssFeedItem *item,gchar *related); const gchar * grss_feed_item_get_related (GrssFeedItem *item); void grss_feed_item_set_copyright (GrssFeedItem *item,gchar *copyright); const gchar * grss_feed_item_get_copyright (GrssFeedItem *item); void grss_feed_item_set_author (GrssFeedItem *item,gchar *author); const gchar * grss_feed_item_get_author (GrssFeedItem *item); void grss_feed_item_add_contributor (GrssFeedItem *item,gchar *contributor); const GList * grss_feed_item_get_contributors (GrssFeedItem *item); void grss_feed_item_set_comments_url (GrssFeedItem *item,gchar *url); const gchar * grss_feed_item_get_comments_url (GrssFeedItem *item); void grss_feed_item_set_geo_point (GrssFeedItem *item,double latitude,double longitude); gboolean grss_feed_item_get_geo_point (GrssFeedItem *item,double *latitude,double *longitude); void grss_feed_item_set_publish_time (GrssFeedItem *item,time_t publish); time_t grss_feed_item_get_publish_time (GrssFeedItem *item); void grss_feed_item_add_enclosure (GrssFeedItem *item,GrssFeedEnclosure *enclosure); const GList * grss_feed_item_get_enclosures (GrssFeedItem *item);
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.
GrssFeedItem *      grss_feed_item_new                  (GrssFeedChannel *parent);
To allocate a new empty GrssFeedItem.
| 
 | the feed from which the new item belongs. | 
| Returns : | a new GrssFeedItem. | 
GrssFeedChannel *   grss_feed_item_get_parent           (GrssFeedItem *item);
Retrieves the feed from which the item belongs.
| 
 | a GrssFeedItem. | 
| Returns : | the parent feed, as set in grss_feed_item_new(). | 
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.
| 
 | a GrssFeedItem. | 
| 
 | the new ID to set. | 
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.
| 
 | GrssFeedItem from which retrieve the ID. | 
| Returns : | ID of the item. | 
void grss_feed_item_set_title (GrssFeedItem *item,gchar *title);
To set a title to the item.
| 
 | a GrssFeedItem. | 
| 
 | title of the item. | 
const gchar *       grss_feed_item_get_title            (GrssFeedItem *item);
Retrieves the title assigned to item.
| 
 | a GrssFeedItem. | 
| Returns : | title of the element. | 
void grss_feed_item_set_description (GrssFeedItem *item,gchar *description);
To set the description of item. Usually "description" means his content.
| 
 | a GrssFeedItem. | 
| 
 | content of the item. | 
const gchar *       grss_feed_item_get_description      (GrssFeedItem *item);
Retrieves the description of the item.
| 
 | a GrssFeedItem. | 
| Returns : | description of item. | 
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().
| 
 | a GrssFeedItem. | 
| 
 | a new category to assign to the item. | 
const GList *       grss_feed_item_get_categories       (GrssFeedItem *item);
Retrieves list of categories assigned to the item.
| 
 | a GrssFeedItem. | 
| Returns : | list of strings, one for assigned category. Do not free or modify this list. | 
void grss_feed_item_set_source (GrssFeedItem *item,gchar *source);
To set the source of the item.
| 
 | a GrssFeedItem. | 
| 
 | URL of the item. | 
const gchar *       grss_feed_item_get_source           (GrssFeedItem *item);
Retrieves the URL where the item can be found.
| 
 | a GrssFeedItem. | 
| Returns : | URL of the item, or NULL. | 
void 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.
| 
 | a GrssFeedItem. | 
| 
 | URL of the real source for the item. | 
| 
 | title of the 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.
| 
 | a GrssFeedItem. | 
| 
 | will be assigned to the URL of the real source, or NULL. | 
| 
 | will be assigned to the title of the real source, or NULL. | 
void grss_feed_item_set_related (GrssFeedItem *item,gchar *related);
To set reference to a post related to item.
| 
 | a GrssFeedItem. | 
| 
 | reference to a related post. | 
const gchar *       grss_feed_item_get_related          (GrssFeedItem *item);
Retrieves indication about posts related to item.
| 
 | a GrssFeedItem. | 
| Returns : | related posts, or NULL. | 
void grss_feed_item_set_copyright (GrssFeedItem *item,gchar *copyright);
To set a copyright reference to item.
| 
 | a GrssFeedItem. | 
| 
 | copyright declaration for the item. | 
const gchar *       grss_feed_item_get_copyright        (GrssFeedItem *item);
Retrieves copyright reference for the item.
| 
 | a GrssFeedItem. | 
| Returns : | copyright mark, or NULL. | 
void grss_feed_item_set_author (GrssFeedItem *item,gchar *author);
To assign an author to the item.
| 
 | a GrssFeedItem. | 
| 
 | name of the author. | 
const gchar *       grss_feed_item_get_author           (GrssFeedItem *item);
Retrieves the author of item.
| 
 | a GrssFeedItem. | 
| Returns : | author of the item, or NULL. | 
void grss_feed_item_add_contributor (GrssFeedItem *item,gchar *contributor);
To add a contributor to the item.
| 
 | a GrssFeedItem. | 
| 
 | name of the contributor for the item. | 
const GList *       grss_feed_item_get_contributors     (GrssFeedItem *item);
Retrieves contributors for item.
| 
 | a GrssFeedItem. | 
| Returns : | list of contributors to the item. | 
void grss_feed_item_set_comments_url (GrssFeedItem *item,gchar *url);
To assign the URL where to fetch comments for the item.
| 
 | a GrssFeedItem. | 
| 
 | URL where to retrieve comments to the item. | 
const gchar *       grss_feed_item_get_comments_url     (GrssFeedItem *item);
Retrieves the URL where to catch comments to the item.
| 
 | a GrssFeedItem. | 
| Returns : | URL to parse to read comments for item, orNULL. | 
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.
| 
 | a GrssFeedItem. | 
| 
 | latitude of the point, or -1 to leave the previous one. | 
| 
 | longitude of the point, or -1 to leave the previous one. | 
gboolean grss_feed_item_get_geo_point (GrssFeedItem *item,double *latitude,double *longitude);
Retrieves the geo reference of the item.
| 
 | a GrssFeedItem. | 
| 
 | will be assigned to the latitude of the point, or NULL. | 
| 
 | will be assigned to the longitude of the point, or NULL. | 
| Returns : | TRUEifitemhas geographic coordinates assigned andlatitudeandlongitudehave been set,FALSEifitemhas not geo
reference. | 
void grss_feed_item_set_publish_time (GrssFeedItem *item,time_t publish);
To set the publish time of the item.
| 
 | a GrssFeedItem. | 
| 
 | publishing timestamp of the item. | 
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().
| 
 | a GrssFeedItem. | 
| Returns : | publish time of item. | 
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.
| 
 | a GrssFeedItem. | 
| 
 | a GrssFeedEnclosure to add to the item. | 
const GList *       grss_feed_item_get_enclosures       (GrssFeedItem *item);
Retrieves the list of enclosures added with grss_feed_item_add_enclosure().
| 
 | a GrssFeedItem. | 
| Returns : | a list of GrssFeedEnclosure. This is a direct reference to the internal list, do not free or modify it. |