Gio.bus_get
function bus_get(bus_type: Gio.BusType, cancellable: Gio.Cancellable, callback: Gio.AsyncReadyCallback): void { // Gjs wrapper for g_bus_get() }
Asynchronously connects to the message bus specified by bus_type.
When the operation is finished, callback will be invoked. You can then call Gio.bus_get_finish to get the result of the operation.
This is a asynchronous failable function. See Gio.bus_get_sync for the synchronous version.
Since 2.26
- bus_type
- cancellable
a Gio.Cancellable or null
- callback
a Gio.AsyncReadyCallback to call when the request is satisfied