Geoclue.Client¶
- Implementations:
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
Active |
||
r/w |
DesktopId |
||
r/w |
DistanceThreshold |
||
r/w |
Location |
||
r/w |
RequestedAccuracyLevel |
||
r/w |
TimeThreshold |
Signals¶
Name |
Short Description |
|---|---|
Signal emitted when a remote caller is invoking the ‘Start() [gdbus-method-org-freedesktop-GeoClue2-Client.Start]’ D-Bus method. |
|
Signal emitted when a remote caller is invoking the ‘Stop() [gdbus-method-org-freedesktop-GeoClue2-Client.Stop]’ D-Bus method. |
|
On the client-side, this signal is emitted whenever the D-Bus signal ‘“LocationUpdated” [gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated]’ is received. |
Fields¶
None
Class Details¶
- class Geoclue.Client¶
- Bases:
- Structure:
Abstract interface type for the D-Bus interface ‘org.freedesktop.GeoClue2.Client [gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page]’.
- classmethod interface_info()¶
- Returns:
A
Gio.DBusInterfaceInfo. Do not free.- Return type:
Gets a machine-readable description of the ‘org.freedesktop.GeoClue2.Client [gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page]’ D-Bus interface.
- classmethod override_properties(klass, property_id_begin)¶
- Parameters:
klass (
GObject.ObjectClass) – The class structure for aGObject.Objectderived class.property_id_begin (
int) – The property id to assign to the first overridden property.
- Returns:
The last property id.
- Return type:
Overrides all
GObject.Objectproperties in theGeoclue.Clientinterface for a concrete class. The properties are overridden in the order they are defined.
- call_start(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously invokes the ‘Start() [gdbus-method-org-freedesktop-GeoClue2-Client.Start]’ D-Bus method on self. When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see
GLib.MainContext.push_thread_default()). You can then callGeoclue.Client.call_start_finish() to get the result of the operation.See
Geoclue.Client.call_start_sync() for the synchronous, blocking version of this method.
- call_start_finish(res)¶
- Parameters:
res (
Gio.AsyncResult) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toGeoclue.Client.call_start().- Raises:
- Returns:
- Return type:
Finishes an operation started with
Geoclue.Client.call_start().
- call_start_sync(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.- Raises:
- Returns:
- Return type:
Synchronously invokes the ‘Start() [gdbus-method-org-freedesktop-GeoClue2-Client.Start]’ D-Bus method on self. The calling thread is blocked until a reply is received.
See
Geoclue.Client.call_start() for the asynchronous version of this method.
- call_stop(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.callback (
Gio.AsyncReadyCallbackorNone) – AGio.AsyncReadyCallbackto call when the request is satisfied orNone.
Asynchronously invokes the ‘Stop() [gdbus-method-org-freedesktop-GeoClue2-Client.Stop]’ D-Bus method on self. When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see
GLib.MainContext.push_thread_default()). You can then callGeoclue.Client.call_stop_finish() to get the result of the operation.See
Geoclue.Client.call_stop_sync() for the synchronous, blocking version of this method.
- call_stop_finish(res)¶
- Parameters:
res (
Gio.AsyncResult) – TheGio.AsyncResultobtained from theGio.AsyncReadyCallbackpassed toGeoclue.Client.call_stop().- Raises:
- Returns:
- Return type:
Finishes an operation started with
Geoclue.Client.call_stop().
- call_stop_sync(cancellable)¶
- Parameters:
cancellable (
Gio.CancellableorNone) – AGio.CancellableorNone.- Raises:
- Returns:
- Return type:
Synchronously invokes the ‘Stop() [gdbus-method-org-freedesktop-GeoClue2-Client.Stop]’ D-Bus method on self. The calling thread is blocked until a reply is received.
See
Geoclue.Client.call_stop() for the asynchronous version of this method.
- complete_start(invocation)¶
- Parameters:
invocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.
Helper function used in service implementations to finish handling invocations of the ‘Start() [gdbus-method-org-freedesktop-GeoClue2-Client.Start]’ D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
This method will free invocation, you cannot use it afterwards.
- complete_stop(invocation)¶
- Parameters:
invocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.
Helper function used in service implementations to finish handling invocations of the ‘Stop() [gdbus-method-org-freedesktop-GeoClue2-Client.Stop]’ D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.
This method will free invocation, you cannot use it afterwards.
- emit_location_updated(arg_old, arg_new)¶
- Parameters:
Emits the ‘“LocationUpdated” [gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated]’ D-Bus signal.
- do_handle_start(invocation) virtual¶
- Parameters:
invocation (
Gio.DBusMethodInvocation) –- Return type:
Handler for the
Geoclue.Client::handle-startsignal.
- do_handle_stop(invocation) virtual¶
- Parameters:
invocation (
Gio.DBusMethodInvocation) –- Return type:
Handler for the
Geoclue.Client::handle-stopsignal.
- do_location_updated(arg_old, arg_new) virtual¶
-
Handler for the
Geoclue.Client::location-updatedsignal.
Signal Details¶
- Geoclue.Client.signals.handle_start(client, invocation)¶
- Signal Name:
handle-start- Flags:
- Parameters:
client (
Geoclue.Client) – The object which received the signalinvocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.
- Returns:
Gio.DBUS_METHOD_INVOCATION_HANDLEDorTrueif the invocation was handled,Gio.DBUS_METHOD_INVOCATION_UNHANDLEDorFalseto let other signal handlers run.- Return type:
Signal emitted when a remote caller is invoking the ‘Start() [gdbus-method-org-freedesktop-GeoClue2-Client.Start]’ D-Bus method.
If a signal handler returns
True, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually callGeoclue.Client.complete_start() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, theGio.DBusError.UNKNOWN_METHODerror is returned.
- Geoclue.Client.signals.handle_stop(client, invocation)¶
- Signal Name:
handle-stop- Flags:
- Parameters:
client (
Geoclue.Client) – The object which received the signalinvocation (
Gio.DBusMethodInvocation) – AGio.DBusMethodInvocation.
- Returns:
Gio.DBUS_METHOD_INVOCATION_HANDLEDorTrueif the invocation was handled,Gio.DBUS_METHOD_INVOCATION_UNHANDLEDorFalseto let other signal handlers run.- Return type:
Signal emitted when a remote caller is invoking the ‘Stop() [gdbus-method-org-freedesktop-GeoClue2-Client.Stop]’ D-Bus method.
If a signal handler returns
True, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually callGeoclue.Client.complete_stop() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, theGio.DBusError.UNKNOWN_METHODerror is returned.
- Geoclue.Client.signals.location_updated(client, arg_old, arg_new)¶
- Signal Name:
location-updated- Flags:
- Parameters:
client (
Geoclue.Client) – The object which received the signalarg_old (
str) – Argument.arg_new (
str) – Argument.
On the client-side, this signal is emitted whenever the D-Bus signal ‘“LocationUpdated” [gdbus-signal-org-freedesktop-GeoClue2-Client.LocationUpdated]’ is received.
On the service-side, this signal can be used with e.g. g_signal_emit_by_name() to make the object emit the D-Bus signal.
Property Details¶
- Geoclue.Client.props.active¶
-
Represents the D-Bus property ‘“Active” [gdbus-property-org-freedesktop-GeoClue2-Client.Active]’.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
- Geoclue.Client.props.desktop_id¶
-
Represents the D-Bus property ‘“DesktopId” [gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId]’.
Since the D-Bus property for this
GObject.Objectproperty is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
- Geoclue.Client.props.distance_threshold¶
-
Represents the D-Bus property ‘“DistanceThreshold” [gdbus-property-org-freedesktop-GeoClue2-Client.DistanceThreshold]’.
Since the D-Bus property for this
GObject.Objectproperty is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
- Geoclue.Client.props.location¶
-
Represents the D-Bus property ‘“Location” [gdbus-property-org-freedesktop-GeoClue2-Client.Location]’.
Since the D-Bus property for this
GObject.Objectproperty is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.
- Geoclue.Client.props.requested_accuracy_level¶
-
Represents the D-Bus property ‘“RequestedAccuracyLevel” [gdbus-property-org-freedesktop-GeoClue2-Client.RequestedAccuracyLevel]’.
Since the D-Bus property for this
GObject.Objectproperty is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.
- Geoclue.Client.props.time_threshold¶
-
Represents the D-Bus property ‘“TimeThreshold” [gdbus-property-org-freedesktop-GeoClue2-Client.TimeThreshold]’.
Since the D-Bus property for this
GObject.Objectproperty is both readable and writable, it is meaningful to both read from it and write to it on both the service- and client-side.