Geoclue.Simple

g GObject.GInterface GObject.GInterface Gio.AsyncInitable Gio.AsyncInitable GObject.GInterface->Gio.AsyncInitable GObject.Object GObject.Object Geoclue.Simple Geoclue.Simple GObject.Object->Geoclue.Simple Gio.AsyncInitable->Geoclue.Simple

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gio.AsyncInitable (4)

Structs:

GObject.ObjectClass (5)

class

new (desktop_id, accuracy_level, cancellable, callback, *user_data)

class

new_finish (result)

class

new_sync (desktop_id, accuracy_level, cancellable)

class

new_with_thresholds (desktop_id, accuracy_level, time_threshold, distance_threshold, cancellable, callback, *user_data)

class

new_with_thresholds_finish (result)

class

new_with_thresholds_sync (desktop_id, accuracy_level, time_threshold, distance_threshold, cancellable)

get_client ()

get_location ()

Virtual Methods

Inherited:

GObject.Object (7), Gio.AsyncInitable (2)

Properties

Name

Type

Flags

Short Description

accuracy-level

Geoclue.AccuracyLevel

w/co

Requested accuracy level

client

Geoclue.ClientProxy

r

Client proxy

desktop-id

str

w/co

Desktop ID

distance-threshold

int

r/w/co

DistanceThreshold

location

Geoclue.LocationProxy

r

Location proxy

time-threshold

int

r/w/co

TimeThreshold

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class Geoclue.Simple(**kwargs)
Bases:

GObject.Object, Gio.AsyncInitable

Abstract:

No

Structure:

Geoclue.SimpleClass

classmethod new(desktop_id, accuracy_level, cancellable, callback, *user_data)
Parameters:

Asynchronously creates a Geoclue.Simple instance. Use Geoclue.Simple.new_finish() to get the created Geoclue.Simple instance.

See Geoclue.Simple.new_sync() for the synchronous, blocking version of this function.

classmethod new_finish(result)
Parameters:

result (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Geoclue.Simple.new().

Raises:

GLib.Error

Returns:

The constructed proxy object or None if error is set.

Return type:

Geoclue.Simple

Finishes an operation started with Geoclue.Simple.new().

classmethod new_sync(desktop_id, accuracy_level, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

The new Geoclue.Simple object or None if error is set.

Return type:

Geoclue.Simple

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:

Asynchronously creates a Geoclue.Simple instance. Use Geoclue.Simple.new_with_thresholds_finish() to get the created Geoclue.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) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Geoclue.Simple.new_with_thresholds().

Raises:

GLib.Error

Returns:

The constructed proxy object or None if error is set.

Return type:

Geoclue.Simple

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:
Raises:

GLib.Error

Returns:

The new Geoclue.Simple object or None if error is set.

Return type:

Geoclue.Simple

The synchronous and blocking version of Geoclue.Simple.new_with_thresholds().

get_client()
Returns:

The client object.

Return type:

Geoclue.ClientProxy or None

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:

Geoclue.Location or None

Gets the current location.

Property Details

Geoclue.Simple.props.accuracy_level
Name:

accuracy-level

Type:

Geoclue.AccuracyLevel

Default Value:

Geoclue.AccuracyLevel.NONE

Flags:

WRITABLE, CONSTRUCT_ONLY

The requested maximum accuracy level.

Geoclue.Simple.props.client
Name:

client

Type:

Geoclue.ClientProxy

Default Value:

None

Flags:

READABLE

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:

str

Default Value:

None

Flags:

WRITABLE, CONSTRUCT_ONLY

The Desktop ID of the application.

Geoclue.Simple.props.distance_threshold
Name:

distance-threshold

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

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:

Geoclue.LocationProxy

Default Value:

None

Flags:

READABLE

The current location.

Geoclue.Simple.props.time_threshold
Name:

time-threshold

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

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.