## geoclue-address-details geoclue-address-details — Convenience functions for handling Geoclue address GHashTables |

## Synopsis

    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);

## Description

## Details

### geoclue_address_details_copy ()

    GHashTable *        geoclue_address_details_copy        (GHashTable *source);

Deep-copies a GHashTable.

`source` : | GHashTable to copy
Returns : | New, deep copied GHashTable

### geoclue_address_details_get_accuracy_level ()

    GeoclueAccuracyLevel geoclue_address_details_get_accuracy_level
                                                            (GHashTable *address);

Returns a GeoclueAccuracy that best describes the accuracy of `address`

`address` : | A GHashTable with address hash values
Returns : | GeoclueAccuracy

### geoclue_address_details_insert ()

    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.

`address` : | GHashTable to insert value in
`key` : | the key to use, one of GEOCLUE_ADDRESS_KEY_*
`value` : | value to insert into address

### geoclue_address_details_new ()

    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

### geoclue_address_details_set_country_from_code ()

    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.

`address` : | GHashTable with address data