Geoclue Reference Manual | ||||
---|---|---|---|---|
Top | Description |
Synopsis
#define GEOCLUE_ADDRESS_KEY_AREA
#define GEOCLUE_ADDRESS_KEY_COUNTRY
#define GEOCLUE_ADDRESS_KEY_COUNTRYCODE
#define GEOCLUE_ADDRESS_KEY_LOCALITY
#define GEOCLUE_ADDRESS_KEY_POSTALCODE
#define GEOCLUE_ADDRESS_KEY_REGION
#define GEOCLUE_ADDRESS_KEY_STREET
enum GeoclueAccuracyLevel;
enum GeoclueNetworkStatus;
enum GeocluePositionFields;
enum GeoclueResourceFlags;
enum GeoclueStatus;
enum GeoclueVelocityFields;
void geoclue_types_init (void
);
Details
GEOCLUE_ADDRESS_KEY_AREA
#define GEOCLUE_ADDRESS_KEY_AREA "area"
A key for address hashtables. The hash value should be a name of an area, such as neighborhood or campus.
GEOCLUE_ADDRESS_KEY_COUNTRY
#define GEOCLUE_ADDRESS_KEY_COUNTRY "country"
A key for address hashtables. The hash value should be a name of a country.
GEOCLUE_ADDRESS_KEY_COUNTRYCODE
#define GEOCLUE_ADDRESS_KEY_COUNTRYCODE "countrycode"
A key for address hashtables. The hash value should be a ISO 3166 two letter country code.
The used hash keys match the elements of XEP-0080 (XMPP protocol extension for user location), see http://www.xmpp.org/extensions/xep-0080.php
GEOCLUE_ADDRESS_KEY_LOCALITY
#define GEOCLUE_ADDRESS_KEY_LOCALITY "locality"
A key for address hashtables. The hash value should be a name of a town or city.
GEOCLUE_ADDRESS_KEY_POSTALCODE
#define GEOCLUE_ADDRESS_KEY_POSTALCODE "postalcode"
A key for address hashtables. The hash value should be a code used for postal delivery.
GEOCLUE_ADDRESS_KEY_REGION
#define GEOCLUE_ADDRESS_KEY_REGION "region"
A key for address hashtables. The hash value should be a name of an administrative region of a nation, e.g. province or US state.
GEOCLUE_ADDRESS_KEY_STREET
#define GEOCLUE_ADDRESS_KEY_STREET "street"
A key for address hashtables. The hash value should be a partial or full street address.
enum GeoclueAccuracyLevel
typedef enum { GEOCLUE_ACCURACY_LEVEL_NONE = 0, GEOCLUE_ACCURACY_LEVEL_COUNTRY, GEOCLUE_ACCURACY_LEVEL_REGION, GEOCLUE_ACCURACY_LEVEL_LOCALITY, GEOCLUE_ACCURACY_LEVEL_POSTALCODE, GEOCLUE_ACCURACY_LEVEL_STREET, GEOCLUE_ACCURACY_LEVEL_DETAILED, } GeoclueAccuracyLevel;
Enum values used to define the approximate accuracy of
Position or Address information. These are ordered in
from lowest accuracy possible to highest accuracy possible.
geoclue_accuracy_get_details()
can be used to get get the
current accuracy. It is up to the provider to set the
accuracy based on analysis of its queries.
enum GeoclueNetworkStatus
typedef enum { GEOCLUE_CONNECTIVITY_UNKNOWN, GEOCLUE_CONNECTIVITY_OFFLINE, GEOCLUE_CONNECTIVITY_ACQUIRING, GEOCLUE_CONNECTIVITY_ONLINE, } GeoclueNetworkStatus;
Enumeration for current network status.
enum GeocluePositionFields
typedef enum { GEOCLUE_POSITION_FIELDS_NONE = 0, GEOCLUE_POSITION_FIELDS_LATITUDE = 1 << 0, GEOCLUE_POSITION_FIELDS_LONGITUDE = 1 << 1, GEOCLUE_POSITION_FIELDS_ALTITUDE = 1 << 2 } GeocluePositionFields;
GeocluePositionFields is a bitfield that defines the validity of Position values.
Example:
1 2 3 4 5 6 7 |
GeocluePositionFields fields; fields = geoclue_position_get_position (. . .); if (fields & GEOCLUE_POSITION_FIELDS_LATITUDE && fields & GEOCLUE_POSITION_FIELDS_LONGITUDE) { g_print("latitude and longitude are valid"); } |
enum GeoclueResourceFlags
typedef enum { GEOCLUE_RESOURCE_NONE = 0, GEOCLUE_RESOURCE_NETWORK = 1 << 0, GEOCLUE_RESOURCE_CELL = 1 << 1, GEOCLUE_RESOURCE_GPS = 1 << 2, GEOCLUE_RESOURCE_ALL = (1 << 10) - 1 } GeoclueResourceFlags;
bitfield that represents a set of physical resources.
enum GeoclueStatus
typedef enum { GEOCLUE_STATUS_ERROR, GEOCLUE_STATUS_UNAVAILABLE, GEOCLUE_STATUS_ACQUIRING, GEOCLUE_STATUS_AVAILABLE } GeoclueStatus;
defines the provider status
enum GeoclueVelocityFields
typedef enum { GEOCLUE_VELOCITY_FIELDS_NONE = 0, GEOCLUE_VELOCITY_FIELDS_SPEED = 1 << 0, GEOCLUE_VELOCITY_FIELDS_DIRECTION = 1 << 1, GEOCLUE_VELOCITY_FIELDS_CLIMB = 1 << 2 } GeoclueVelocityFields;
GeoclueVelocityFields is a bitfield that defines the validity of Velocity values.