Connection Manager#
- class ignis.connection_manager.ConnectionManager#
A helper class for managing connection handler IDs.
- property ids: dict[gi.repository.GObject.Object, list[int]]#
A dictionary mapping GObject instances to lists of handler IDs.
- connect(gobject: gi.repository.GObject.Object, signal_name: str, handler: Callable, *args) int #
Connect to a signal and store the handler ID. Equivalent to
GObject.Object.connect()
, but also saves the handler ID inids
.
- disconnect(gobject: gi.repository.GObject.Object, handler_id: int) None #
Disconnect from a signal by the
handler_id
. Equivalent toGObject.Object.disconnect()
, but also removes the stored handler ID fromids
.
- class ignis.connection_manager.DBusConnectionManager#
A helper class for managing
DBusProxy
subscription IDs.- property ids: dict[DBusProxy, list[int]]#
A dictionary mapping
DBusProxy
instances to lists of subscription IDs.
- subscribe(proxy: DBusProxy, signal_name: str, callback: Callable) int #
Subscribe to a D-Bus signal. The same as
DBusProxy.signal_subscribe
, but saves the subscription ID toids
.
- unsubscribe(proxy: DBusProxy, subscription_id: int) None #
Unsubscribe from a signal by the
subscription_id
. Equivalent toDBusProxy.unsubscribe()
, but also removes the stored subscription ID fromids
.
- unsubscribe_proxy(proxy: DBusProxy) None #
Unsubscribe the given proxy from ALL signals that were subscribed using
subscribe()
.
- unsubscribe_all() None #
Unsubscribe ALL proxys from ALL signals that were subscribed using
subscribe()
.- Return type: