RssDocument

RssDocument — a RSS document representation

Synopsis

                    RssDocumentPrivate;
                    RssDocument;
RssDocument*        rss_document_new                    (void);
const gchar*        rss_document_get_guid               (RssDocument *self);
const gchar*        rss_document_get_about              (RssDocument *self);
const gchar*        rss_document_get_title              (RssDocument *self);
const gchar*        rss_document_get_description        (RssDocument *self);
const gchar*        rss_document_get_link               (RssDocument *self);
const gchar*        rss_document_get_encoding           (RssDocument *self);
const gchar*        rss_document_get_language           (RssDocument *self);
const gchar*        rss_document_get_rating             (RssDocument *self);
const gchar*        rss_document_get_copyright          (RssDocument *self);
const gchar*        rss_document_get_pub_date           (RssDocument *self);
const gchar*        rss_document_get_editor_name        (RssDocument *self);
const gchar*        rss_document_get_editor_email       (RssDocument *self);
const gchar*        rss_document_get_editor_uri         (RssDocument *self);
const gchar*        rss_document_get_contributor_name   (RssDocument *self);
const gchar*        rss_document_get_contributor_email  (RssDocument *self);
const gchar*        rss_document_get_contributor_uri    (RssDocument *self);
const gchar*        rss_document_get_generator_name     (RssDocument *self);
const gchar*        rss_document_get_generator_uri      (RssDocument *self);
const gchar*        rss_document_get_generator_version  (RssDocument *self);
const gchar*        rss_document_get_image_title        (RssDocument *self);
const gchar*        rss_document_get_image_url          (RssDocument *self);
const gchar*        rss_document_get_image_link         (RssDocument *self);
gint                rss_document_get_ttl                (RssDocument *self);
GList*              rss_document_get_items              (RssDocument *self);
GList*              rss_document_get_categories         (RssDocument *self);

Object Hierarchy

  GObject
   +----RssDocument

Properties

  "about"                    gchar*                : Read / Write
  "contributor"              gchar*                : Read / Write
  "contributor-email"        gchar*                : Read / Write
  "contributor-uri"          gchar*                : Read / Write
  "copyright"                gchar*                : Read / Write
  "description"              gchar*                : Read / Write
  "editor"                   gchar*                : Read / Write
  "editor-email"             gchar*                : Read / Write
  "editor-uri"               gchar*                : Read / Write
  "encoding"                 gchar*                : Read / Write
  "generator"                gchar*                : Read / Write
  "generator-uri"            gchar*                : Read / Write
  "generator-version"        gchar*                : Read / Write
  "guid"                     gchar*                : Read / Write
  "image-link"               gchar*                : Read / Write
  "image-title"              gchar*                : Read / Write
  "image-url"                gchar*                : Read / Write
  "language"                 gchar*                : Read / Write
  "link"                     gchar*                : Read / Write
  "pub-date"                 gchar*                : Read / Write
  "rating"                   gchar*                : Read / Write
  "title"                    gchar*                : Read / Write
  "ttl"                      gint                  : Read / Write

Description

RssDocument is the representation of the resource that was parsed. It contains a list of RssItems which in turn contain article information.

Details

RssDocumentPrivate

typedef struct _RssDocumentPrivate RssDocumentPrivate;


RssDocument

typedef struct _RssDocument RssDocument;


rss_document_new ()

RssDocument*        rss_document_new                    (void);

Creates a new instance of RssDocument. This isn't incredibly useful currently, but is here none-the-less. The desire is to create an RSS generator that will allow for building RSS streams out of the document hierarchy.

Returns :

a new RssDocument. Use g_object_unref() when you are done.

rss_document_get_guid ()

const gchar*        rss_document_get_guid               (RssDocument *self);

Retrieves the "guid" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_about ()

const gchar*        rss_document_get_about              (RssDocument *self);

Retrieves the "about" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_title ()

const gchar*        rss_document_get_title              (RssDocument *self);

Retrieves the "title" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_description ()

const gchar*        rss_document_get_description        (RssDocument *self);

Retrieves the "description" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_link ()

const gchar*        rss_document_get_link               (RssDocument *self);

Retrieves the "link" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_encoding ()

const gchar*        rss_document_get_encoding           (RssDocument *self);

Retrieves the "encoding" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_language ()

const gchar*        rss_document_get_language           (RssDocument *self);

Retrieves the "language" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_rating ()

const gchar*        rss_document_get_rating             (RssDocument *self);

Retrieves the "rating" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_copyright ()

const gchar*        rss_document_get_copyright          (RssDocument *self);

Retrieves the "copyright" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_pub_date ()

const gchar*        rss_document_get_pub_date           (RssDocument *self);

Retrieves the "pub-date" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_editor_name ()

const gchar*        rss_document_get_editor_name        (RssDocument *self);

Retrieves the "editor" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_editor_email ()

const gchar*        rss_document_get_editor_email       (RssDocument *self);

Retrieves the "editor-email" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_editor_uri ()

const gchar*        rss_document_get_editor_uri         (RssDocument *self);

Retrieves the "editor-uri" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_contributor_name ()

const gchar*        rss_document_get_contributor_name   (RssDocument *self);

self :

Returns :


rss_document_get_contributor_email ()

const gchar*        rss_document_get_contributor_email  (RssDocument *self);

Retrieves the "contributor-email" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_contributor_uri ()

const gchar*        rss_document_get_contributor_uri    (RssDocument *self);

Retrieves the "contributor-uri" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_generator_name ()

const gchar*        rss_document_get_generator_name     (RssDocument *self);

Retrieves the "generator-name" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_generator_uri ()

const gchar*        rss_document_get_generator_uri      (RssDocument *self);

Retrieves the "generator-uri" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_generator_version ()

const gchar*        rss_document_get_generator_version  (RssDocument *self);

Retrieves the "generator-version" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_image_title ()

const gchar*        rss_document_get_image_title        (RssDocument *self);

Retrieves the "image-title" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_image_url ()

const gchar*        rss_document_get_image_url          (RssDocument *self);

Retrieves the "image-url" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_image_link ()

const gchar*        rss_document_get_image_link         (RssDocument *self);

Retrieves the "image-link" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_ttl ()

gint                rss_document_get_ttl                (RssDocument *self);

Retrieves the "ttl" field.

self :

a RssDocument

Returns :

the contents of the field. The returned string is owned by the RssDocument and should never be modified of freed

rss_document_get_items ()

GList*              rss_document_get_items              (RssDocument *self);

Creates a GList of RssItems that were found in the syndication. The objects in the list are weak references. Consumers of those objects should ref them with g_object_ref.

self :

a RssDocument

Returns :

a new GList owned by the caller.

rss_document_get_categories ()

GList*              rss_document_get_categories         (RssDocument *self);

Creates a GList of categories found in the syndication. The strings in the list are weak references. Consumers should duplicate them with g_strdup().

self :

a RssDocument

Returns :

a new GList owned by the caller

Property Details

The "about" property

  "about"                    gchar*                : Read / Write

Information about the RssDocument.

Default value: NULL


The "contributor" property

  "contributor"              gchar*                : Read / Write

The name of the particular contributor.

Default value: NULL


The "contributor-email" property

  "contributor-email"        gchar*                : Read / Write

The email of the particular contributor.

Default value: NULL


The "contributor-uri" property

  "contributor-uri"          gchar*                : Read / Write

The uri to more information on the particular contributer.

Default value: NULL


The "copyright" property

  "copyright"                gchar*                : Read / Write

The copyright of the RssDocument.

Default value: NULL


The "description" property

  "description"              gchar*                : Read / Write

The description of the RssDocument.

Default value: NULL


The "editor" property

  "editor"                   gchar*                : Read / Write

The name of the editor.

Default value: NULL


The "editor-email" property

  "editor-email"             gchar*                : Read / Write

The email address of the editor.

Default value: NULL


The "editor-uri" property

  "editor-uri"               gchar*                : Read / Write

The uri for more information about the editor.

Default value: NULL


The "encoding" property

  "encoding"                 gchar*                : Read / Write

The encoding of the RssDocument.

Default value: NULL


The "generator" property

  "generator"                gchar*                : Read / Write

The name of the generator on the server side.

Default value: NULL


The "generator-uri" property

  "generator-uri"            gchar*                : Read / Write

Url to more information about the generator on the server side.

Default value: NULL


The "generator-version" property

  "generator-version"        gchar*                : Read / Write

The version of the server side generator.

Default value: NULL


The "guid" property

  "guid"                     gchar*                : Read / Write

The guid associated with the feed. This is often the url of the feed.

Default value: NULL


The "image-link" property

  "image-link"               gchar*                : Read / Write

The url a user should be redirected to when clicking on the image for the RssDocument. Of course, its up to UI designers if they wish to implement this in any sort of way.

Default value: NULL


The "image-title" property

  "image-title"              gchar*                : Read / Write

The title for the image. This is often the alt="" tag in HTML.

Default value: NULL


The "image-url" property

  "image-url"                gchar*                : Read / Write

A url to the image for the RssDocument. Use this before checking for a favicon.ico.

Default value: NULL


The "language" property

  "language"                 gchar*                : Read / Write

The language the RssDocument was published in.

Default value: NULL


The "link" property

  "link"                     gchar*                : Read / Write

The link to the source document. This is parsed from the actual document and can point to whatever the source publisher choses.

Default value: NULL


The "pub-date" property

  "pub-date"                 gchar*                : Read / Write

The string representation of the date the document was published.

Default value: NULL


The "rating" property

  "rating"                   gchar*                : Read / Write

The rating associated with the RssDocument.

Default value: NULL


The "title" property

  "title"                    gchar*                : Read / Write

The title of the RssDocument.

Default value: NULL


The "ttl" property

  "ttl"                      gint                  : Read / Write

The publisher determined TTL for the source. Readers should try to respect this value and not update feeds any more often than necessary.

Allowed values: >= 0

Default value: 0

See Also

rss_parser_get_document()