Class

MksSession

Description [src]

final class Mks.Session : GObject.Object
  implements Gio.AsyncInitable, Gio.Initable {
  /* No available fields */
}

Session connected to a QEMU VM

The MksSession represents a connection to a QEMU VM instance. It contains devices such as the mouse, keyboard, and screen which can be used with GTK.

You may monitor MksSession:devices using GListModel::items-changed to be notified of changes to available devices in the session.

Connecting To QEMU

To use MksSession, you should create your QEMU instance using dbus for the various devices that support it. You’ll need to provide your P2P D-Bus address when connecting to QEMU.

Using the same GDBusConnection, create a MksSession with mks_session_new_for_connection(). The MksSession instance will negotiate with the peer to determine what devices are available and expose them via the MksSession:devices GListModel.

Creating Widgets

You can create a new widget to embed in your application by calling mks_session_ref_screen() and set the screen for the MksDisplay with mks_display_set_screen().

Ancestors

Constructors

mks_session_new_for_connection_finish

Completes a request to create a MksSession for a GDBusConnection.

mks_session_new_for_connection_sync

Synchronously creates a new MksSession instance.

Functions

mks_session_new_for_connection

Creates a MksSession which communicates using connection.

Instance methods

mks_session_get_connection

Gets the DBus connection used for this session.

mks_session_get_devices

Gets a GListModel of devices connected to the session.

mks_session_get_name

Gets the name of the VM.

mks_session_get_uuid

Gets the unique identifier of the VM.

mks_session_ref_screen

Gets the main screen for the session.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Methods inherited from GAsyncInitable (3)
g_async_initable_init_async

Starts asynchronous initialization of the object implementing the interface. This must be done before any real use of the object after initial construction. If the object also implements GInitable you can optionally call g_initable_init() instead.

g_async_initable_init_finish

Finishes asynchronous initialization and returns the result. See g_async_initable_init_async().

g_async_initable_new_finish

Finishes the async construction for the various g_async_initable_new calls, returning the created object or NULL on error.

Methods inherited from GInitable (1)
g_initable_init

Initializes the object implementing the interface.

Properties

Mks.Session:connection

The GDBusConnection that is used to communicate with QEMU.

Mks.Session:devices

A GListModel of devices that have been discovered on the GDBusConnection to QEMU.

Mks.Session:name

The VM name as specified by the QEMU instance.

Mks.Session:uuid

The VM unique identifier specified by the QEMU instance.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct MksSessionClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.