Function gio::bus_get [−][src]
pub fn bus_get<P: IsA<Cancellable>, Q: FnOnce(Result<DBusConnection, Error>) + Send + 'static>(
bus_type: BusType,
cancellable: Option<&P>,
callback: Q
)
Expand description
Asynchronously connects to the message bus specified by bus_type
.
When the operation is finished, callback
will be invoked. You can
then call g_bus_get_finish()
to get the result of the operation.
This is an asynchronous failable function. See bus_get_sync()
for
the synchronous version.
bus_type
a BusType
cancellable
a Cancellable
or None
callback
a GAsyncReadyCallback
to call when the request is satisfied