## GDataGDPostalAddress

GDataGDPostalAddress — GData postal address element

## Stability Level

Stable, unless otherwise indicated

## Functions

GDataGDPostalAddress * | gdata_gd_postal_address_new ()
const gchar * | gdata_gd_postal_address_get_address ()
void | gdata_gd_postal_address_set_address ()
const gchar * | gdata_gd_postal_address_get_relation_type ()
void | gdata_gd_postal_address_set_relation_type ()
const gchar * | gdata_gd_postal_address_get_label ()
void | gdata_gd_postal_address_set_label ()
gboolean | gdata_gd_postal_address_is_primary ()
void | gdata_gd_postal_address_set_is_primary ()
const gchar * | gdata_gd_postal_address_get_mail_class ()
void | gdata_gd_postal_address_set_mail_class ()
const gchar * | gdata_gd_postal_address_get_usage ()
void | gdata_gd_postal_address_set_usage ()
const gchar * | gdata_gd_postal_address_get_agent ()
void | gdata_gd_postal_address_set_agent ()
const gchar * | gdata_gd_postal_address_get_house_name ()
void | gdata_gd_postal_address_set_house_name ()
const gchar * | gdata_gd_postal_address_get_street ()
void | gdata_gd_postal_address_set_street ()
const gchar * | gdata_gd_postal_address_get_po_box ()
void | gdata_gd_postal_address_set_po_box ()
const gchar * | gdata_gd_postal_address_get_neighborhood ()
void | gdata_gd_postal_address_set_neighborhood ()
const gchar * | gdata_gd_postal_address_get_city ()
void | gdata_gd_postal_address_set_city ()
const gchar * | gdata_gd_postal_address_get_subregion ()
void | gdata_gd_postal_address_set_subregion ()
const gchar * | gdata_gd_postal_address_get_region ()
void | gdata_gd_postal_address_set_region ()
const gchar * | gdata_gd_postal_address_get_postcode ()
void | gdata_gd_postal_address_set_postcode ()
const gchar * | gdata_gd_postal_address_get_country ()
const gchar * | gdata_gd_postal_address_get_country_code ()
void | gdata_gd_postal_address_set_country ()

## Properties

char * | address | Read / Write
char * | agent | Read / Write
char * | city | Read / Write
char * | country | Read
char * | country-code | Read
char * | house-name | Read / Write
gboolean | is-primary | Read / Write
char * | label | Read / Write
char * | mail-class | Read / Write
char * | neighborhood | Read / Write
char * | po-box | Read / Write
char * | postcode | Read / Write
char * | region | Read / Write
char * | relation-type | Read / Write
char * | street | Read / Write
char * | subregion | Read / Write
char * | usage | Read / Write

## Types and Values

#define | GDATA_GD_POSTAL_ADDRESS_WORK
#define | GDATA_GD_POSTAL_ADDRESS_HOME
#define | GDATA_GD_POSTAL_ADDRESS_OTHER
#define | GDATA_GD_ADDRESS_USAGE_GENERAL
#define | GDATA_GD_ADDRESS_USAGE_LOCAL
#define | GDATA_GD_MAIL_CLASS_BOTH
#define | GDATA_GD_MAIL_CLASS_LETTERS
#define | GDATA_GD_MAIL_CLASS_NEITHER
#define | GDATA_GD_MAIL_CLASS_PARCELS
| GDataGDPostalAddress
| GDataGDPostalAddressClass

## Object Hierarchy

        GObject
        ╰── GDataParsable
            ╰── GDataGDPostalAddress

## Implemented Interfaces

GDataGDPostalAddress implements GDataComparable.

## Includes

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

## Description

GDataGDPostalAddress represents a "structuredPostalAddress" element from the

GData specification.

Note that it does not represent a simple "postalAddress" element, as "structuredPostalAddress" is now used wherever possible in the GData API.

## Functions

### gdata_gd_postal_address_new ()

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

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

#### Parameters

relation_type | the relationship between the address and its owner, or `NULL`. | [allow-none]
label | a human-readable label for the address, or `NULL`. | [allow-none]
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_get_address ()

    const gchar *
    gdata_gd_postal_address_get_address (GDataGDPostalAddress *self);

Gets the “address” property.

#### Parameters

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` .

#### Parameters

self | a GDataGDPostalAddress |
address | the new postal address, or `NULL`. | [allow-none]

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.

#### Parameters

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.

#### Parameters

self | a GDataGDPostalAddress |
relation_type | the new relation type for the postal_address, or `NULL`. | [allow-none]

Since: 0.4.0

### gdata_gd_postal_address_get_label ()

    const gchar *
    gdata_gd_postal_address_get_label (GDataGDPostalAddress *self);

Gets the “label” property.

#### Parameters

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.

#### Parameters

self | a GDataGDPostalAddress |
label | the new label for the postal address, or `NULL`. | [allow-none]

Since: 0.4.0

### gdata_gd_postal_address_is_primary ()

    gboolean
    gdata_gd_postal_address_is_primary (GDataGDPostalAddress *self);

Gets the “is-primary” property.

#### Parameters

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` .

#### Parameters

self | a GDataGDPostalAddress |
is_primary | `TRUE` if this is the primary postal address, `FALSE` otherwise |

Since: 0.4.0

### gdata_gd_postal_address_get_mail_class ()

    const gchar *
    gdata_gd_postal_address_get_mail_class
                                   (GDataGDPostalAddress *self);

Gets the “mail-class” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' mail class, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_mail_class ()

    void
    gdata_gd_postal_address_set_mail_class
                                   (GDataGDPostalAddress *self,
                                    const gchar *mail_class);

Sets the “mail-class” property to `mail_class` .

Set `mail_class` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
mail_class | the new mail class for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_usage ()

    const gchar *
    gdata_gd_postal_address_get_usage (GDataGDPostalAddress *self);

Gets the “usage” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' usage, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_usage ()

    void
    gdata_gd_postal_address_set_usage (GDataGDPostalAddress *self,
                                       const gchar *usage);

Sets the “usage” property to `usage` .

Set `usage` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
usage | the new usage for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_agent ()

    const gchar *
    gdata_gd_postal_address_get_agent (GDataGDPostalAddress *self);

Gets the “agent” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' agent, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_agent ()

    void
    gdata_gd_postal_address_set_agent (GDataGDPostalAddress *self,
                                       const gchar *agent);

Sets the “agent” property to `agent` .

Set `agent` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
agent | the new agent for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_house_name ()

    const gchar *
    gdata_gd_postal_address_get_house_name
                                   (GDataGDPostalAddress *self);

Gets the “house-name” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' house name, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_house_name ()

    void
    gdata_gd_postal_address_set_house_name
                                   (GDataGDPostalAddress *self,
                                    const gchar *house_name);

Sets the “house-name” property to `house_name` .

Set `house_name` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
house_name | the new house name for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_street ()

    const gchar *
    gdata_gd_postal_address_get_street (GDataGDPostalAddress *self);

Gets the “street” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' street, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_street ()

    void
    gdata_gd_postal_address_set_street (GDataGDPostalAddress *self,
                                        const gchar *street);

Sets the “street” property to `street` .

Set `street` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
street | the new street for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_po_box ()

    const gchar *
    gdata_gd_postal_address_get_po_box (GDataGDPostalAddress *self);

Gets the “po-box” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' P.O. box, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_po_box ()

    void
    gdata_gd_postal_address_set_po_box (GDataGDPostalAddress *self,
                                        const gchar *po_box);

Sets the “po-box” property to `po_box` .

Set `po_box` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
po_box | the new P.O. box for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_neighborhood ()

    const gchar *
    gdata_gd_postal_address_get_neighborhood
                                   (GDataGDPostalAddress *self);

Gets the “neighborhood” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' neighborhood, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_neighborhood ()

    void
    gdata_gd_postal_address_set_neighborhood
                                   (GDataGDPostalAddress *self,
                                    const gchar *neighborhood);

Sets the “neighborhood” property to `neighborhood` .

Set `neighborhood` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
neighborhood | the new neighborhood for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_city ()

    const gchar *
    gdata_gd_postal_address_get_city (GDataGDPostalAddress *self);

Gets the “city” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' city, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_city ()

    void
    gdata_gd_postal_address_set_city (GDataGDPostalAddress *self,
                                      const gchar *city);

Sets the “city” property to `city` .

Set `city` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
city | the new city for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_subregion ()

    const gchar *
    gdata_gd_postal_address_get_subregion (GDataGDPostalAddress *self);

Gets the “subregion” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' subregion, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_subregion ()

    void
    gdata_gd_postal_address_set_subregion (GDataGDPostalAddress *self,
                                           const gchar *subregion);

Sets the “subregion” property to `subregion` .

Set `subregion` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
subregion | the new subregion for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_region ()

    const gchar *
    gdata_gd_postal_address_get_region (GDataGDPostalAddress *self);

Gets the “region” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' region, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_region ()

    void
    gdata_gd_postal_address_set_region (GDataGDPostalAddress *self,
                                        const gchar *region);

Sets the “region” property to `region` .

Set `region` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
region | the new region for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_postcode ()

    const gchar *
    gdata_gd_postal_address_get_postcode (GDataGDPostalAddress *self);

Gets the “postcode” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' postcode, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_postcode ()

    void
    gdata_gd_postal_address_set_postcode (GDataGDPostalAddress *self,
                                          const gchar *postcode);

Sets the “postcode” property to `postcode` .

Set `postcode` to `NULL` to unset the property in the postal address.

#### Parameters

self | a GDataGDPostalAddress |
postcode | the new postcode for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

### gdata_gd_postal_address_get_country ()

    const gchar *
    gdata_gd_postal_address_get_country (GDataGDPostalAddress *self);

Gets the “country” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' country, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_get_country_code ()

    const gchar *
    gdata_gd_postal_address_get_country_code
                                   (GDataGDPostalAddress *self);

Gets the “country-code” property.

#### Parameters

self | a GDataGDPostalAddress |

#### Returns

the postal address' ISO 3166-1 alpha-2 country code, or `NULL`

Since: 0.5.0

### gdata_gd_postal_address_set_country ()

    void
    gdata_gd_postal_address_set_country (GDataGDPostalAddress *self,
                                         const gchar *country,
                                         const gchar *country_code);

Sets the “country” property to `country` , and “country-code” to `country_code` .

Set `country` or `country_code` to `NULL` to unset the relevant property in the postal address. If a `country_code` is provided, a `country` must also be provided.

#### Parameters

self | a GDataGDPostalAddress |
country | the new country for the postal address, or `NULL`. | [allow-none]
country_code | the new country code for the postal address, or `NULL`. | [allow-none]

Since: 0.5.0

## Types and Values

### GDATA_GD_POSTAL_ADDRESS_WORK

    #define GDATA_GD_POSTAL_ADDRESS_WORK "http://schemas.google.com/g/2005#work"

The relation type URI for the postal address of a workplace.

Since: 0.7.0

### GDATA_GD_POSTAL_ADDRESS_HOME

    #define GDATA_GD_POSTAL_ADDRESS_HOME "http://schemas.google.com/g/2005#home"

The relation type URI for the postal address of a home.

Since: 0.7.0

### GDATA_GD_POSTAL_ADDRESS_OTHER

    #define GDATA_GD_POSTAL_ADDRESS_OTHER "http://schemas.google.com/g/2005#other"

The relation type URI for a miscellaneous postal address.

Since: 0.7.0

### GDATA_GD_ADDRESS_USAGE_GENERAL

    #define GDATA_GD_ADDRESS_USAGE_GENERAL "http://schemas.google.com/g/2005#general"

The address is for general usage. Value for “usage”.

Since: 0.5.0

### GDATA_GD_ADDRESS_USAGE_LOCAL

    #define GDATA_GD_ADDRESS_USAGE_LOCAL "http://schemas.google.com/g/2005#local"

The address is for local usage. Value for “usage”.

Since: 0.5.0

### GDATA_GD_MAIL_CLASS_BOTH

    #define GDATA_GD_MAIL_CLASS_BOTH "http://schemas.google.com/g/2005#both"

Parcels and letters can be sent to the address. Value for “mail-class”.

Since: 0.5.0

### GDATA_GD_MAIL_CLASS_LETTERS

    #define GDATA_GD_MAIL_CLASS_LETTERS "http://schemas.google.com/g/2005#letters"

Only letters can be sent to the address. Value for “mail-class”.

Since: 0.5.0

### GDATA_GD_MAIL_CLASS_NEITHER

    #define GDATA_GD_MAIL_CLASS_NEITHER "http://schemas.google.com/g/2005#neither"

Address is purely locational and cannot be used for mail. Value for “mail-class”.

Since: 0.5.0

### GDATA_GD_MAIL_CLASS_PARCELS

    #define GDATA_GD_MAIL_CLASS_PARCELS "http://schemas.google.com/g/2005#parcels"

Only parcels can be sent to the address. Value for “mail-class”.

Since: 0.5.0

### GDataGDPostalAddress

    typedef struct _GDataGDPostalAddress GDataGDPostalAddress;

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

Since: 0.2.0

### GDataGDPostalAddressClass

    typedef struct {
    } GDataGDPostalAddressClass;

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

Since: 0.4.0

## Property Details

### The `“address”` property

      “address”                  char *

The postal address itself, formatted and unstructured. It is preferred to use the other, structured properties rather than this one.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.4.0

### The `“agent”` property

      “agent”                    char *

The agent who actually receives the mail. Used in work addresses. Also for "in care of" or "c/o".

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.5.0

### The `“city”` property

      “city”                     char *

Can be city, village, town, borough, etc. This is the postal town and not necessarily the place of residence or place of business.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.5.0

### The `“country”` property

      “country”                  char *

The name of the country. Since this is paired with “country-code”, they must both be set with `gdata_gd_postal_address_set_country()`.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read

Default value: NULL

Since: 0.5.0

### The `“country-code”` property

      “country-code”             char *

The ISO 3166-1 alpha-2 country code for the country in “country”. Since this is paired with “country”, they must both be set with `gdata_gd_postal_address_set_country()`.

For more information, see the

GData specification

or ISO 3166-1 alpha-2.

Owner: GDataGDPostalAddress

Flags: Read

Default value: NULL

Since: 0.5.0

### The `“house-name”` property

      “house-name”               char *

Used in places where houses or buildings have names (and not necessarily numbers).

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.5.0

### The `“is-primary”` property

      “is-primary”               gboolean

Indicates which postal address out of a group is primary.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: FALSE

Since: 0.4.0

### The `“label”` property

      “label”                    char *

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.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.4.0

### The `“mail-class”` property

      “mail-class”               char *

Classes of mail accepted at this address. For example: `GDATA_GD_MAIL_CLASS_LETTERS` or `GDATA_GD_MAIL_CLASS_BOTH`.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: "http://schemas.google.com/g/2005#both"

Since: 0.5.0

### The `“neighborhood”` property

      “neighborhood”             char *

This is used to disambiguate a street address when a city contains more than one street with the same name, or to specify a small place whose mail is routed through a larger postal town. In China it could be a county or a minor city.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.5.0

### The `“po-box”` property

      “po-box”                   char *

Covers actual P.O. boxes, drawers, locked bags, etc. This is usually but not always mutually exclusive with “street”.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.5.0

### The `“postcode”` property

      “postcode”                 char *

Postal code. Usually country-wide, but sometimes specific to the city (e.g. "2" in "Dublin 2, Ireland" addresses).

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.5.0

### The `“region”` property

      “region”                   char *

A state, province, county (in Ireland), Land (in Germany), departement (in France), etc.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.5.0

### The `“relation-type”` property

      “relation-type”            char *

A programmatic value that identifies the type of postal address. For example: `GDATA_GD_POSTAL_ADDRESS_WORK` or `GDATA_GD_POSTAL_ADDRESS_OTHER`.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: "http://schemas.google.com/g/2005#work"

Since: 0.4.0

### The `“street”` property

      “street”                   char *

Can be street, avenue, road, etc. This element also includes the house number and room/apartment/flat/floor number.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.5.0

### The `“subregion”` property

      “subregion”                char *

Handles administrative districts such as U.S. or U.K. counties that are not used for mail addressing purposes. Subregion is not intended for delivery addresses.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: NULL

Since: 0.5.0

### The `“usage”` property

      “usage”                    char *

The context in which this address can be used. For example: `GDATA_GD_ADDRESS_USAGE_GENERAL` or `GDATA_GD_ADDRESS_USAGE_LOCAL`.

For more information, see the

GData specification.

Owner: GDataGDPostalAddress

Flags: Read / Write

Default value: "http://schemas.google.com/g/2005#general"

Since: 0.5.0