GData.GDPhoneNumber

g GData.Comparable GData.Comparable GData.GDPhoneNumber GData.GDPhoneNumber GData.Comparable->GData.GDPhoneNumber GData.Parsable GData.Parsable GData.Parsable->GData.GDPhoneNumber GObject.GInterface GObject.GInterface GObject.GInterface->GData.Comparable GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

None

Methods

Inherited:

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

Structs:

GObject.ObjectClass (5)

class

new (number, relation_type, label, uri, is_primary)

get_label ()

get_number ()

get_relation_type ()

get_uri ()

is_primary ()

set_is_primary (is_primary)

set_label (label)

set_number (number)

set_relation_type (relation_type)

set_uri (uri)

Virtual Methods

Inherited:

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

Properties

Inherited:

GData.Parsable (1)

Name

Type

Flags

Short Description

is-primary

bool

r/w

Indicates which phone number out of a group is primary.

label

str

r/w

A simple string value used to name this phone number.

number

str

r/w

Human-readable phone number; may be in any telephone number format.

relation-type

str

r/w

A programmatic value that identifies the type of phone number.

uri

str

r/w

An optional “tel URI” used to represent the number in a formal way.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Parsable

r

Class Details

class GData.GDPhoneNumber(**kwargs)
Bases:

GData.Parsable, GData.Comparable

Abstract:

No

Structure:

GData.GDPhoneNumberClass

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

New in version 0.2.0.

classmethod new(number, relation_type, label, uri, is_primary)
Parameters:
  • number (str) – the phone number, in human-readable format

  • relation_type (str or None) – the relationship between the phone number and its owner, or None

  • label (str or None) – a human-readable label for the phone number, or None

  • uri (str or None) –

    a “tel URI” to represent the number formally (see

    RFC 3966), or None

  • is_primary (bool) – True if this phone number is its owner’s primary number, False otherwise

Returns:

a new GData.GDPhoneNumber, or None; unref with GObject.Object.unref()

Return type:

GData.GDPhoneNumber

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

New in version 0.2.0.

get_label()
Returns:

the phone number’s label, or None

Return type:

str

Gets the GData.GDPhoneNumber :label property.

New in version 0.4.0.

get_number()
Returns:

the phone number itself

Return type:

str

Gets the GData.GDPhoneNumber :number property.

New in version 0.4.0.

get_relation_type()
Returns:

the phone number’s relation type, or None

Return type:

str

Gets the GData.GDPhoneNumber :relation-type property.

New in version 0.4.0.

get_uri()
Returns:

the phone number’s URI, or None

Return type:

str

Gets the GData.GDPhoneNumber :uri property.

New in version 0.4.0.

is_primary()
Returns:

True if this is the primary phone number, False otherwise

Return type:

bool

Gets the GData.GDPhoneNumber :is-primary property.

New in version 0.4.0.

set_is_primary(is_primary)
Parameters:

is_primary (bool) – True if this is the primary phone number, False otherwise

Sets the GData.GDPhoneNumber :is-primary property to is_primary.

New in version 0.4.0.

set_label(label)
Parameters:

label (str or None) – the new label for the phone number, or None

Sets the GData.GDPhoneNumber :label property to label.

Set label to None to unset the property in the phone number.

New in version 0.4.0.

set_number(number)
Parameters:

number (str) – the new phone number

Sets the GData.GDPhoneNumber :number property to number.

New in version 0.4.0.

set_relation_type(relation_type)
Parameters:

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

Sets the GData.GDPhoneNumber :relation-type property to relation_type.

Set relation_type to None to unset the property in the phone number.

New in version 0.4.0.

set_uri(uri)
Parameters:

uri (str or None) – the new URI for the phone number, or None

Sets the GData.GDPhoneNumber :uri property to uri.

Set uri to None to unset the property in the phone number.

New in version 0.4.0.

Property Details

GData.GDPhoneNumber.props.is_primary
Name:

is-primary

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Indicates which phone number out of a group is primary.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDPhoneNumber.props.label
Name:

label

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A simple string value used to name this phone number. It allows UIs to display a label such as “Mobile”, “Home”, “Work”, etc.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDPhoneNumber.props.number
Name:

number

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Human-readable phone number; may be in any telephone number format.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDPhoneNumber.props.relation_type
Name:

relation-type

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A programmatic value that identifies the type of phone number. For example: GData.GD_PHONE_NUMBER_WORK or GData.GD_PHONE_NUMBER_PAGER.

For more information, see the

GData specification.

New in version 0.4.0.

GData.GDPhoneNumber.props.uri
Name:

uri

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

An optional “tel URI” used to represent the number in a formal way. Useful for programmatic access, such as a VoIP/PSTN bridge.

For more information, see the

GData specification.

New in version 0.4.0.