Class

MksSession

unstable since: 1

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().

Available since: 1

Ancestors

Constructors

mks_session_new_for_connection_finish

Completes a request to create a MksSession for a GDBusConnection.

unstable since: 1

mks_session_new_for_connection_sync

Synchronously creates a new MksSession instance.

unstable since: 1

Functions

mks_session_new_for_connection

Creates a MksSession which communicates using connection.

unstable since: 1

Instance methods

mks_session_get_connection

Gets the DBus connection used for this session.

unstable since: 1

mks_session_get_devices

Gets a GListModel of devices connected to the session.

unstable since: 1

mks_session_get_name

Gets the name of the VM.

unstable since: 1

mks_session_get_uuid

Gets the unique identifier of the VM.

unstable since: 1

mks_session_ref_screen

Gets the main screen for the session.

unstable since: 1

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.

unstable since: 2.22

g_async_initable_init_finish

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

unstable since: 2.22

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.

unstable since: 2.22

Methods inherited from GInitable (1)
g_initable_init

Initializes the object implementing the interface.

unstable since: 2.22

Properties

Mks.Session:connection

The GDBusConnection that is used to communicate with QEMU.

unstable since: 1

Mks.Session:devices

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

unstable since: 1

Mks.Session:name

The VM name as specified by the QEMU instance.

unstable since: 1

Mks.Session:uuid

The VM unique identifier specified by the QEMU instance.

unstable since: 1

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.

unstable since: 2.0

Class structure

struct MksSessionClass {
  GObjectClass parent_class;
  
}
No description available.
Class members
parent_class: GObjectClass
No description available.