GData API

GData API — GData namespace API

Stability Level

Unstable, unless otherwise indicated

Synopsis


#include <gdata/gdata-gdata.h>

                    GDataGDFeedLink;
GDataGDFeedLink *   gdata_gd_feed_link_new              (const gchar *href,
                                                         const gchar *rel,
                                                         guint count_hint);
void                gdata_gd_feed_link_free             (GDataGDFeedLink *self);
                    GDataGDRating;
GDataGDRating *     gdata_gd_rating_new                 (guint min,
                                                         guint max,
                                                         guint num_raters,
                                                         gdouble average);
void                gdata_gd_rating_free                (GDataGDRating *self);
                    GDataGDWhere;
GDataGDWhere *      gdata_gd_where_new                  (const gchar *rel,
                                                         const gchar *value_string,
                                                         const gchar *label);
void                gdata_gd_where_free                 (GDataGDWhere *self);
                    GDataGDWho;
GDataGDWho *        gdata_gd_who_new                    (const gchar *rel,
                                                         const gchar *value_string,
                                                         const gchar *email);
void                gdata_gd_who_free                   (GDataGDWho *self);

Description

The structures here represent several core GData-specific elements used by various different GData-based services, from the "gdata" namespace.

For more information on the common GData elements, see the GData specification.

Details

GDataGDFeedLink

typedef struct {
	gchar *rel;
	gchar *href;
	guint count_hint;
	/* TODO: support readOnly and feed */
} GDataGDFeedLink;

A structure fully representing a GData "rating" element. The href field is required, but the others are optional.

See the GData specification for more information.

Currently, readOnly and feed functionality is not implemented in GDataGDFeedLink.

gchar *rel;

the relationship between the related feed and the current item, or NULL

gchar *href;

the URI of the related feed

guint count_hint;

a hint about the number of items in the related feed

gdata_gd_feed_link_new ()

GDataGDFeedLink *   gdata_gd_feed_link_new              (const gchar *href,
                                                         const gchar *rel,
                                                         guint count_hint);

Creates a new GDataGDFeedLink. More information is available in the GData specification.

Currently, readOnly and feed functionality is not implemented in GDataGDFeedLink.

href :

the URI of the related feed

rel :

the relationship between the related feed and the current item, or NULL

count_hint :

a hint about the number of items in the related feed

Returns :

a new GDataGDFeedLink, or NULL on error

gdata_gd_feed_link_free ()

void                gdata_gd_feed_link_free             (GDataGDFeedLink *self);

Frees a GDataGDFeedLink.

self :

a GDataGDFeedLink

GDataGDRating

typedef struct {
	guint min;
	guint max;
	guint num_raters;
	gdouble average;
} GDataGDRating;

A structure fully representing a GData "rating" element. All fields are required.

See the GData specification for more information.

Currently, rel and value functionality is not implemented in GDataGDRating.

guint min;

the minimum rating which can be chosen (typically 1)

guint max;

the maximum rating which can be chosen (typically 5)

guint num_raters;

the number of people who have rated the item

gdouble average;

the average rating for the item

gdata_gd_rating_new ()

GDataGDRating *     gdata_gd_rating_new                 (guint min,
                                                         guint max,
                                                         guint num_raters,
                                                         gdouble average);

Creates a new GDataGDRating. More information is available in the GData specification.

Currently, rel and value functionality is not implemented in GDataGDRating.

min :

the minimum rating which can be chosen (typically 1)

max :

the maximum rating which can be chosen (typically 5)

num_raters :

the number of people who have rated the item

average :

the average rating for the item

Returns :

a new GDataGDRating

gdata_gd_rating_free ()

void                gdata_gd_rating_free                (GDataGDRating *self);

Frees a GDataGDRating.

self :

a GDataGDRating

GDataGDWhere

typedef struct {
	gchar *rel;
	gchar *value_string;
	gchar *label;
	/* TODO: deal with the entryLink */
} GDataGDWhere;

A structure fully representing a GData "where" element. All fields are optional.

See the GData specification for more information.

Currently, entryLink functionality is not implemented in GDataGDWhere.

gchar *rel;

the relationship between the item and this place, or NULL

gchar *value_string;

a string to represent the place, or NULL

gchar *label;

a human-readable label for the place, or NULL

gdata_gd_where_new ()

GDataGDWhere *      gdata_gd_where_new                  (const gchar *rel,
                                                         const gchar *value_string,
                                                         const gchar *label);

Creates a new GDataGDWhere. More information is available in the GData specification.

Currently, entryLink functionality is not implemented in GDataGDWhere.

rel :

the relationship between the item and this place, or NULL

value_string :

a string to represent the place, or NULL

label :

a human-readable label for the place, or NULL

Returns :

a new GDataGDWhere

gdata_gd_where_free ()

void                gdata_gd_where_free                 (GDataGDWhere *self);

Frees a GDataGDWhere.

self :

a GDataGDWhere

GDataGDWho

typedef struct {
	gchar *rel;
	gchar *value_string;
	gchar *email;
	/* TODO: deal with the attendeeType, attendeeStatus and entryLink */
} GDataGDWho;

A structure fully representing a GData "who" element. All fields are optional.

See the GData specification for more information.

Currently, entryLink functionality is not implemented in GDataGDWho.

gchar *rel;

the relationship between the item and this person, or NULL

gchar *value_string;

a string to represent the person, or NULL

gchar *email;

the person's e-mail address, or NULL

gdata_gd_who_new ()

GDataGDWho *        gdata_gd_who_new                    (const gchar *rel,
                                                         const gchar *value_string,
                                                         const gchar *email);

Creates a new GDataGDWho. More information is available in the GData specification.

Currently, entryLink functionality is not implemented in GDataGDWho.

rel :

the relationship between the item and this person, or NULL

value_string :

a string to represent the person, or NULL

email :

the person's e-mail address, or NULL

Returns :

a new GDataGDWho

gdata_gd_who_free ()

void                gdata_gd_who_free                   (GDataGDWho *self);

Frees a GDataGDWho.

self :

a GDataGDWho