Atom API

Atom API — Atom namespace API

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <gdata/gdata-atom.h>

                    GDataAuthor;
GDataAuthor *       gdata_author_new                    (const gchar *name,
                                                         const gchar *uri,
                                                         const gchar *email);
void                gdata_author_free                   (GDataAuthor *self);
                    GDataCategory;
GDataCategory *     gdata_category_new                  (const gchar *term,
                                                         const gchar *scheme,
                                                         const gchar *label);
void                gdata_category_free                 (GDataCategory *self);
                    GDataLink;
GDataLink *         gdata_link_new                      (const gchar *href,
                                                         const gchar *rel,
                                                         const gchar *type,
                                                         const gchar *hreflang,
                                                         const gchar *title,
                                                         gint length);
void                gdata_link_free                     (GDataLink *self);
                    GDataGenerator;
GDataGenerator *    gdata_generator_new                 (const gchar *name,
                                                         const gchar *uri,
                                                         const gchar *version);
void                gdata_generator_free                (GDataGenerator *self);

Description

The structures here represent several core elements in the Atom specification which are used in GData APIs, as the GData API is based on Atom.

Details

GDataAuthor

typedef struct {
	gchar *name;
	gchar *uri;
	gchar *email;
} GDataAuthor;

A structure fully representing an Atom "author" element. The name field is required, but the others are optional.

See the Atom specification for more information.

gchar *name;

the author's name

gchar *uri;

an IRI describing the author, or NULL

gchar *email;

the author's e-mail address, or NULL

gdata_author_new ()

GDataAuthor *       gdata_author_new                    (const gchar *name,
                                                         const gchar *uri,
                                                         const gchar *email);

Creates a new GDataAuthor. More information is available in the Atom specification.

All the parameters are copied, so can be freed after calling this function.

name :

the author's name

uri :

an IRI describing the author, or NULL

email :

the author's e-mail address, or NULL

Returns :

a new GDataAuthor, or NULL; free with gdata_author_free()

gdata_author_free ()

void                gdata_author_free                   (GDataAuthor *self);

Frees a GDataAuthor and its fields.

self :

a GDataAuthor

GDataCategory

typedef struct {
	gchar *term;
	gchar *scheme;
	gchar *label;
} GDataCategory;

A structure fully representing an Atom "category" element. The term field is required, but the others are optional.

See the Atom specification for more information.

gchar *term;

a category identifier

gchar *scheme;

an IRI to define the categorisation scheme, or NULL

gchar *label;

a human-readable label for the category, or NULL

gdata_category_new ()

GDataCategory *     gdata_category_new                  (const gchar *term,
                                                         const gchar *scheme,
                                                         const gchar *label);

Creates a new GDataCategory. More information is available in the Atom specification.

All the parameters are copied, so can be freed after calling this function.

term :

a category identifier

scheme :

an IRI to define the categorisation scheme, or NULL

label :

a human-readable label for the category, or NULL

Returns :

a new GDataCategory, or NULL; free with gdata_category_free()

gdata_category_free ()

void                gdata_category_free                 (GDataCategory *self);

Frees a GDataCategory and its fields.

self :

a GDataCategory

GDataLink

typedef struct {
	gchar *href;
	gchar *rel;
	gchar *type;
	gchar *hreflang;
	gchar *title;
	gint length;
} GDataLink;

A structure fully representing an Atom "link" element. The href field is required, but the others are optional.

See the Atom specification for more information.

gchar *href;

the link's IRI

gchar *rel;

the relationship of the link to the current document, or NULL

gchar *type;

an advisory media type for the href page, or NULL

gchar *hreflang;

the language of the href page, or NULL

gchar *title;

human-readable information about the link, or NULL

gint length;

an advisory content length, in octets, for the href page, or -1

gdata_link_new ()

GDataLink *         gdata_link_new                      (const gchar *href,
                                                         const gchar *rel,
                                                         const gchar *type,
                                                         const gchar *hreflang,
                                                         const gchar *title,
                                                         gint length);

Creates a new GDataLink. More information is available in the Atom specification.

All the parameters are copied, so can be freed after calling this function.

href :

the link's IRI

rel :

the relationship of the link to the current document, or NULL

type :

an advisory media type for the href page, or NULL

hreflang :

the language of the href page, or NULL

title :

human-readable information about the link, or NULL

length :

an advisory content length, in octets, for the href page, or -1

Returns :

a new GDataLink, or NULL; free with gdata_link_free()

gdata_link_free ()

void                gdata_link_free                     (GDataLink *self);

Frees a GDataLink and its fields.

self :

a GDataLink

GDataGenerator

typedef struct {
	gchar *uri;
	gchar *version;
	gchar *name;
} GDataGenerator;

A structure fully representing an Atom "generator" element. The name field is required, but the others are optional.

See the Atom specification for more information.

gchar *uri;

an IRI describing the generator, or NULL

gchar *version;

the version of the generator, or NULL

gchar *name;

the human-readable generator's name

gdata_generator_new ()

GDataGenerator *    gdata_generator_new                 (const gchar *name,
                                                         const gchar *uri,
                                                         const gchar *version);

Creates a new GDataGenerator. More information is available in the Atom specification.

All the parameters are copied, so can be freed after calling this function.

name :

the human-readable generator's name

uri :

an IRI describing the generator, or NULL

version :

the version of the generator, or NULL

Returns :

a new GDataGenerator, or NULL; free with gdata_generator_free()

gdata_generator_free ()

void                gdata_generator_free                (GDataGenerator *self);

Frees a GDataGenerator and its fields.

self :

a GDataGenerator