| Geoclue Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
geoclue-address-detailsgeoclue-address-details — Convenience functions for handling Geoclue address GHashTables |
GHashTable * geoclue_address_details_copy (GHashTable *source); GeoclueAccuracyLevel geoclue_address_details_get_accuracy_level (GHashTable *address); void geoclue_address_details_insert (GHashTable *address,const char *key,const char *value); GHashTable * geoclue_address_details_new (); void geoclue_address_details_set_country_from_code (GHashTable *address);
GHashTable * geoclue_address_details_copy (GHashTable *source);
Deep-copies a GHashTable.
|
GHashTable to copy |
Returns : |
New, deep copied GHashTable |
GeoclueAccuracyLevel geoclue_address_details_get_accuracy_level
(GHashTable *address);
Returns a GeoclueAccuracy that best describes the accuracy of address
|
A GHashTable with address hash values |
Returns : |
GeoclueAccuracy |
void geoclue_address_details_insert (GHashTable *address,const char *key,const char *value);
Adds a address field into address. Will take copies
of the strings.
|
GHashTable to insert value in |
|
the key to use, one of GEOCLUE_ADDRESS_KEY_* |
|
value to insert into address |
GHashTable * geoclue_address_details_new ();
Creates a new GHashTable suitable for Geoclue Address details.
Both keys and values inserted to this GHashTable will be freed
on g_hash_table_destroy().
Returns : |
New GHashTable |
void geoclue_address_details_set_country_from_code
(GHashTable *address);
Uses the "ISO 3166-1 alpha-2" list to figure out the country name matching
the country code in details, and adds the country name to details.
Using this function in providers is useful even when the data source includes country name: this way names are standardized.
|
GHashTable with address data |