Top |
Functions
Properties
gchar * | address | Read / Write |
gchar * | agent | Read / Write |
gchar * | city | Read / Write |
gchar * | country | Read |
gchar * | country-code | Read |
gchar * | house-name | Read / Write |
gboolean | is-primary | Read / Write |
gchar * | label | Read / Write |
gchar * | mail-class | Read / Write |
gchar * | neighborhood | Read / Write |
gchar * | po-box | Read / Write |
gchar * | postcode | Read / Write |
gchar * | region | Read / Write |
gchar * | relation-type | Read / Write |
gchar * | street | Read / Write |
gchar * | subregion | Read / Write |
gchar * | 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 |
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.
Since: 0.2.0
gdata_gd_postal_address_get_address ()
const gchar *
gdata_gd_postal_address_get_address (GDataGDPostalAddress *self
);
Gets the “address” property.
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
.
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.
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.
Since: 0.4.0
gdata_gd_postal_address_get_label ()
const gchar *
gdata_gd_postal_address_get_label (GDataGDPostalAddress *self
);
Gets the “label” property.
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.
Since: 0.4.0
gdata_gd_postal_address_is_primary ()
gboolean
gdata_gd_postal_address_is_primary (GDataGDPostalAddress *self
);
Gets the “is-primary” property.
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
.
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.
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.
Since: 0.5.0
gdata_gd_postal_address_get_usage ()
const gchar *
gdata_gd_postal_address_get_usage (GDataGDPostalAddress *self
);
Gets the “usage” property.
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.
Since: 0.5.0
gdata_gd_postal_address_get_agent ()
const gchar *
gdata_gd_postal_address_get_agent (GDataGDPostalAddress *self
);
Gets the “agent” property.
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.
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.
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.
Since: 0.5.0
gdata_gd_postal_address_get_street ()
const gchar *
gdata_gd_postal_address_get_street (GDataGDPostalAddress *self
);
Gets the “street” property.
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.
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.
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.
Since: 0.5.0
gdata_gd_postal_address_get_neighborhood ()
const gchar *
gdata_gd_postal_address_get_neighborhood
(GDataGDPostalAddress *self
);
Gets the “neighborhood” property.
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.
Since: 0.5.0
gdata_gd_postal_address_get_city ()
const gchar *
gdata_gd_postal_address_get_city (GDataGDPostalAddress *self
);
Gets the “city” property.
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.
Since: 0.5.0
gdata_gd_postal_address_get_subregion ()
const gchar *
gdata_gd_postal_address_get_subregion (GDataGDPostalAddress *self
);
Gets the “subregion” property.
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.
Since: 0.5.0
gdata_gd_postal_address_get_region ()
const gchar *
gdata_gd_postal_address_get_region (GDataGDPostalAddress *self
);
Gets the “region” property.
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.
Since: 0.5.0
gdata_gd_postal_address_get_postcode ()
const gchar *
gdata_gd_postal_address_get_postcode (GDataGDPostalAddress *self
);
Gets the “postcode” property.
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.
Since: 0.5.0
gdata_gd_postal_address_get_country ()
const gchar *
gdata_gd_postal_address_get_country (GDataGDPostalAddress *self
);
Gets the “country” property.
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.
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
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” gchar *
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.Flags: Read / Write
Default value: NULL
Since: 0.4.0
The “agent”
property
“agent” gchar *
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.Flags: Read / Write
Default value: NULL
Since: 0.5.0
The “city”
property
“city” gchar *
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.Flags: Read / Write
Default value: NULL
Since: 0.5.0
The “country”
property
“country” gchar *
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.Flags: Read
Default value: NULL
Since: 0.5.0
The “country-code”
property
“country-code” gchar *
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 specificationFlags: Read
Default value: NULL
Since: 0.5.0
The “house-name”
property
“house-name” gchar *
Used in places where houses or buildings have names (and not necessarily numbers).
For more information, see the
GData specification.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.Flags: Read / Write
Default value: FALSE
Since: 0.4.0
The “label”
property
“label” gchar *
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.Flags: Read / Write
Default value: NULL
Since: 0.4.0
The “mail-class”
property
“mail-class” gchar *
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.Flags: Read / Write
Default value: "http://schemas.google.com/g/2005#both"
Since: 0.5.0
The “neighborhood”
property
“neighborhood” gchar *
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.Flags: Read / Write
Default value: NULL
Since: 0.5.0
The “po-box”
property
“po-box” gchar *
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.Flags: Read / Write
Default value: NULL
Since: 0.5.0
The “postcode”
property
“postcode” gchar *
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.Flags: Read / Write
Default value: NULL
Since: 0.5.0
The “region”
property
“region” gchar *
A state, province, county (in Ireland), Land (in Germany), departement (in France), etc.
For more information, see the
GData specification.Flags: Read / Write
Default value: NULL
Since: 0.5.0
The “relation-type”
property
“relation-type” gchar *
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.Flags: Read / Write
Default value: "http://schemas.google.com/g/2005#work"
Since: 0.4.0
The “street”
property
“street” gchar *
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.Flags: Read / Write
Default value: NULL
Since: 0.5.0
The “subregion”
property
“subregion” gchar *
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.Flags: Read / Write
Default value: NULL
Since: 0.5.0
The “usage”
property
“usage” gchar *
The context in which this addess can be used. For example: GDATA_GD_ADDRESS_USAGE_GENERAL
or GDATA_GD_ADDRESS_USAGE_LOCAL
.
For more information, see the
GData specification.Flags: Read / Write
Default value: "http://schemas.google.com/g/2005#general"
Since: 0.5.0