geoclue-address-details

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

## Functions

GHashTable * | geoclue_address_details_new ()
GHashTable * | geoclue_address_details_copy ()
void | geoclue_address_details_insert ()
void | geoclue_address_details_set_country_from_code ()
GeoclueAccuracyLevel | geoclue_address_details_get_accuracy_level ()

## Description

## Functions

### 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_copy ()

    GHashTable *
    geoclue_address_details_copy (GHashTable *source);

Deep-copies a GHashTable.

#### Parameters

source | GHashTable to copy |

#### Returns

New, deep copied GHashTable

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

#### Parameters

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

#### Parameters

address | GHashTable with address data |

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

#### Parameters

address | A GHashTable with address hash values |

#### Returns

GeoclueAccuracy

## Types and Values