GData.GContactRelation

g GData.GContactRelation GData.GContactRelation GData.Parsable GData.Parsable GData.Parsable->GData.GContactRelation GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

None

Methods

Inherited:

GData.Parsable (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (name, relation_type, label)

get_label ()

get_name ()

get_relation_type ()

set_label (label)

set_name (name)

set_relation_type (relation_type)

Virtual Methods

Inherited:

GData.Parsable (9), GObject.Object (7)

Properties

Inherited:

GData.Parsable (1)

Name

Type

Flags

Short Description

label

str

r/w

A free-form string that identifies the type of relation.

name

str

r/w

The name of the relation.

relation-type

str

r/w

A programmatic value that identifies the type of relation.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Parsable

r

Class Details

class GData.GContactRelation(**kwargs)
Bases:

GData.Parsable

Abstract:

No

Structure:

GData.GContactRelationClass

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

New in version 0.7.0.

classmethod new(name, relation_type, label)
Parameters:
  • name (str) – the name of the relation

  • relation_type (str or None) – the type of relation, or None

  • label (str or None) – a free-form label for the type of relation, or None

Returns:

a new GData.GContactRelation; unref with GObject.Object.unref()

Return type:

GData.GContactRelation

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

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

New in version 0.7.0.

get_label()
Returns:

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

Return type:

str

Gets the GData.GContactRelation :label property.

New in version 0.7.0.

get_name()
Returns:

the relation’s name

Return type:

str

Gets the GData.GContactRelation :name property.

New in version 0.7.0.

get_relation_type()
Returns:

the type of the relation, or None

Return type:

str

Gets the GData.GContactRelation :relation-type property.

New in version 0.7.0.

set_label(label)
Parameters:

label (str or None) – the new free-form type for the relation, or None

Sets the GData.GContactRelation :label property to label.

If label is None, the label will be unset. When the GData.GContactRelation is used in a query, however, exactly one of GData.GContactRelation :relation-type and GData.GContactRelation :label must be None.

New in version 0.7.0.

set_name(name)
Parameters:

name (str or None) – the new name for the relation

Sets the GData.GContactRelation :name property to name.

New in version 0.7.0.

set_relation_type(relation_type)
Parameters:

relation_type (str or None) – the new type for the relation, or None

Sets the GData.GContactRelation :relation-type property to relation_type, such as GData.GCONTACT_RELATION_MANAGER or GData.GCONTACT_RELATION_CHILD.

If relation_type is None, the relation type will be unset. When the GData.GContactRelation is used in a query, however, exactly one of GData.GContactRelation :relation-type and GData.GContactRelation :label must be None.

New in version 0.7.0.

Property Details

GData.GContactRelation.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A free-form string that identifies the type of relation. It is mutually exclusive with GData.GContactRelation :relation-type.

For more information, see the

gContact specification.

New in version 0.7.0.

GData.GContactRelation.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

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.

New in version 0.7.0.

GData.GContactRelation.props.relation_type
Name:

relation-type

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A programmatic value that identifies the type of relation. It is mutually exclusive with GData.GContactRelation :label. Examples are GData.GCONTACT_RELATION_MANAGER or GData.GCONTACT_RELATION_CHILD.

For more information, see the

gContact specification.

New in version 0.7.0.