GDataGDPostalAddress

GDataGDPostalAddress — GData postal address element

Stability Level

Unstable, unless otherwise indicated

Synopsis

#include <gdata/gd/gdata-gd-postal-address.h>

                    GDataGDPostalAddress;
                    GDataGDPostalAddressClass;
GDataGDPostalAddress * gdata_gd_postal_address_new      (const gchar *address,
                                                         const gchar *relation_type,
                                                         const gchar *label,
                                                         gboolean is_primary);
gint                gdata_gd_postal_address_compare     (const GDataGDPostalAddress *a,
                                                         const GDataGDPostalAddress *b);
const gchar *       gdata_gd_postal_address_get_address (GDataGDPostalAddress *self);
void                gdata_gd_postal_address_set_address (GDataGDPostalAddress *self,
                                                         const gchar *address);
const gchar *       gdata_gd_postal_address_get_relation_type
                                                        (GDataGDPostalAddress *self);
void                gdata_gd_postal_address_set_relation_type
                                                        (GDataGDPostalAddress *self,
                                                         const gchar *relation_type);
const gchar *       gdata_gd_postal_address_get_label   (GDataGDPostalAddress *self);
void                gdata_gd_postal_address_set_label   (GDataGDPostalAddress *self,
                                                         const gchar *label);
gboolean            gdata_gd_postal_address_is_primary  (GDataGDPostalAddress *self);
void                gdata_gd_postal_address_set_is_primary
                                                        (GDataGDPostalAddress *self,
                                                         gboolean is_primary);

Object Hierarchy

  GObject
   +----GDataParsable
         +----GDataGDPostalAddress

Properties

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

Description

GDataGDPostalAddress represents an "postal" element from the GData specification.

Details

GDataGDPostalAddress

typedef struct _GDataGDPostalAddress GDataGDPostalAddress;

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


GDataGDPostalAddressClass

typedef struct {
} GDataGDPostalAddressClass;

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

Since 0.4.0


gdata_gd_postal_address_new ()

GDataGDPostalAddress * gdata_gd_postal_address_new      (const gchar *address,
                                                         const gchar *relation_type,
                                                         const gchar *label,
                                                         gboolean is_primary);

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

address :

the postal address, in human-readable format (new lines are significant)

relation_type :

the relationship between the address and its owner, or NULL

label :

a human-readable label for the address, or NULL

is_primary :

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

Returns :

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

Since 0.2.0


gdata_gd_postal_address_compare ()

gint                gdata_gd_postal_address_compare     (const GDataGDPostalAddress *a,
                                                         const GDataGDPostalAddress *b);

Compares the two postal addresses 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 address property of the GDataGDPostalAddresses.

a :

a GDataGDPostalAddress, or NULL

b :

another GDataGDPostalAddress, or NULL

Returns :

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

Since 0.4.0


gdata_gd_postal_address_get_address ()

const gchar *       gdata_gd_postal_address_get_address (GDataGDPostalAddress *self);

Gets the "address" property.

self :

a GDataGDPostalAddress

Returns :

the postal address itself, or NULL

Since 0.4.0


gdata_gd_postal_address_set_address ()

void                gdata_gd_postal_address_set_address (GDataGDPostalAddress *self,
                                                         const gchar *address);

Sets the "address" property to address.

self :

a GDataGDPostalAddress

address :

the new postal address

Since 0.4.0


gdata_gd_postal_address_get_relation_type ()

const gchar *       gdata_gd_postal_address_get_relation_type
                                                        (GDataGDPostalAddress *self);

Gets the "relation-type" property.

self :

a GDataGDPostalAddress

Returns :

the postal address' relation type, or NULL

Since 0.4.0


gdata_gd_postal_address_set_relation_type ()

void                gdata_gd_postal_address_set_relation_type
                                                        (GDataGDPostalAddress *self,
                                                         const gchar *relation_type);

Sets the "relation-type" property to relation_type.

Set relation_type to NULL to unset the property in the postal address.

self :

a GDataGDPostalAddress

relation_type :

the new relation type for the postal_address, or NULL

Since 0.4.0


gdata_gd_postal_address_get_label ()

const gchar *       gdata_gd_postal_address_get_label   (GDataGDPostalAddress *self);

Gets the "label" property.

self :

a GDataGDPostalAddress

Returns :

the postal address' label, or NULL

Since 0.4.0


gdata_gd_postal_address_set_label ()

void                gdata_gd_postal_address_set_label   (GDataGDPostalAddress *self,
                                                         const gchar *label);

Sets the "label" property to label.

Set label to NULL to unset the property in the postal address.

self :

a GDataGDPostalAddress

label :

the new label for the postal address, or NULL

Since 0.4.0


gdata_gd_postal_address_is_primary ()

gboolean            gdata_gd_postal_address_is_primary  (GDataGDPostalAddress *self);

Gets the "is-primary" property.

self :

a GDataGDPostalAddress

Returns :

TRUE if this is the primary postal address, FALSE otherwise

Since 0.4.0


gdata_gd_postal_address_set_is_primary ()

void                gdata_gd_postal_address_set_is_primary
                                                        (GDataGDPostalAddress *self,
                                                         gboolean is_primary);

Sets the "is-primary" property to is_primary.

self :

a GDataGDPostalAddress

is_primary :

TRUE if this is the primary postal address, FALSE otherwise

Since 0.4.0

Property Details

The "address" property

  "address"                  gchar*                : Read / Write

The postal address itself.

For more information, see the GData specification.

Default value: NULL

Since 0.4.0


The "is-primary" property

  "is-primary"               gboolean              : Read / Write

Indicates which postal address 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 postal address. It allows UIs to display a label such as "Work", "Personal", "Preferred", etc.

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 postal address.

For more information, see the GData specification.

Default value: NULL

Since 0.4.0