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.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the results are ready.
Asynchronously creates a
Geoclue.Simple
instance. UseGeoclue.Simple.new_finish
() to get the createdGeoclue.Simple
instance.See
Geoclue.Simple.new_sync
() for the synchronous, blocking version of this function.
- classmethod new_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toGeoclue.Simple.new
().- Raises:
- Returns:
The constructed proxy object or
None
if 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.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
The new
Geoclue.Simple
object orNone
if 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.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the results are ready.
Asynchronously creates a
Geoclue.Simple
instance. UseGeoclue.Simple.new_with_thresholds_finish
() to get the createdGeoclue.Simple
instance.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.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toGeoclue.Simple.new_with_thresholds
().- Raises:
- Returns:
The constructed proxy object or
None
if 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.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
The new
Geoclue.Simple
object orNone
if 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
None
if 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
None
if 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.