![]() |
![]() |
![]() |
GData Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties |
#include <gdata/atom/gdata-link.h> GDataLink; GDataLinkClass; GDataLink * gdata_link_new (const gchar *uri
,const gchar *relation_type
); gint gdata_link_compare (const GDataLink *a
,const GDataLink *b
); const gchar * gdata_link_get_uri (GDataLink *self
); void gdata_link_set_uri (GDataLink *self
,const gchar *uri
); const gchar * gdata_link_get_relation_type (GDataLink *self
); void gdata_link_set_relation_type (GDataLink *self
,const gchar *relation_type
); const gchar * gdata_link_get_content_type (GDataLink *self
); void gdata_link_set_content_type (GDataLink *self
,const gchar *content_type
); const gchar * gdata_link_get_language (GDataLink *self
); void gdata_link_set_language (GDataLink *self
,const gchar *language
); const gchar * gdata_link_get_title (GDataLink *self
); void gdata_link_set_title (GDataLink *self
,const gchar *title
); gint gdata_link_get_length (GDataLink *self
); void gdata_link_set_length (GDataLink *self
,gint length
); #define GDATA_LINK_ALTERNATE #define GDATA_LINK_EDIT #define GDATA_LINK_EDIT_MEDIA #define GDATA_LINK_ENCLOSURE #define GDATA_LINK_RELATED #define GDATA_LINK_SELF #define GDATA_LINK_VIA
"content-type" gchar* : Read / Write "language" gchar* : Read / Write "length" gint : Read / Write "relation-type" gchar* : Read / Write "title" gchar* : Read / Write "uri" gchar* : Read / Write
typedef struct _GDataLink GDataLink;
All the fields in the GDataLink structure are private and should never be accessed directly.
typedef struct { } GDataLinkClass;
All the fields in the GDataLinkClass structure are private and should never be accessed directly.
Since 0.4.0
GDataLink * gdata_link_new (const gchar *uri
,const gchar *relation_type
);
Creates a new GDataLink. More information is available in the Atom specification.
|
the link's IRI |
|
the relationship of the link to the current document, or NULL . [allow-none]
|
Returns : |
a new GDataLink, or NULL ; unref with g_object_unref()
|
gint gdata_link_compare (const GDataLink *a
,const GDataLink *b
);
Compares the two links in a strcmp()
fashion. NULL
values are handled gracefully, with
0
returned if both a
and b
are NULL
, -1
if a
is NULL
and 1
if b
is NULL
.
The comparison of non-NULL
values is done on the basis of the uri
property of the GDataLinks.
|
a GDataLink, or NULL
|
|
another GDataLink, or NULL
|
Returns : |
0 if a equals b , -1 or 1 as
appropriate otherwise
|
Since 0.4.0
const gchar * gdata_link_get_uri (GDataLink *self
);
Gets the "uri" property. The return value is guaranteed to be a valid IRI, as
specified by the Atom protocol. Common relationship values such as alternate
are returned as http://www.iana.org/assignments/relation/alternate
.
For more information, see the Atom specification.
|
a GDataLink |
Returns : |
the link's URI |
Since 0.4.0
void gdata_link_set_uri (GDataLink *self
,const gchar *uri
);
Sets the "uri" property to uri
.
|
a GDataLink |
|
the new URI for the link |
Since 0.4.0
const gchar * gdata_link_get_relation_type (GDataLink *self
);
Gets the "relation-type" property.
|
a GDataLink |
Returns : |
the link's relation type |
Since 0.4.0
void gdata_link_set_relation_type (GDataLink *self
,const gchar *relation_type
);
Sets the "relation-type" property to relation_type
. If relation_type
is one of the standard Atom relation types,
use one of the defined relation type values, instead of a static string. e.g. GDATA_LINK_EDIT
or GDATA_LINK_SELF
.
Set relation_type
to NULL
to unset the property in the link.
|
a GDataLink |
|
the new relation type for the link, or NULL . [allow-none]
|
Since 0.4.0
const gchar * gdata_link_get_content_type (GDataLink *self
);
Gets the "content-type" property.
|
a GDataLink |
Returns : |
the link's content type, or NULL
|
Since 0.4.0
void gdata_link_set_content_type (GDataLink *self
,const gchar *content_type
);
Sets the "content-type" property to content_type
.
Set content_type
to NULL
to unset the property in the link.
|
a GDataLink |
|
the new content type for the link, or NULL . [allow-none]
|
Since 0.4.0
const gchar * gdata_link_get_language (GDataLink *self
);
Gets the "language" property.
|
a GDataLink |
Returns : |
the link's language, or NULL
|
Since 0.4.0
void gdata_link_set_language (GDataLink *self
,const gchar *language
);
Sets the "language" property to language
.
Set language
to NULL
to unset the property in the link.
|
a GDataLink |
|
the new language for the link, or NULL . [allow-none]
|
Since 0.4.0
const gchar * gdata_link_get_title (GDataLink *self
);
Gets the "title" property.
|
a GDataLink |
Returns : |
the link's title, or NULL
|
Since 0.4.0
void gdata_link_set_title (GDataLink *self
,const gchar *title
);
Sets the "title" property to title
.
Set title
to NULL
to unset the property in the link.
|
a GDataLink |
|
the new title for the link, or NULL . [allow-none]
|
Since 0.4.0
gint gdata_link_get_length (GDataLink *self
);
Gets the "length" property.
|
a GDataLink |
Returns : |
the link's length, or -1
|
Since 0.4.0
void gdata_link_set_length (GDataLink *self
,gint length
);
Sets the "length" property to length
.
Set length
to -1
to unset the property in the link.
|
a GDataLink |
|
the new length for the link, or -1
|
Since 0.4.0
#define GDATA_LINK_ALTERNATE "http://www.iana.org/assignments/relation/alternate"
The relation type URI for alternate resources to the current one.
For more information, see the Atom specification.
Since 0.4.0
#define GDATA_LINK_EDIT "http://www.iana.org/assignments/relation/edit"
The relation type URI of the edit location for this resource.
For more information, see the Atom Publishing Protocol specification.
Since 0.4.0
#define GDATA_LINK_EDIT_MEDIA "http://www.iana.org/assignments/relation/edit-media"
The relation type URI of the edit location for media resources attached to this resource.
For more information, see the Atom Publishing Protocol specification.
Since 0.4.0
#define GDATA_LINK_ENCLOSURE "http://www.iana.org/assignments/relation/enclosure"
The relation type URI for attached objects which may be large in size.
For more information, see the Atom specification.
Since 0.4.0
#define GDATA_LINK_RELATED "http://www.iana.org/assignments/relation/related"
The relation type URI for resources related to the current one.
For more information, see the Atom specification.
Since 0.4.0
#define GDATA_LINK_SELF "http://www.iana.org/assignments/relation/self"
The relation type URI for the current resource.
For more information, see the Atom specification.
Since 0.4.0
#define GDATA_LINK_VIA "http://www.iana.org/assignments/relation/via"
The relation type URI for the source document of the current resource.
For more information, see the Atom specification.
Since 0.4.0
"content-type"
property "content-type" gchar* : Read / Write
An advisory media type: it is a hint about the type of the representation that is expected to be returned when the value of the "uri" property is dereferenced.
For more information, see the Atom specification.
Default value: NULL
Since 0.4.0
"language"
property "language" gchar* : Read / Write
Describes the language of the resource pointed to by the "uri" property.
For more information, see the Atom specification.
Default value: NULL
Since 0.4.0
"length"
property "length" gint : Read / Write
Indicates an advisory length of the linked content in octets. -1
means the length is unspecified.
For more information, see the Atom specification.
Allowed values: >= G_MAXULONG
Default value: -1
Since 0.4.0
"relation-type"
property "relation-type" gchar* : Read / Write
The link relation type.
For more information, see the Atom specification.
Default value: "http://www.iana.org/assignments/relation/alternate"
Since 0.4.0
"title"
property "title" gchar* : Read / Write
Conveys human-readable information about the link.
For more information, see the Atom specification.
Default value: NULL
Since 0.4.0
"uri"
property "uri" gchar* : Read / Write
The link's IRI.
For more information, see the Atom specification.
Default value: NULL
Since 0.4.0