![]() |
![]() |
![]() |
Geoclue Reference Manual | ![]() |
---|---|---|---|---|
enum GeoclueStatus; enum GeoclueAccuracyLevel; enum GeocluePositionFields; enum GeoclueVelocityFields; enum GeoclueError; #define GEOCLUE_ADDRESS_KEY_COUNTRYCODE #define GEOCLUE_ADDRESS_KEY_COUNTRY #define GEOCLUE_ADDRESS_KEY_REGION #define GEOCLUE_ADDRESS_KEY_LOCALITY #define GEOCLUE_ADDRESS_KEY_AREA #define GEOCLUE_ADDRESS_KEY_POSTALCODE #define GEOCLUE_ADDRESS_KEY_STREET enum GeoclueResourceFlags; enum GeoclueNetworkStatus; void geoclue_types_init (void);
typedef enum { GEOCLUE_STATUS_ERROR, GEOCLUE_STATUS_UNAVAILABLE, GEOCLUE_STATUS_ACQUIRING, GEOCLUE_STATUS_AVAILABLE } GeoclueStatus;
defines the provider status
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.
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:
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"); }
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.
typedef enum { GEOCLUE_ERROR_NOT_IMPLEMENTED, GEOCLUE_ERROR_NOT_AVAILABLE, GEOCLUE_ERROR_FAILED, } GeoclueError;
Error values for providers.
#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.html
#define GEOCLUE_ADDRESS_KEY_COUNTRY "country"
A key for address hashtables. The hash value should be a name of a country.
#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.
#define GEOCLUE_ADDRESS_KEY_LOCALITY "locality"
A key for address hashtables. The hash value should be a name of a town or city.
#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.
#define GEOCLUE_ADDRESS_KEY_POSTALCODE "postalcode"
A key for address hashtables. The hash value should be a code used for postal delivery.
#define GEOCLUE_ADDRESS_KEY_STREET "street"
A key for address hashtables. The hash value should be a partial or full street address.
typedef enum _GeoclueResourceFlags { 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.
typedef enum { GEOCLUE_CONNECTIVITY_UNKNOWN, GEOCLUE_CONNECTIVITY_OFFLINE, GEOCLUE_CONNECTIVITY_ACQUIRING, GEOCLUE_CONNECTIVITY_ONLINE, } GeoclueNetworkStatus;
Enumeration for current network status.