Geoclue.Simple¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
w/co |
Requested accuracy level |
||
r |
Client proxy |
||
w/co |
Desktop ID |
||
r/w/co |
DistanceThreshold |
||
r |
Location proxy |
||
r/w/co |
TimeThreshold |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
parent |
r |
Class Details¶
- class Geoclue.Simple(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- classmethod new(desktop_id, accuracy_level, cancellable, callback, *user_data)¶
- Parameters:
desktop_id (
str) – The desktop file id (the basename of the desktop file).accuracy_level (
Geoclue.AccuracyLevel) – The requested accuracy level asGeoclue.AccuracyLevel.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the results are ready.
Asynchronously creates a
Geoclue.Simpleinstance. UseGeoclue.Simple.new_finish() to get the createdGeoclue.Simpleinstance.See
Geoclue.Simple.new_sync() for the synchronous, blocking version of this function.
- classmethod new_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toGeoclue.Simple.new().- Raises:
- Returns:
The constructed proxy object or
Noneif error is set.- Return type:
Finishes an operation started with
Geoclue.Simple.new().
- classmethod new_sync(desktop_id, accuracy_level, cancellable)¶
- Parameters:
desktop_id (
str) – The desktop file id (the basename of the desktop file).accuracy_level (
Geoclue.AccuracyLevel) – The requested accuracy level asGeoclue.AccuracyLevel.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
- Returns:
The new
Geoclue.Simpleobject orNoneif error is set.- Return type:
The synchronous and blocking version of
Geoclue.Simple.new().
- classmethod new_with_thresholds(desktop_id, accuracy_level, time_threshold, distance_threshold, cancellable, callback, *user_data)¶
- Parameters:
desktop_id (
str) – The desktop file id (the basename of the desktop file).accuracy_level (
Geoclue.AccuracyLevel) – The requested accuracy level asGeoclue.AccuracyLevel.time_threshold (
int) – Time threshold in seconds, 0 for no limit.distance_threshold (
int) – Distance threshold in meters, 0 for no limit.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the results are ready.
Asynchronously creates a
Geoclue.Simpleinstance. UseGeoclue.Simple.new_with_thresholds_finish() to get the createdGeoclue.Simpleinstance.See
Geoclue.Simple.new_with_thresholds_sync() for the synchronous, blocking version of this function.
- classmethod new_with_thresholds_finish(result)¶
- Parameters:
result (
Gio.AsyncResult) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toGeoclue.Simple.new_with_thresholds().- Raises:
- Returns:
The constructed proxy object or
Noneif error is set.- Return type:
Finishes an operation started with
Geoclue.Simple.new_with_thresholds().
- classmethod new_with_thresholds_sync(desktop_id, accuracy_level, time_threshold, distance_threshold, cancellable)¶
- Parameters:
desktop_id (
str) – The desktop file id (the basename of the desktop file).accuracy_level (
Geoclue.AccuracyLevel) – The requested accuracy level asGeoclue.AccuracyLevel.time_threshold (
int) – Time threshold in seconds, 0 for no limit.distance_threshold (
int) – Distance threshold in meters, 0 for no limit.cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.
- Raises:
- Returns:
The new
Geoclue.Simpleobject orNoneif error is set.- Return type:
The synchronous and blocking version of
Geoclue.Simple.new_with_thresholds().
- get_client()¶
- Returns:
The client object.
- Return type:
Gets the client proxy, or
Noneif self is not using a client proxy (i-e when inside the Flatpak sandbox).
- get_location()¶
- Returns:
The last known location as
Geoclue.Location.- Return type:
Gets the current location.
Property Details¶
- Geoclue.Simple.props.accuracy_level¶
- Name:
accuracy-level- Type:
- Default Value:
- Flags:
The requested maximum accuracy level.
- Geoclue.Simple.props.client¶
- Name:
client- Type:
- Default Value:
- Flags:
The client proxy. This is
Noneif simple is not using a client proxy (i-e when inside the Flatpak sandbox).
- Geoclue.Simple.props.desktop_id¶
- Name:
desktop-id- Type:
- Default Value:
- Flags:
The Desktop ID of the application.
- Geoclue.Simple.props.distance_threshold¶
- Name:
distance-threshold- Type:
- Default Value:
0- Flags:
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.
When set to 0 (default), it always emits the signal.
- Geoclue.Simple.props.location¶
- Name:
location- Type:
- Default Value:
- Flags:
The current location.
- Geoclue.Simple.props.time_threshold¶
- Name:
time-threshold- Type:
- Default Value:
0- Flags:
The current time threshold in seconds. This value is used by the service when it gets new location info. If the time passed is below the threshold, it won’t emit the LocationUpdated signal.
When set to 0 (default), it always emits the signal.