:right-sidebar: True DebugControllerDBus =================================================================== .. currentmodule:: gi.repository.Gio .. versionadded:: 2.72 .. class:: DebugControllerDBus(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gio.DebugController`, :class:`~gi.repository.Gio.Initable` :Constructors: :: DebugControllerDBus(**properties) new(connection:Gio.DBusConnection, cancellable:Gio.Cancellable=None) -> Gio.DebugControllerDBus or None Constructors ------------ .. rst-class:: interim-class .. class:: DebugControllerDBus :no-index: .. classmethod:: new(connection: ~gi.repository.Gio.DBusConnection, cancellable: ~gi.repository.Gio.Cancellable | None = None) -> ~gi.repository.Gio.DebugControllerDBus | None Create a new :obj:`~gi.repository.Gio.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 the :obj:`~gi.repository.Gio.DebugControllerDBus` is dropped. Initialization may fail if registering the object on ``connection`` fails. .. versionadded:: 2.72 :param connection: a :obj:`~gi.repository.Gio.DBusConnection` to register the debug object on :param cancellable: a :obj:`~gi.repository.Gio.Cancellable`, or :const:`None` Methods ------- .. rst-class:: interim-class .. class:: DebugControllerDBus :no-index: .. method:: 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 :obj:`~gi.repository.Gio.DebugControllerDBus`::authorize signals have been handled. This is expected to not take long, as it will just be waiting for threads to join. If any :obj:`~gi.repository.Gio.DebugControllerDBus`::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 :obj:`~gi.repository.Gio.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 :obj:`~gi.repository.Gio.DebugControllerDBus`::authorize signal handler will cause a deadlock and must not be done. .. versionadded:: 2.72 Properties ---------- .. rst-class:: interim-class .. class:: DebugControllerDBus :no-index: .. attribute:: props.connection :type: ~gi.repository.Gio.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. .. versionadded:: 2.72 Signals ------- .. rst-class:: interim-class .. class:: DebugControllerDBus.signals :no-index: .. method:: authorize(invocation: ~gi.repository.Gio.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 :const:`False` is returned then no further handlers are run and the request to change the debug settings is rejected. Otherwise, if :const:`True` is returned, signal emission continues. If no handlers return :const:`False`, 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 :const:`True`. .. versionadded:: 2.72 :param invocation: A :obj:`~gi.repository.Gio.DBusMethodInvocation`. Virtual Methods --------------- .. rst-class:: interim-class .. class:: DebugControllerDBus :no-index: .. method:: do_authorize(invocation: ~gi.repository.Gio.DBusMethodInvocation) -> bool Default handler for the :obj:`~gi.repository.Gio.DebugControllerDBus`::authorize signal. :param invocation: Fields ------ .. rst-class:: interim-class .. class:: DebugControllerDBus :no-index: .. attribute:: parent_instance