Geoclue Reference Manual | ||||
---|---|---|---|---|
Top | Description | Object Hierarchy |
Synopsis
#define GEOCLUE_GEOCODE_INTERFACE_NAME GeoclueGeocode; void (*GeoclueGeocodeCallback) (GeoclueGeocode *geocode
,GeocluePositionFields fields
,double latitude
,double longitude
,double altitude
,GeoclueAccuracy *accuracy
,GError *error
,gpointer userdata
); GeoclueGeocodeClass; GeocluePositionFields geoclue_geocode_address_to_position (GeoclueGeocode *geocode
,GHashTable *details
,double *latitude
,double *longitude
,double *altitude
,GeoclueAccuracy **accuracy
,GError **error
); void geoclue_geocode_address_to_position_async (GeoclueGeocode *geocode
,GHashTable *details
,GeoclueGeocodeCallback callback
,gpointer userdata
); GeocluePositionFields geoclue_geocode_freeform_address_to_position (GeoclueGeocode *geocode
,const char *address
,double *latitude
,double *longitude
,double *altitude
,GeoclueAccuracy **accuracy
,GError **error
); void geoclue_geocode_freeform_address_to_position_async (GeoclueGeocode *geocode
,const char *address
,GeoclueGeocodeCallback callback
,gpointer userdata
); GeoclueGeocode * geoclue_geocode_new (const char *service
,const char *path
);
Description
GeoclueGeocode contains geocoding methods. It is part of the Geoclue public C client API which uses D-Bus to communicate with the actual provider.
After a GeoclueGeocode is created with geoclue_geocode_new()
, the
geoclue_geocode_address_to_position()
,
geoclue_geocode_freeform_address_to_position()
methods and their
asynchronous counterparts can be used to obtain the position (coordinates)
of the given address.
Address GHashTable keys are defined in geoclue-types.h. See also convenience functions in geoclue-address-details.h.
Details
GEOCLUE_GEOCODE_INTERFACE_NAME
#define GEOCLUE_GEOCODE_INTERFACE_NAME "org.freedesktop.Geoclue.Geocode"
GeoclueGeocodeCallback ()
void (*GeoclueGeocodeCallback) (GeoclueGeocode *geocode
,GeocluePositionFields fields
,double latitude
,double longitude
,double altitude
,GeoclueAccuracy *accuracy
,GError *error
,gpointer userdata
);
Callback function for the asynchronous methods.
|
A GeoclueGeocode object |
|
A GeocluePositionFields bitfield representing the validity of the position values |
|
Latitude in degrees |
|
Longitude in degrees |
|
Altitude in meters |
|
Accuracy of measurement as GeoclueAccuracy |
|
Error as Gerror or NULL
|
|
User data pointer |
geoclue_geocode_address_to_position ()
GeocluePositionFields geoclue_geocode_address_to_position (GeoclueGeocode *geocode
,GHashTable *details
,double *latitude
,double *longitude
,double *altitude
,GeoclueAccuracy **accuracy
,GError **error
);
Geocodes given address to coordinates (latitude
, longitude
, altitude
).
see geoclue-types.h for the
hashtable keys usable in details
. accuracy
is a rough estimate of
the accuracy of the returned position.
If the caller is not interested in some values, the pointers can be
left NULL
.
|
A GeoclueGeocode object |
|
Hashtable with address data |
|
Pointer to returned latitude in degrees or NULL
|
|
Pointer to returned longitude in degrees or NULL
|
|
Pointer to returned altitude in meters or NULL
|
|
Pointer to returned GeoclueAccuracy or NULL
|
|
Pointer to returned Gerror or NULL
|
Returns : |
A GeocluePositionFields bitfield representing the validity of the returned coordinates. |
geoclue_geocode_address_to_position_async ()
void geoclue_geocode_address_to_position_async (GeoclueGeocode *geocode
,GHashTable *details
,GeoclueGeocodeCallback callback
,gpointer userdata
);
Function returns (essentially) immediately and calls callback
when the geocoded
position data is available or when D-Bus timeouts.
see geoclue-types.h for the
hashtable keys usable in details
.
|
A Geocluegeocode object |
|
A GHashTable with address data |
|
A GeoclueAddressCallback function that should be called when return values are available |
|
pointer for user specified data |
geoclue_geocode_freeform_address_to_position ()
GeocluePositionFields geoclue_geocode_freeform_address_to_position (GeoclueGeocode *geocode
,const char *address
,double *latitude
,double *longitude
,double *altitude
,GeoclueAccuracy **accuracy
,GError **error
);
Geocodes given address to coordinates (latitude
, longitude
, altitude
).
accuracy
is a rough estimate of the accuracy of the returned position.
If the caller is not interested in some values, the pointers can be
left NULL
.
|
A GeoclueGeocode object |
|
freeform address |
|
Pointer to returned latitude in degrees or NULL
|
|
Pointer to returned longitude in degrees or NULL
|
|
Pointer to returned altitude in meters or NULL
|
|
Pointer to returned GeoclueAccuracy or NULL
|
|
Pointer to returned Gerror or NULL
|
Returns : |
A GeocluePositionFields bitfield representing the validity of the returned coordinates. |
geoclue_geocode_freeform_address_to_position_async ()
void geoclue_geocode_freeform_address_to_position_async (GeoclueGeocode *geocode
,const char *address
,GeoclueGeocodeCallback callback
,gpointer userdata
);
Function returns (essentially) immediately and calls callback
when the geocoded
position data is available or when D-Bus timeouts.
|
A Geocluegeocode object |
|
freeform address |
|
A GeoclueAddressCallback function that should be called when return values are available |
|
pointer for user specified data |
geoclue_geocode_new ()
GeoclueGeocode * geoclue_geocode_new (const char *service
,const char *path
);
Creates a GeoclueGeocode with given D-Bus service name and path.
|
D-Bus service name |
|
D-Bus path name |
Returns : |
Pointer to a new GeoclueGeocode |