Geoclue.ClientProxy¶
- Subclasses:
None
Methods¶
- Inherited:
Gio.DBusProxy (25), GObject.Object (37), Gio.AsyncInitable (4), Gio.DBusInterface (3), Gio.Initable (2), Geoclue.Client (11)
- Structs:
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
class |
|
Virtual Methods¶
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Geoclue.ClientProxy(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Geoclue.ClientProxy
structure contains only private data and should only be accessed using the provided API.- classmethod create(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.
A utility function to create a
Geoclue.ClientProxy
without having to deal with aGeoclue.Manager
. See alsoGeoclue.ClientProxy.create_full
() which improves resource management.This is identitcal to calling
Geoclue.ClientProxy.create_full
() without any flags set.See
Geoclue.ClientProxy.create_sync
() for the synchronous, blocking version of this function.
- classmethod create_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toGeoclue.ClientProxy.create
().- Raises:
- Returns:
The constructed proxy object or
None
if error is set.- Return type:
Finishes an operation started with
Geoclue.ClientProxy.create
().
- classmethod create_full(desktop_id, accuracy_level, flags, 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
.flags (
Geoclue.ClientProxyCreateFlags
) –Geoclue.ClientProxyCreateFlags
to modify the creation.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the results are ready.
A utility function to create a
Geoclue.ClientProxy
without having to deal with aGeoclue.Manager
.By setting the
Geoclue.ClientProxyCreateFlags.AUTO_DELETE
flag you can ensure that the client will be deleted again from the geoclue service when it is destroyed. This flag should be used unless you are doing explicit resource management.See
Geoclue.ClientProxy.create_full_sync
() for the synchronous, blocking version of this function.
- classmethod create_full_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toGeoclue.ClientProxy.create
().- Raises:
- Returns:
The constructed proxy object or
None
if error is set.- Return type:
Finishes an operation started with
Geoclue.ClientProxy.create_full
().
- classmethod create_full_sync(desktop_id, accuracy_level, flags, 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
.flags (
Geoclue.ClientProxyCreateFlags
) –Geoclue.ClientProxyCreateFlags
to modify the creation.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
The constructed proxy object or
None
if error is set.- Return type:
The synchronous and blocking version of
Geoclue.ClientProxy.create_full
().By setting the
Geoclue.ClientProxyCreateFlags.AUTO_DELETE
flag you can ensure that the client will be deleted again from the geoclue service when it is destroyed. This flag should be used unless you are doing explicit resource management.
- classmethod create_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 constructed proxy object or
None
if error is set.- Return type:
The synchronous and blocking version of
Geoclue.ClientProxy.create
(). See alsoGeoclue.ClientProxy.create_full_sync
() which improves resource management.This function is identical to calling
Geoclue.ClientProxy.create_full_sync
() without any flags set.
- classmethod new(connection, flags, name, object_path, cancellable, callback, *user_data)¶
- Parameters:
connection (
Gio.DBusConnection
) – AGio.DBusConnection
.flags (
Gio.DBusProxyFlags
) – Flags from theGio.DBusProxyFlags
enumeration.name (
str
orNone
) – A bus name (well-known or unique) orNone
if connection is not a message bus connection.object_path (
str
) – An object path.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied.
Asynchronously creates a proxy for the D-Bus interface ‘org.freedesktop.GeoClue2.Client [gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page]’. See
Gio.DBusProxy.new
() for more details.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.ClientProxy.new_finish
() to get the result of the operation.See
Geoclue.ClientProxy.new_sync
() for the synchronous, blocking version of this constructor.
- classmethod new_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toGeoclue.ClientProxy.new
().- Raises:
- Returns:
The constructed proxy object or
None
if error is set.- Return type:
Finishes an operation started with
Geoclue.ClientProxy.new
().
- classmethod new_for_bus(bus_type, flags, name, object_path, cancellable, callback, *user_data)¶
- Parameters:
bus_type (
Gio.BusType
) – AGio.BusType
.flags (
Gio.DBusProxyFlags
) – Flags from theGio.DBusProxyFlags
enumeration.name (
str
) – A bus name (well-known or unique).object_path (
str
) – An object path.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.callback (
Gio.AsyncReadyCallback
orNone
) – AGio.AsyncReadyCallback
to call when the request is satisfied.
Like
Geoclue.ClientProxy.new
() but takes aGio.BusType
instead of aGio.DBusConnection
.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.ClientProxy.new_for_bus_finish
() to get the result of the operation.See
Geoclue.ClientProxy.new_for_bus_sync
() for the synchronous, blocking version of this constructor.
- classmethod new_for_bus_finish(res)¶
- Parameters:
res (
Gio.AsyncResult
) – TheGio.AsyncResult
obtained from theGio.AsyncReadyCallback
passed toGeoclue.ClientProxy.new_for_bus
().- Raises:
- Returns:
The constructed proxy object or
None
if error is set.- Return type:
Finishes an operation started with
Geoclue.ClientProxy.new_for_bus
().
- classmethod new_for_bus_sync(bus_type, flags, name, object_path, cancellable)¶
- Parameters:
bus_type (
Gio.BusType
) – AGio.BusType
.flags (
Gio.DBusProxyFlags
) – Flags from theGio.DBusProxyFlags
enumeration.name (
str
) – A bus name (well-known or unique).object_path (
str
) – An object path.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
The constructed proxy object or
None
if error is set.- Return type:
Like
Geoclue.ClientProxy.new_sync
() but takes aGio.BusType
instead of aGio.DBusConnection
.The calling thread is blocked until a reply is received.
See
Geoclue.ClientProxy.new_for_bus
() for the asynchronous version of this constructor.
- classmethod new_sync(connection, flags, name, object_path, cancellable)¶
- Parameters:
connection (
Gio.DBusConnection
) – AGio.DBusConnection
.flags (
Gio.DBusProxyFlags
) – Flags from theGio.DBusProxyFlags
enumeration.name (
str
orNone
) – A bus name (well-known or unique) orNone
if connection is not a message bus connection.object_path (
str
) – An object path.cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
.
- Raises:
- Returns:
The constructed proxy object or
None
if error is set.- Return type:
Synchronously creates a proxy for the D-Bus interface ‘org.freedesktop.GeoClue2.Client [gdbus-interface-org-freedesktop-GeoClue2-Client.top_of_page]’. See
Gio.DBusProxy.new_sync
() for more details.The calling thread is blocked until a reply is received.
See
Geoclue.ClientProxy.new
() for the asynchronous version of this constructor.