Geoclue.Manager

g GObject.GInterface GObject.GInterface Geoclue.Manager Geoclue.Manager GObject.GInterface->Geoclue.Manager

Implementations:

Geoclue.ManagerProxy, Geoclue.ManagerSkeleton

Methods

class

interface_info ()

class

override_properties (klass, property_id_begin)

call_add_agent (arg_id, cancellable, callback, *user_data)

call_add_agent_finish (res)

call_add_agent_sync (arg_id, cancellable)

call_create_client (cancellable, callback, *user_data)

call_create_client_finish (res)

call_create_client_sync (cancellable)

call_delete_client (arg_client, cancellable, callback, *user_data)

call_delete_client_finish (res)

call_delete_client_sync (arg_client, cancellable)

call_get_client (cancellable, callback, *user_data)

call_get_client_finish (res)

call_get_client_sync (cancellable)

complete_add_agent (invocation)

complete_create_client (invocation, client)

complete_delete_client (invocation)

complete_get_client (invocation, client)

Virtual Methods

do_handle_add_agent (invocation, arg_id)

do_handle_create_client (invocation)

do_handle_delete_client (invocation, arg_client)

do_handle_get_client (invocation)

Properties

Name

Type

Flags

Short Description

available-accuracy-level

int

r/w

AvailableAccuracyLevel

in-use

bool

r/w

InUse

Signals

Name

Short Description

handle-add-agent

Signal emitted when a remote caller is invoking the ‘AddAgent() [gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent]’ D-Bus method.

handle-create-client

Signal emitted when a remote caller is invoking the ‘CreateClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient]’ D-Bus method.

handle-delete-client

Signal emitted when a remote caller is invoking the ‘DeleteClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient]’ D-Bus method.

handle-get-client

Signal emitted when a remote caller is invoking the ‘GetClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient]’ D-Bus method.

Fields

None

Class Details

class Geoclue.Manager
Bases:

GObject.GInterface

Structure:

Geoclue.ManagerIface

Abstract interface type for the D-Bus interface ‘org.freedesktop.GeoClue2.Manager [gdbus-interface-org-freedesktop-GeoClue2-Manager.top_of_page]’.

classmethod interface_info()
Returns:

A Gio.DBusInterfaceInfo. Do not free.

Return type:

Gio.DBusInterfaceInfo

Gets a machine-readable description of the ‘org.freedesktop.GeoClue2.Manager [gdbus-interface-org-freedesktop-GeoClue2-Manager.top_of_page]’ D-Bus interface.

classmethod override_properties(klass, property_id_begin)
Parameters:
Returns:

The last property id.

Return type:

int

Overrides all GObject.Object properties in the Geoclue.Manager interface for a concrete class. The properties are overridden in the order they are defined.

call_add_agent(arg_id, cancellable, callback, *user_data)
Parameters:

Asynchronously invokes the ‘AddAgent() [gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent]’ 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 call Geoclue.Manager.call_add_agent_finish() to get the result of the operation.

See Geoclue.Manager.call_add_agent_sync() for the synchronous, blocking version of this method.

call_add_agent_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Geoclue.Manager.call_add_agent().

Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

Return type:

bool

Finishes an operation started with Geoclue.Manager.call_add_agent().

call_add_agent_sync(arg_id, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

Return type:

bool

Synchronously invokes the ‘AddAgent() [gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent]’ D-Bus method on self. The calling thread is blocked until a reply is received.

See Geoclue.Manager.call_add_agent() for the asynchronous version of this method.

call_create_client(cancellable, callback, *user_data)
Parameters:

Asynchronously invokes the ‘CreateClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient]’ 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 call Geoclue.Manager.call_create_client_finish() to get the result of the operation.

See Geoclue.Manager.call_create_client_sync() for the synchronous, blocking version of this method.

call_create_client_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Geoclue.Manager.call_create_client().

Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

out_client:

Return location for return parameter or None to ignore.

Return type:

(bool, out_client: str)

Finishes an operation started with Geoclue.Manager.call_create_client().

call_create_client_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None.

Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

out_client:

Return location for return parameter or None to ignore.

Return type:

(bool, out_client: str)

Synchronously invokes the ‘CreateClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient]’ D-Bus method on self. The calling thread is blocked until a reply is received.

See Geoclue.Manager.call_create_client() for the asynchronous version of this method.

call_delete_client(arg_client, cancellable, callback, *user_data)
Parameters:

Asynchronously invokes the ‘DeleteClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient]’ 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 call Geoclue.Manager.call_delete_client_finish() to get the result of the operation.

See Geoclue.Manager.call_delete_client_sync() for the synchronous, blocking version of this method.

call_delete_client_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Geoclue.Manager.call_delete_client().

Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

Return type:

bool

Finishes an operation started with Geoclue.Manager.call_delete_client().

call_delete_client_sync(arg_client, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

Return type:

bool

Synchronously invokes the ‘DeleteClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient]’ D-Bus method on self. The calling thread is blocked until a reply is received.

See Geoclue.Manager.call_delete_client() for the asynchronous version of this method.

call_get_client(cancellable, callback, *user_data)
Parameters:

Asynchronously invokes the ‘GetClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient]’ 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 call Geoclue.Manager.call_get_client_finish() to get the result of the operation.

See Geoclue.Manager.call_get_client_sync() for the synchronous, blocking version of this method.

call_get_client_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to Geoclue.Manager.call_get_client().

Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

out_client:

Return location for return parameter or None to ignore.

Return type:

(bool, out_client: str)

Finishes an operation started with Geoclue.Manager.call_get_client().

call_get_client_sync(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None.

Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

out_client:

Return location for return parameter or None to ignore.

Return type:

(bool, out_client: str)

Synchronously invokes the ‘GetClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient]’ D-Bus method on self. The calling thread is blocked until a reply is received.

See Geoclue.Manager.call_get_client() for the asynchronous version of this method.

complete_add_agent(invocation)
Parameters:

invocation (Gio.DBusMethodInvocation) – A Gio.DBusMethodInvocation.

Helper function used in service implementations to finish handling invocations of the ‘AddAgent() [gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent]’ 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_create_client(invocation, client)
Parameters:

Helper function used in service implementations to finish handling invocations of the ‘CreateClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient]’ 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_delete_client(invocation)
Parameters:

invocation (Gio.DBusMethodInvocation) – A Gio.DBusMethodInvocation.

Helper function used in service implementations to finish handling invocations of the ‘DeleteClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient]’ 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_get_client(invocation, client)
Parameters:

Helper function used in service implementations to finish handling invocations of the ‘GetClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient]’ 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.

do_handle_add_agent(invocation, arg_id) virtual
Parameters:
Return type:

bool

do_handle_create_client(invocation) virtual
Parameters:

invocation (Gio.DBusMethodInvocation) –

Return type:

bool

do_handle_delete_client(invocation, arg_client) virtual
Parameters:
Return type:

bool

do_handle_get_client(invocation) virtual
Parameters:

invocation (Gio.DBusMethodInvocation) –

Return type:

bool

Signal Details

Geoclue.Manager.signals.handle_add_agent(manager, invocation, arg_id)
Signal Name:

handle-add-agent

Flags:

RUN_LAST

Parameters:
Returns:

Gio.DBUS_METHOD_INVOCATION_HANDLED or True if the invocation was handled, Gio.DBUS_METHOD_INVOCATION_UNHANDLED or False to let other signal handlers run.

Return type:

bool

Signal emitted when a remote caller is invoking the ‘AddAgent() [gdbus-method-org-freedesktop-GeoClue2-Manager.AddAgent]’ 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 call Geoclue.Manager.complete_add_agent() 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, the Gio.DBusError.UNKNOWN_METHOD error is returned.

Geoclue.Manager.signals.handle_create_client(manager, invocation)
Signal Name:

handle-create-client

Flags:

RUN_LAST

Parameters:
Returns:

Gio.DBUS_METHOD_INVOCATION_HANDLED or True if the invocation was handled, Gio.DBUS_METHOD_INVOCATION_UNHANDLED or False to let other signal handlers run.

Return type:

bool

Signal emitted when a remote caller is invoking the ‘CreateClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.CreateClient]’ 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 call Geoclue.Manager.complete_create_client() 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, the Gio.DBusError.UNKNOWN_METHOD error is returned.

Geoclue.Manager.signals.handle_delete_client(manager, invocation, arg_client)
Signal Name:

handle-delete-client

Flags:

RUN_LAST

Parameters:
Returns:

Gio.DBUS_METHOD_INVOCATION_HANDLED or True if the invocation was handled, Gio.DBUS_METHOD_INVOCATION_UNHANDLED or False to let other signal handlers run.

Return type:

bool

Signal emitted when a remote caller is invoking the ‘DeleteClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.DeleteClient]’ 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 call Geoclue.Manager.complete_delete_client() 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, the Gio.DBusError.UNKNOWN_METHOD error is returned.

Geoclue.Manager.signals.handle_get_client(manager, invocation)
Signal Name:

handle-get-client

Flags:

RUN_LAST

Parameters:
Returns:

Gio.DBUS_METHOD_INVOCATION_HANDLED or True if the invocation was handled, Gio.DBUS_METHOD_INVOCATION_UNHANDLED or False to let other signal handlers run.

Return type:

bool

Signal emitted when a remote caller is invoking the ‘GetClient() [gdbus-method-org-freedesktop-GeoClue2-Manager.GetClient]’ 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 call Geoclue.Manager.complete_get_client() 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, the Gio.DBusError.UNKNOWN_METHOD error is returned.

Property Details

Geoclue.Manager.props.available_accuracy_level
Name:

available-accuracy-level

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Represents the D-Bus property ‘“AvailableAccuracyLevel” [gdbus-property-org-freedesktop-GeoClue2-Manager.AvailableAccuracyLevel]’.

Since the D-Bus property for this GObject.Object property 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.Manager.props.in_use
Name:

in-use

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Represents the D-Bus property ‘“InUse” [gdbus-property-org-freedesktop-GeoClue2-Manager.InUse]’.

Since the D-Bus property for this GObject.Object property 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.