Signed-off-by: Anya Harter <aharter(a)redhat.com>
---
data/org.libvirt.Connect.xml | 5 +++++
src/connect.c | 22 ++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/data/org.libvirt.Connect.xml b/data/org.libvirt.Connect.xml
index 604afea..8c88cc8 100644
--- a/data/org.libvirt.Connect.xml
+++ b/data/org.libvirt.Connect.xml
@@ -153,6 +153,11 @@
value="See
https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChang...
<arg name="flags" type="u" direction="in"/>
</method>
+ <method name="InterfaceChangeCommit">
+ <annotation name="org.gtk.GDBus.DocString"
+ value="See
https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChang...
+ <arg name="flags" type="u" direction="in"/>
+ </method>
<method name="InterfaceDefineXML">
<annotation name="org.gtk.GDBus.DocString"
value="See
https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceDefin...
diff --git a/src/connect.c b/src/connect.c
index 0e19e91..2acc657 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -756,6 +756,27 @@ virtDBusConnectInterfaceChangeBegin(GVariant *inArgs,
virtDBusUtilSetLastVirtError(error);
}
+static void
+virtDBusConnectInterfaceChangeCommit(GVariant *inArgs,
+ GUnixFDList *inFDs G_GNUC_UNUSED,
+ const gchar *objectPath G_GNUC_UNUSED,
+ gpointer userData,
+ GVariant **outArgs G_GNUC_UNUSED,
+ GUnixFDList **outFDs G_GNUC_UNUSED,
+ GError **error)
+{
+ virtDBusConnect *connect = userData;
+ guint flags;
+
+ g_variant_get(inArgs, "(u)", &flags);
+
+ if (!virtDBusConnectOpen(connect, error))
+ return;
+
+ if (virInterfaceChangeCommit(connect->connection, flags) < 0)
+ virtDBusUtilSetLastVirtError(error);
+}
+
static void
virtDBusConnectInterfaceDefineXML(GVariant *inArgs,
GUnixFDList *inFDs G_GNUC_UNUSED,
@@ -1854,6 +1875,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = {
{ "GetDomainCapabilities", virtDBusConnectGetDomainCapabilities },
{ "GetSysinfo", virtDBusConnectGetSysinfo },
{ "InterfaceChangeBegin", virtDBusConnectInterfaceChangeBegin },
+ { "InterfaceChangeCommit", virtDBusConnectInterfaceChangeCommit },
{ "InterfaceDefineXML", virtDBusConnectInterfaceDefineXML },
{ "ListDomains", virtDBusConnectListDomains },
{ "ListInterfaces", virtDBusConnectListInterfaces },
--
2.17.1