Top |
org.freedesktop.GeoClue2.Clientorg.freedesktop.GeoClue2.Client — The Application-specific client API |
Location readable o DistanceThreshold readwrite u TimeThreshold readwrite u DesktopId readwrite s RequestedAccuracyLevel readwrite u Active readable b
This is the interface you use to retrieve location information and receive location update signals from GeoClue service. You get the client object to use this interface on from org.freedesktop.GeoClue2.Manager.GetClient() method.
Start ();
Start receiving events about the current location. Applications should hook-up to "LocationUpdated" signal before calling this method.
LocationUpdated (o old, o new);
The signal is emitted every time the location changes. The client should set the DistanceThreshold property to control how often this signal is emitted.
|
old location as path to a #org.freedesktop.GeoClue2.Location object |
|
new location as path to a #org.freedesktop.GeoClue2.Location object |
Location readable o
Current location as path to a org.freedesktop.GeoClue2.Location object. Please note that this property will be set to "/" (D-Bus equivalent of null) initially, until Geoclue finds user's location. You want to delay reading this property until your callback to "LocationUpdated" signal is called for the first time after starting the client.
DistanceThreshold readwrite u
Contains the current distance threshold in meters. This value is used by the service when it gets new location info. If the distance moved is below the threshold, it won't emit the LocationUpdated signal. The default value is 0. When DistanceThreshold is zero, it always emits the signal.
TimeThreshold readwrite u
Contains the current time threshold in seconds. This value is used by the service when it gets new location info. If the time since the last update is below the threshold, it won't emit the LocationUpdated signal. The default value is 0. When TimeThreshold is zero, it always emits the signal.
DesktopId readwrite s
The desktop file id (the basename of the desktop file). This property must be set by applications for authorization to work.
RequestedAccuracyLevel readwrite u
The level of accuracy requested by client, as GClueAccuracyLevel.
Please keep in mind that the actual accuracy of location information is dependent on available hardware on your machine, external resources and/or how much accuracy user agrees to be confortable with.
Active readable b
If client is active, i-e started successfully using Start() and receiving location updates.
Please keep in mind that geoclue can at any time stop and start the client on user (agent) request. Applications that are interested in in these changes, should watch for changes in this property.