Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx> --- data/org.libvirt.Domain.xml | 6 ++++++ src/domain.c | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml index bd30ad4..10ce15a 100644 --- a/data/org.libvirt.Domain.xml +++ b/data/org.libvirt.Domain.xml @@ -48,6 +48,12 @@ <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainAbortJob"/> </method> + <method name="AddIOThread"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainAddIOThread"/> + <arg name="iothreadId" type="u" direction="in"/> + <arg name="flags" type="u" direction="in"/> + </method> <method name="AttachDevice"> <annotation name="org.gtk.GDBus.DocString" value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainAttachDeviceFlags"/> diff --git a/src/domain.c b/src/domain.c index 01f120d..1edad05 100644 --- a/src/domain.c +++ b/src/domain.c @@ -359,6 +359,30 @@ virtDBusDomainAbortJob(GVariant *inArgs G_GNUC_UNUSED, virtDBusUtilSetLastVirtError(error); } +static void +virtDBusDomainAddIOThread(GVariant *inArgs, + GUnixFDList *inFDs G_GNUC_UNUSED, + const gchar *objectPath, + gpointer userData, + GVariant **outArgs G_GNUC_UNUSED, + GUnixFDList **outFDs G_GNUC_UNUSED, + GError **error) +{ + virtDBusConnect *connect = userData; + g_autoptr(virDomain) domain = NULL; + guint iothreadId; + guint flags; + + g_variant_get(inArgs, "(uu)", &iothreadId, &flags); + + domain = virtDBusDomainGetVirDomain(connect, objectPath, error); + if (!domain) + return; + + if (virDomainAddIOThread(domain, iothreadId, flags) < 0) + virtDBusUtilSetLastVirtError(error); +} + static void virtDBusDomainAttachDevice(GVariant *inArgs, GUnixFDList *inFDs G_GNUC_UNUSED, @@ -1277,6 +1301,7 @@ static virtDBusGDBusPropertyTable virtDBusDomainPropertyTable[] = { static virtDBusGDBusMethodTable virtDBusDomainMethodTable[] = { { "AbortJob", virtDBusDomainAbortJob }, + { "AddIOThread", virtDBusDomainAddIOThread }, { "AttachDevice", virtDBusDomainAttachDevice }, { "BlockPeek", virtDBusDomainBlockPeek }, { "Create", virtDBusDomainCreate }, -- 2.15.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list