Geoclue Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
Synopsis
#define GEOCLUE_REVERSE_GEOCODE_INTERFACE_NAME GeoclueReverseGeocode; void (*GeoclueReverseGeocodeCallback) (GeoclueReverseGeocode *revgeocode
,GHashTable *details
,GeoclueAccuracy *accuracy
,GError *error
,gpointer userdata
); GeoclueReverseGeocodeClass; GeoclueReverseGeocode * geoclue_reverse_geocode_new (const char *service
,const char *path
); gboolean geoclue_reverse_geocode_position_to_address (GeoclueReverseGeocode *revgeocode
,double latitude
,double longitude
,GeoclueAccuracy *position_accuracy
,GHashTable **details
,GeoclueAccuracy **address_accuracy
,GError **error
); void geoclue_reverse_geocode_position_to_address_async (GeoclueReverseGeocode *revgeocode
,double latitude
,double longitude
,GeoclueAccuracy *accuracy
,GeoclueReverseGeocodeCallback callback
,gpointer userdata
);
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.
Details
GEOCLUE_REVERSE_GEOCODE_INTERFACE_NAME
#define GEOCLUE_REVERSE_GEOCODE_INTERFACE_NAME "org.freedesktop.Geoclue.ReverseGeocode"
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
.
|
A GeoclueReverseGeocode object |
|
Address details as GHashTable. |
|
Accuracy of measurement as GeoclueAccuracy |
|
Error as Gerror (may be NULL ) |
|
User data pointer set in geoclue_reverse_geocode_position_to_address_async()
|
GeoclueReverseGeocodeClass
typedef struct { GeoclueProviderClass provider_class; } GeoclueReverseGeocodeClass;
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.
|
D-Bus service name |
|
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.
|
latitude in degrees |
|
longitude in degrees |
|
Accuracy of the given latitude and longitude |
|
Pointer to returned GHashTable with address details or NULL
|
|
Pointer to accuracy of the returned address or NULL
|
|
Pointer to returned Gerror or NULL
|
Returns : |
TRUE if there is no error
|
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.
|
Latitude in degrees |
|
Longitude in degrees |
|
Accuracy of the given position as GeoclueAccuracy |
|
A GeoclueAddressCallback function that should be called when return values are available |
|
pointer for user specified data |