folks Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy | Prerequisites | Known Implementations | Properties |
FolksPostalAddressFolksPostalAddress — Object representing a postal mail address. The components of the address are never null, an empty string indicates that a property is not set. |
#define FOLKS_TYPE_POSTAL_ADDRESS gboolean folks_postal_address_is_empty (FolksPostalAddress *self
); gboolean folks_postal_address_equal (FolksPostalAddress *self
,FolksPostalAddress *with
); gchar * folks_postal_address_to_string (FolksPostalAddress *self
); FolksPostalAddress * folks_postal_address_new (const gchar *po_box
,const gchar *extension
,const gchar *street
,const gchar *locality
,const gchar *region
,const gchar *postal_code
,const gchar *country
,const gchar *address_format
,const gchar *uid
); const gchar * folks_postal_address_get_po_box (FolksPostalAddress *self
); void folks_postal_address_set_po_box (FolksPostalAddress *self
,const gchar *value
); const gchar * folks_postal_address_get_extension (FolksPostalAddress *self
); void folks_postal_address_set_extension (FolksPostalAddress *self
,const gchar *value
); const gchar * folks_postal_address_get_street (FolksPostalAddress *self
); void folks_postal_address_set_street (FolksPostalAddress *self
,const gchar *value
); const gchar * folks_postal_address_get_locality (FolksPostalAddress *self
); void folks_postal_address_set_locality (FolksPostalAddress *self
,const gchar *value
); const gchar * folks_postal_address_get_region (FolksPostalAddress *self
); void folks_postal_address_set_region (FolksPostalAddress *self
,const gchar *value
); const gchar * folks_postal_address_get_postal_code (FolksPostalAddress *self
); void folks_postal_address_set_postal_code (FolksPostalAddress *self
,const gchar *value
); const gchar * folks_postal_address_get_country (FolksPostalAddress *self
); void folks_postal_address_set_country (FolksPostalAddress *self
,const gchar *value
); const gchar * folks_postal_address_get_address_format (FolksPostalAddress *self
); void folks_postal_address_set_address_format (FolksPostalAddress *self
,const gchar *value
); const gchar * folks_postal_address_get_uid (FolksPostalAddress *self
); void folks_postal_address_set_uid (FolksPostalAddress *self
,const gchar *value
); struct FolksPostalAddress; #define FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS FolksPostalAddressFieldDetails * folks_postal_address_field_details_new (FolksPostalAddress *value
,GeeMultiMap *parameters
); struct FolksPostalAddressFieldDetails; void folks_postal_address_details_change_postal_addresses (FolksPostalAddressDetails *self
,GeeSet *postal_addresses
,GAsyncReadyCallback _callback_
,gpointer _user_data_
); void folks_postal_address_details_change_postal_addresses_finish (FolksPostalAddressDetails *self
,GAsyncResult *_res_
,GError **error
); GeeSet * folks_postal_address_details_get_postal_addresses (FolksPostalAddressDetails *self
); void folks_postal_address_details_set_postal_addresses (FolksPostalAddressDetails *self
,GeeSet *value
); FolksPostalAddressDetails;
GObject +----FolksPostalAddress
GObject +----FolksAbstractFieldDetails +----FolksPostalAddressFieldDetails
GInterface +----FolksPostalAddressDetails
"address-format" gchar* : Read / Write / Construct "country" gchar* : Read / Write / Construct "extension" gchar* : Read / Write / Construct "locality" gchar* : Read / Write / Construct "po-box" gchar* : Read / Write / Construct "postal-code" gchar* : Read / Write / Construct "region" gchar* : Read / Write / Construct "street" gchar* : Read / Write / Construct "uid" gchar* : Read / Write / Construct "id" gchar* : Read / Write "postal-addresses" GeeSet* : Read / Write
#define FOLKS_TYPE_POSTAL_ADDRESS (folks_postal_address_get_type ())
The type for FolksPostalAddress.
gboolean folks_postal_address_is_empty (FolksPostalAddress *self
);
Whether none of the components is set.
|
the FolksPostalAddress instance |
Returns : |
`true` if all the components are the empty string, `false` otherwise. |
Since 0.6.7
gboolean folks_postal_address_equal (FolksPostalAddress *self
,FolksPostalAddress *with
);
Compare if two postal addresses are equal. Addresses are equal if all their components are equal (where `null` compares equal only with `null`) and they have the same set of types (or both have no types).
This does not factor in the uid
.
|
the FolksPostalAddress instance |
|
another postal address to compare with. [in] |
Returns : |
`true` if the addresses are equal, `false` otherwise |
gchar * folks_postal_address_to_string (FolksPostalAddress *self
);
Get a formatted version of the address. The format is localised, and by default is comma-separated.
|
the FolksPostalAddress instance |
Returns : |
a formatted address. |
Since 0.4.0
FolksPostalAddress * folks_postal_address_new (const gchar *po_box
,const gchar *extension
,const gchar *street
,const gchar *locality
,const gchar *region
,const gchar *postal_code
,const gchar *country
,const gchar *address_format
,const gchar *uid
);
Create a PostalAddress.
You can pass `null` if a component is not set.
|
set of types for the address (such as "personal" or "work") |
|
the PO Box. [in][allow-none] |
|
the address extension. [in][allow-none] |
|
the street name and number. [in][allow-none] |
|
the locality (city, town or village) name. [in][allow-none] |
|
the region (state or province) name. [in][allow-none] |
|
the postal code. [in][allow-none] |
|
the country name. [in][allow-none] |
|
the address format. [in][allow-none] |
|
external UID for the address instance. [in][allow-none] |
Since 0.5.1
const gchar * folks_postal_address_get_po_box (FolksPostalAddress *self
);
|
the FolksPostalAddress instance to query |
Returns : |
the value of the "po-box" property |
void folks_postal_address_set_po_box (FolksPostalAddress *self
,const gchar *value
);
|
the FolksPostalAddress instance to modify |
|
the new value of the "po-box" property |
const gchar * folks_postal_address_get_extension (FolksPostalAddress *self
);
|
the FolksPostalAddress instance to query |
Returns : |
the value of the "extension" property |
void folks_postal_address_set_extension (FolksPostalAddress *self
,const gchar *value
);
|
the FolksPostalAddress instance to modify |
|
the new value of the "extension" property |
const gchar * folks_postal_address_get_street (FolksPostalAddress *self
);
|
the FolksPostalAddress instance to query |
Returns : |
the value of the "street" property |
void folks_postal_address_set_street (FolksPostalAddress *self
,const gchar *value
);
|
the FolksPostalAddress instance to modify |
|
the new value of the "street" property |
const gchar * folks_postal_address_get_locality (FolksPostalAddress *self
);
|
the FolksPostalAddress instance to query |
Returns : |
the value of the "locality" property |
void folks_postal_address_set_locality (FolksPostalAddress *self
,const gchar *value
);
|
the FolksPostalAddress instance to modify |
|
the new value of the "locality" property |
const gchar * folks_postal_address_get_region (FolksPostalAddress *self
);
|
the FolksPostalAddress instance to query |
Returns : |
the value of the "region" property |
void folks_postal_address_set_region (FolksPostalAddress *self
,const gchar *value
);
|
the FolksPostalAddress instance to modify |
|
the new value of the "region" property |
const gchar * folks_postal_address_get_postal_code
(FolksPostalAddress *self
);
|
the FolksPostalAddress instance to query |
Returns : |
the value of the "postal-code" property |
void folks_postal_address_set_postal_code (FolksPostalAddress *self
,const gchar *value
);
|
the FolksPostalAddress instance to modify |
|
the new value of the "postal-code" property |
const gchar * folks_postal_address_get_country (FolksPostalAddress *self
);
|
the FolksPostalAddress instance to query |
Returns : |
the value of the "country" property |
void folks_postal_address_set_country (FolksPostalAddress *self
,const gchar *value
);
|
the FolksPostalAddress instance to modify |
|
the new value of the "country" property |
const gchar * folks_postal_address_get_address_format
(FolksPostalAddress *self
);
|
the FolksPostalAddress instance to query |
Returns : |
the value of the "address-format" property |
void folks_postal_address_set_address_format (FolksPostalAddress *self
,const gchar *value
);
|
the FolksPostalAddress instance to modify |
|
the new value of the "address-format" property |
const gchar * folks_postal_address_get_uid (FolksPostalAddress *self
);
|
the FolksPostalAddress instance to query |
Returns : |
the value of the "uid" property |
void folks_postal_address_set_uid (FolksPostalAddress *self
,const gchar *value
);
|
the FolksPostalAddress instance to modify |
|
the new value of the "uid" property |
struct FolksPostalAddress;
Object representing a postal mail address. The components of the address are never null, an empty string indicates that a property is not set.
#define FOLKS_TYPE_POSTAL_ADDRESS_FIELD_DETAILS (folks_postal_address_field_details_get_type ())
The type for FolksPostalAddressFieldDetails.
FolksPostalAddressFieldDetails * folks_postal_address_field_details_new (FolksPostalAddress *value
,GeeMultiMap *parameters
);
Create a new PostalAddressFieldDetails.
|
the value of the field, a non-empty FolksPostalAddress. [in] |
|
initial parameters. See "parameters". A `null` value is equivalent to an empty map of parameters. [in][allow-none] |
Returns : |
a new PostalAddressFieldDetails |
Since 0.6.0
struct FolksPostalAddressFieldDetails;
Object representing a PostalAddress value that can have some parameters associated with it.
See FolksAbstractFieldDetails for details on common parameter names and values.
Since 0.6.0
void folks_postal_address_details_change_postal_addresses (FolksPostalAddressDetails *self
,GeeSet *postal_addresses
,GAsyncReadyCallback _callback_
,gpointer _user_data_
);
Change the contact's postal addresses.
It's preferred to call this rather than setting "postal-addresses" directly, as this method gives error notification and will only return once the addresses have been written to the relevant backing store (or the operation's failed).
See also: folks_postal_address_details_change_postal_addresses_finish()
|
the FolksPostalAddressDetails instance |
|
the set of postal addresses. [in] |
|
callback to call when the request is satisfied. [scope async] |
|
the data to pass to _callback_ function. [closure]
|
Since 0.6.2
void folks_postal_address_details_change_postal_addresses_finish (FolksPostalAddressDetails *self
,GAsyncResult *_res_
,GError **error
);
Change the contact's postal addresses.
It's preferred to call this rather than setting "postal-addresses" directly, as this method gives error notification and will only return once the addresses have been written to the relevant backing store (or the operation's failed).
See also: folks_postal_address_details_change_postal_addresses()
|
the FolksPostalAddressDetails instance |
|
a GAsyncResult |
|
location to store the error occuring, or NULL to ignore. [error-domains FolksPropertyError]
|
Since 0.6.2
GeeSet * folks_postal_address_details_get_postal_addresses
(FolksPostalAddressDetails *self
);
|
the FolksPostalAddressDetails instance to query |
Returns : |
the value of the "postal-addresses" property |
void folks_postal_address_details_set_postal_addresses (FolksPostalAddressDetails *self
,GeeSet *value
);
|
the FolksPostalAddressDetails instance to modify |
|
the new value of the "postal-addresses" property |
typedef struct _FolksPostalAddressDetails FolksPostalAddressDetails;
Interface for classes that can provide postal addresses, such as FolksPersona and FolksIndividual.
"address-format"
property "address-format" gchar* : Read / Write / Construct
The address format.
The two letter country code that determines the format or exact meaning of the other fields.
Default value: NULL
"country"
property "country" gchar* : Read / Write / Construct
The country.
The name of the country.
Default value: NULL
"extension"
property "extension" gchar* : Read / Write / Construct
The address extension.
Any additional part of the address, for instance a flat number.
Default value: NULL
"locality"
property "locality" gchar* : Read / Write / Construct
The locality.
The locality, for instance the city name.
Default value: NULL
"po-box"
property "po-box" gchar* : Read / Write / Construct
The PO Box.
The PO Box (also known as Postal office box or Postal box).
Default value: NULL
"postal-code"
property "postal-code" gchar* : Read / Write / Construct
The postal code.
The postal code (also known as post code, postcode or ZIP code).
Default value: NULL
"region"
property "region" gchar* : Read / Write / Construct
The region.
The region, for instance the name of the state or province.
Default value: NULL
"street"
property "street" gchar* : Read / Write / Construct
The street name and number.
The street name including the optional building number. The number can be before or after the street name based on the language and country.
Default value: NULL
"uid"
property "uid" gchar* : Read / Write / Construct
The UID of the Postal Address (if any).
Default value: NULL