GDataGContactRelation

GDataGContactRelation — gContact relation element

Stability Level

Stable, unless otherwise indicated

Properties

gchar * label Read / Write
gchar * name Read / Write
gchar * relation-type Read / Write

Object Hierarchy

    GObject
    ╰── GDataParsable
        ╰── GDataGContactRelation

Includes

#include <gdata/gcontact/gdata-gcontact-relation.h>

Description

GDataGContactRelation represents a "relation" element from the

gContact specification.

Functions

gdata_gcontact_relation_new ()

GDataGContactRelation *
gdata_gcontact_relation_new (const gchar *name,
                             const gchar *relation_type,
                             const gchar *label);

Creates a new GDataGContactRelation. More information is available in the gContact specification.

Exactly one of relation_type and label should be provided; the other must be NULL.

Parameters

name

the name of the relation

 

relation_type

the type of relation, or NULL.

[allow-none]

label

a free-form label for the type of relation, or NULL.

[allow-none]

Returns

a new GDataGContactRelation; unref with g_object_unref()

Since 0.7.0


gdata_gcontact_relation_get_name ()

const gchar *
gdata_gcontact_relation_get_name (GDataGContactRelation *self);

Gets the “name” property.

Parameters

Returns

the relation's name

Since 0.7.0


gdata_gcontact_relation_set_name ()

void
gdata_gcontact_relation_set_name (GDataGContactRelation *self,
                                  const gchar *name);

Sets the “name” property to name .

Parameters

self

a GDataGContactRelation

 

name

the new name for the relation.

[allow-none]

Since 0.7.0


gdata_gcontact_relation_get_relation_type ()

const gchar *
gdata_gcontact_relation_get_relation_type
                               (GDataGContactRelation *self);

Gets the “relation-type” property.

Parameters

Returns

the type of the relation, or NULL

Since 0.7.0


gdata_gcontact_relation_set_relation_type ()

void
gdata_gcontact_relation_set_relation_type
                               (GDataGContactRelation *self,
                                const gchar *relation_type);

Sets the “relation-type” property to relation_type , such as GDATA_GCONTACT_RELATION_MANAGER or GDATA_GCONTACT_RELATION_CHILD.

If relation_type is NULL, the relation type will be unset. When the GDataGContactRelation is used in a query, however, exactly one of “relation-type” and “label” must be NULL.

Parameters

self

a GDataGContactRelation

 

relation_type

the new type for the relation, or NULL.

[allow-none]

Since 0.7.0


gdata_gcontact_relation_get_label ()

const gchar *
gdata_gcontact_relation_get_label (GDataGContactRelation *self);

Gets the “label” property.

Parameters

Returns

a free-form label for the type of the relation, or NULL

Since 0.7.0


gdata_gcontact_relation_set_label ()

void
gdata_gcontact_relation_set_label (GDataGContactRelation *self,
                                   const gchar *label);

Sets the “label” property to label .

If label is NULL, the label will be unset. When the GDataGContactRelation is used in a query, however, exactly one of “relation-type” and “label” must be NULL.

Parameters

self

a GDataGContactRelation

 

label

the new free-form type for the relation, or NULL.

[allow-none]

Since 0.7.0

Types and Values

GDATA_GCONTACT_RELATION_ASSISTANT

#define GDATA_GCONTACT_RELATION_ASSISTANT "assistant"

The relation type URI for a contact's assistant.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_BROTHER

#define GDATA_GCONTACT_RELATION_BROTHER "brother"

The relation type URI for a contact's brother.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_CHILD

#define GDATA_GCONTACT_RELATION_CHILD "child"

The relation type URI for a contact's child.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_DOMESTIC_PARTNER

#define GDATA_GCONTACT_RELATION_DOMESTIC_PARTNER "domestic-partner"

The relation type URI for a contact's domestic partner.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_FATHER

#define GDATA_GCONTACT_RELATION_FATHER "father"

The relation type URI for a contact's father.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_FRIEND

#define GDATA_GCONTACT_RELATION_FRIEND "friend"

The relation type URI for a contact's friend.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_MANAGER

#define GDATA_GCONTACT_RELATION_MANAGER "manager"

The relation type URI for a contact's manager.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_MOTHER

#define GDATA_GCONTACT_RELATION_MOTHER "mother"

The relation type URI for a contact's mother.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_PARENT

#define GDATA_GCONTACT_RELATION_PARENT "parent"

The relation type URI for a contact's parent.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_PARTNER

#define GDATA_GCONTACT_RELATION_PARTNER "partner"

The relation type URI for a contact's business partner.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_REFERRER

#define GDATA_GCONTACT_RELATION_REFERRER "referred-by"

The relation type URI for a contact's referrer.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_RELATIVE

#define GDATA_GCONTACT_RELATION_RELATIVE "relative"

The relation type URI for a contact's (general) family relative.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_SISTER

#define GDATA_GCONTACT_RELATION_SISTER "sister"

The relation type URI for a contact's sister.

For more information, see the gContact specification.

Since 0.7.0


GDATA_GCONTACT_RELATION_SPOUSE

#define GDATA_GCONTACT_RELATION_SPOUSE "spouse"

The relation type URI for a contact's spouse.

For more information, see the gContact specification.

Since 0.7.0


GDataGContactRelation

typedef struct _GDataGContactRelation GDataGContactRelation;

All the fields in the GDataGContactRelation structure are private and should never be accessed directly.

Since 0.7.0


GDataGContactRelationClass

typedef struct {
} GDataGContactRelationClass;

All the fields in the GDataGContactRelationClass structure are private and should never be accessed directly.

Since 0.7.0

Property Details

The “label” property

  “label”                    gchar *

A free-form string that identifies the type of relation. It is mutually exclusive with “relation-type”.

For more information, see the

gContact specification.

Flags: Read / Write

Default value: NULL

Since 0.7.0


The “name” property

  “name”                     gchar *

The name of the relation. It need not be a full name, and there need not be a contact representing the name.

For more information, see the

gContact specification.

Flags: Read / Write

Default value: NULL

Since 0.7.0


The “relation-type” property

  “relation-type”            gchar *

A programmatic value that identifies the type of relation. It is mutually exclusive with “label”. Examples are GDATA_GCONTACT_RELATION_MANAGER or GDATA_GCONTACT_RELATION_CHILD.

For more information, see the

gContact specification.

Flags: Read / Write

Default value: NULL

Since 0.7.0