Session.for_connection


Description:

[ CCode ( cname = "mks_session_new_for_connection" , has_construct_function = false ) ]
public async Session.for_connection (DBusConnection connection, int io_priority, Cancellable? cancellable) throws Error

Creates a Session which communicates using connection.

The [class@Gio.DBusConnection] should be a private D-Bus connection to a QEMU instance which has devices created using the "dbus" backend.

callback will be executed when the session has been created or failed to create.

This function will not block the calling thread.

use [ctor@Mks.Session.new_for_connection_finish] to get the result of this operation.

Parameters:

connection

a DBusConnection

io_priority

priority for IO operations

cancellable

a Cancellable or null

callback

a callback to execute upon completion of the operation

user_data

closure data for callback