DebugControllerDBus
Added in version 2.72.
Superclasses: Object
Implemented Interfaces: DebugController
, Initable
- Constructors:
DebugControllerDBus(**properties)
new(connection:Gio.DBusConnection, cancellable:Gio.Cancellable=None) -> Gio.DebugControllerDBus or None
Constructors
- class DebugControllerDBus
- classmethod new(connection: DBusConnection, cancellable: Cancellable | None = None) DebugControllerDBus | None
Create a new
DebugControllerDBus
and synchronously initialize it.Initializing the object will export the debug object on
connection
. The object will remain registered until the last reference to theDebugControllerDBus
is dropped.Initialization may fail if registering the object on
connection
fails.Added in version 2.72.
- Parameters:
connection – a
DBusConnection
to register the debug object oncancellable – a
Cancellable
, orNone
Methods
- class DebugControllerDBus
- stop() None
Stop the debug controller, unregistering its object from the bus.
Any pending method calls to the object will complete successfully, but new ones will return an error. This method will block until all pending
DebugControllerDBus
::authorize signals have been handled. This is expected to not take long, as it will just be waiting for threads to join. If anyDebugControllerDBus
::authorize signal handlers are still executing in other threads, this will block until after they have returned.This method will be called automatically when the final reference to the
DebugControllerDBus
is dropped. You may want to call it explicitly to know when the controller has been fully removed from the bus, or to break reference count cycles.Calling this method from within a
DebugControllerDBus
::authorize signal handler will cause a deadlock and must not be done.Added in version 2.72.
Properties
- class DebugControllerDBus
- props.connection: DBusConnection
The D-Bus connection to expose the debugging interface on.
Typically this will be the same connection (to the system or session bus) which the rest of the application or service’s D-Bus objects are registered on.
Added in version 2.72.
Signals
- class DebugControllerDBus.signals
- authorize(invocation: DBusMethodInvocation) bool
Emitted when a D-Bus peer is trying to change the debug settings and used to determine if that is authorized.
This signal is emitted in a dedicated worker thread, so handlers are allowed to perform blocking I/O. This means that, for example, it is appropriate to call
polkit_authority_check_authorization_sync()
to check authorization using polkit.If
False
is returned then no further handlers are run and the request to change the debug settings is rejected.Otherwise, if
True
is returned, signal emission continues. If no handlers returnFalse
, then the debug settings are allowed to be changed.Signal handlers must not modify
invocation
, or cause it to return a value.The default class handler just returns
True
.Added in version 2.72.
- Parameters:
invocation – A
DBusMethodInvocation
.
Virtual Methods
- class DebugControllerDBus
- do_authorize(invocation: DBusMethodInvocation) bool
Default handler for the
DebugControllerDBus
::authorize signal.- Parameters:
invocation
Fields
- class DebugControllerDBus
- parent_instance