## GeoclueReverseGeocode GeoclueReverseGeocode — Geoclue reverse geocode client API |

## Functions

GeoclueReverseGeocode * | geoclue_reverse_geocode_new ()
gboolean | geoclue_reverse_geocode_position_to_address ()
void | (*GeoclueReverseGeocodeCallback) ()
void | geoclue_reverse_geocode_position_to_address_async ()

## Types and Values

#define | GEOCLUE_REVERSE_GEOCODE_INTERFACE_NAME

## Object Hierarchy

        GObject
        ╰── GeoclueProvider
            ╰── GeoclueReverseGeocode

## Description

GeoclueReverseGeocode contains reverse geocoding methods. It is part of the Geoclue public C client API which uses D-Bus to communicate with the actual provider.

After a GeoclueReverseGeocode is created with `geoclue_reverse_geocode_new()`, the `geoclue_reverse_geocode_position_to_address()` and `geoclue_reverse_geocode_position_to_address_async()` method can be used to obtain the address of a known position.

## Functions

### geoclue_reverse_geocode_new ()

    GeoclueReverseGeocode *
    geoclue_reverse_geocode_new (const char *service,
                                 const char *path);

Creates a GeoclueReverseGeocode with given D-Bus service name and path.

#### Parameters

service | D-Bus service name |
path | D-Bus path name |

#### Returns

Pointer to a new GeoclueReverseGeocode

### geoclue_reverse_geocode_position_to_address ()

    gboolean
    geoclue_reverse_geocode_position_to_address
                                   (GeoclueReverseGeocode *revgeocode,
                                    double latitude,
                                    double longitude,
                                    GeoclueAccuracy *position_accuracy,
                                    GHashTable **details,
                                    GeoclueAccuracy **address_accuracy,
                                    GError **error);

Obtains an address for the position defined by `latitude` and `longitude` . `details` is a GHashTable with the returned address data, see

geoclue-types.h for the hashtable keys.

If the caller is not interested in some values, the pointers can be left `NULL`. If accuracy of the position is not known, an accuracy with GeoclueAccuracyLevel GEOCLUE_ACCURACY_DETAILED should be used.

#### Parameters

latitude | latitude in degrees |
longitude | longitude in degrees |
position_accuracy | Accuracy of the given latitude and longitude |
details | Pointer to returned GHashTable with address details or `NULL` |
address_accuracy | Pointer to accuracy of the returned address or `NULL` |
error | Pointer to returned Gerror or `NULL` |

#### Returns

`TRUE` if there is no `error`

### GeoclueReverseGeocodeCallback ()

    void
    (*GeoclueReverseGeocodeCallback) (GeoclueReverseGeocode *revgeocode,
                                      GHashTable *details,
                                      GeoclueAccuracy *accuracy,
                                      GError *error,
                                      gpointer userdata);

Callback function for `geoclue_reverse_geocode_position_to_address_async()`.

see geoclue-types.h for the hashtable keys used in `details` .

#### Parameters

revgeocode | A GeoclueReverseGeocode object |
details | Address details as GHashTable. |
accuracy | Accuracy of measurement as GeoclueAccuracy |
error | Error as Gerror (may be `NULL`) |
userdata | User data pointer set in `geoclue_reverse_geocode_position_to_address_async()` |

### geoclue_reverse_geocode_position_to_address_async ()

    void
    geoclue_reverse_geocode_position_to_address_async
                                   (GeoclueReverseGeocode *revgeocode,
                                    double latitude,
                                    double longitude,
                                    GeoclueAccuracy *accuracy,
                                    GeoclueReverseGeocodeCallback callback,
                                    gpointer userdata);

Function returns (essentially) immediately and calls `callback` when the reverse-geocoded address data is available or when D-Bus timeouts.

#### Parameters

latitude | Latitude in degrees |
longitude | Longitude in degrees |
accuracy | Accuracy of the given position as GeoclueAccuracy |
callback | A GeoclueAddressCallback function that should be called when return values are available |
userdata | pointer for user specified data |

## Types and Values

### GEOCLUE_REVERSE_GEOCODE_INTERFACE_NAME

    #define GEOCLUE_REVERSE_GEOCODE_INTERFACE_NAME "org.freedesktop.Geoclue.ReverseGeocode"