Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
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 05f4da9..fb2bcce 100644
--- a/data/org.libvirt.Domain.xml
+++ b/data/org.libvirt.Domain.xml
@@ -118,6 +118,12 @@
value="See
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateWithF...
<arg name="flags" type="u" direction="in"/>
</method>
+ <method name="DelIOThread">
+ <annotation name="org.gtk.GDBus.DocString"
+ value="See
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainDelIOThread...
+ <arg name="iothreadId" type="u"
direction="in"/>
+ <arg name="flags" type="u" direction="in"/>
+ </method>
<method name="Destroy">
<annotation name="org.gtk.GDBus.DocString"
value="See
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainDestroyFlag...
diff --git a/src/domain.c b/src/domain.c
index 7c87133..2fd8343 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -622,6 +622,30 @@ virtDBusDomainCreate(GVariant *inArgs,
virtDBusUtilSetLastVirtError(error);
}
+static void
+virtDBusDomainDelIOThread(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 (virDomainDelIOThread(domain, iothreadId, flags) < 0)
+ virtDBusUtilSetLastVirtError(error);
+}
+
static void
virtDBusDomainDestroy(GVariant *inArgs,
GUnixFDList *inFDs G_GNUC_UNUSED,
@@ -1465,6 +1489,7 @@ static virtDBusGDBusMethodTable virtDBusDomainMethodTable[] = {
{ "BlockResize", virtDBusDomainBlockResize },
{ "CoreDumpWithFormat", virtDBusDomainCoreDumpWithFormat },
{ "Create", virtDBusDomainCreate },
+ { "DelIOThread", virtDBusDomainDelIOThread },
{ "Destroy", virtDBusDomainDestroy },
{ "DetachDevice", virtDBusDomainDetachDevice },
{ "GetBlkioParameters", virtDBusDomainGetBlkioParameters },
--
2.15.0