GDataGDPhoneNumber

GDataGDPhoneNumber — GData phone number element

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <gdata/gd/gdata-gd-phone-number.h>

                    GDataGDPhoneNumber;
                    GDataGDPhoneNumberClass;
GDataGDPhoneNumber * gdata_gd_phone_number_new          (const gchar *number,
                                                         const gchar *relation_type,
                                                         const gchar *label,
                                                         const gchar *uri,
                                                         gboolean is_primary);
gint                gdata_gd_phone_number_compare       (const GDataGDPhoneNumber *a,
                                                         const GDataGDPhoneNumber *b);
const gchar *       gdata_gd_phone_number_get_number    (GDataGDPhoneNumber *self);
void                gdata_gd_phone_number_set_number    (GDataGDPhoneNumber *self,
                                                         const gchar *number);
const gchar *       gdata_gd_phone_number_get_uri       (GDataGDPhoneNumber *self);
void                gdata_gd_phone_number_set_uri       (GDataGDPhoneNumber *self,
                                                         const gchar *uri);
const gchar *       gdata_gd_phone_number_get_relation_type
                                                        (GDataGDPhoneNumber *self);
void                gdata_gd_phone_number_set_relation_type
                                                        (GDataGDPhoneNumber *self,
                                                         const gchar *relation_type);
const gchar *       gdata_gd_phone_number_get_label     (GDataGDPhoneNumber *self);
void                gdata_gd_phone_number_set_label     (GDataGDPhoneNumber *self,
                                                         const gchar *label);
gboolean            gdata_gd_phone_number_is_primary    (GDataGDPhoneNumber *self);
void                gdata_gd_phone_number_set_is_primary
                                                        (GDataGDPhoneNumber *self,
                                                         gboolean is_primary);

Object Hierarchy

  GObject
   +----GDataParsable
         +----GDataGDPhoneNumber

Properties

  "is-primary"               gboolean              : Read / Write
  "label"                    gchar*                : Read / Write
  "number"                   gchar*                : Read / Write
  "relation-type"            gchar*                : Read / Write
  "uri"                      gchar*                : Read / Write

Description

GDataGDPhoneNumber represents a "phoneNumber" element from the GData specification.

Details

GDataGDPhoneNumber

typedef struct _GDataGDPhoneNumber GDataGDPhoneNumber;

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

Since 0.2.0


GDataGDPhoneNumberClass

typedef struct {
} GDataGDPhoneNumberClass;

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

Since 0.4.0


gdata_gd_phone_number_new ()

GDataGDPhoneNumber * gdata_gd_phone_number_new          (const gchar *number,
                                                         const gchar *relation_type,
                                                         const gchar *label,
                                                         const gchar *uri,
                                                         gboolean is_primary);

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

number :

the phone number, in human-readable format

relation_type :

the relationship between the phone number and its owner, or NULL

label :

a human-readable label for the phone number, or NULL

uri :

a "tel URI" to represent the number formally (see RFC 3966), or NULL

is_primary :

TRUE if this phone number is its owner's primary number, FALSE otherwise

Returns :

a new GDataGDPhoneNumber, or NULL; unref with g_object_unref()

Since 0.2.0


gdata_gd_phone_number_compare ()

gint                gdata_gd_phone_number_compare       (const GDataGDPhoneNumber *a,
                                                         const GDataGDPhoneNumber *b);

Compares the two phone numbers 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 number property of the GDataGDPhoneNumbers.

a :

a GDataGDPhoneNumber, or NULL

b :

another GDataGDPhoneNumber, or NULL

Returns :

0 if a equals b, -1 or 1 as appropriate otherwise

Since 0.4.0


gdata_gd_phone_number_get_number ()

const gchar *       gdata_gd_phone_number_get_number    (GDataGDPhoneNumber *self);

Gets the "number" property.

self :

a GDataGDPhoneNumber

Returns :

the phone number itself

Since 0.4.0


gdata_gd_phone_number_set_number ()

void                gdata_gd_phone_number_set_number    (GDataGDPhoneNumber *self,
                                                         const gchar *number);

Sets the "number" property to number.

self :

a GDataGDPhoneNumber

number :

the new phone number

Since 0.4.0


gdata_gd_phone_number_get_uri ()

const gchar *       gdata_gd_phone_number_get_uri       (GDataGDPhoneNumber *self);

Gets the "uri" property.

self :

a GDataGDPhoneNumber

Returns :

the phone number's URI, or NULL

Since 0.4.0


gdata_gd_phone_number_set_uri ()

void                gdata_gd_phone_number_set_uri       (GDataGDPhoneNumber *self,
                                                         const gchar *uri);

Sets the "uri" property to uri.

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

self :

a GDataGDPhoneNumber

uri :

the new URI for the phone number, or NULL

Since 0.4.0


gdata_gd_phone_number_get_relation_type ()

const gchar *       gdata_gd_phone_number_get_relation_type
                                                        (GDataGDPhoneNumber *self);

Gets the "relation-type" property.

self :

a GDataGDPhoneNumber

Returns :

the phone number's relation type, or NULL

Since 0.4.0


gdata_gd_phone_number_set_relation_type ()

void                gdata_gd_phone_number_set_relation_type
                                                        (GDataGDPhoneNumber *self,
                                                         const gchar *relation_type);

Sets the "relation-type" property to relation_type.

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

self :

a GDataGDPhoneNumber

relation_type :

the new relation type for the phone number, or NULL

Since 0.4.0


gdata_gd_phone_number_get_label ()

const gchar *       gdata_gd_phone_number_get_label     (GDataGDPhoneNumber *self);

Gets the "label" property.

self :

a GDataGDPhoneNumber

Returns :

the phone number's label, or NULL

Since 0.4.0


gdata_gd_phone_number_set_label ()

void                gdata_gd_phone_number_set_label     (GDataGDPhoneNumber *self,
                                                         const gchar *label);

Sets the "label" property to label.

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

self :

a GDataGDPhoneNumber

label :

the new label for the phone number, or NULL

Since 0.4.0


gdata_gd_phone_number_is_primary ()

gboolean            gdata_gd_phone_number_is_primary    (GDataGDPhoneNumber *self);

Gets the "is-primary" property.

self :

a GDataGDPhoneNumber

Returns :

TRUE if this is the primary phone number, FALSE otherwise

Since 0.4.0


gdata_gd_phone_number_set_is_primary ()

void                gdata_gd_phone_number_set_is_primary
                                                        (GDataGDPhoneNumber *self,
                                                         gboolean is_primary);

Sets the "is-primary" property to is_primary.

self :

a GDataGDPhoneNumber

is_primary :

TRUE if this is the primary phone number, FALSE otherwise

Since 0.4.0

Property Details

The "is-primary" property

  "is-primary"               gboolean              : Read / Write

Indicates which phone number out of a group is primary.

For more information, see the GData specification.

Default value: FALSE

Since 0.4.0


The "label" property

  "label"                    gchar*                : Read / Write

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.

Default value: NULL

Since 0.4.0


The "number" property

  "number"                   gchar*                : Read / Write

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

For more information, see the GData specification.

Default value: NULL

Since 0.4.0


The "relation-type" property

  "relation-type"            gchar*                : Read / Write

A programmatic value that identifies the type of phone number.

For more information, see the GData specification.

Default value: NULL

Since 0.4.0


The "uri" property

  "uri"                      gchar*                : Read / Write

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.

Default value: NULL

Since 0.4.0