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 8c88cc8..7c97117 100644
--- a/data/org.libvirt.Connect.xml
+++ b/data/org.libvirt.Connect.xml
@@ -158,6 +158,11 @@
value="See
https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChang...
<arg name="flags" type="u" direction="in"/>
</method>
+ <method name="InterfaceChangeRollback">
+ <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 dadfd96..563535c 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -777,6 +777,27 @@ virtDBusConnectInterfaceChangeCommit(GVariant *inArgs,
virtDBusUtilSetLastVirtError(error);
}
+static void
+virtDBusConnectInterfaceChangeRollback(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 (virInterfaceChangeRollback(connect->connection, flags) < 0)
+ virtDBusUtilSetLastVirtError(error);
+}
+
static void
virtDBusConnectInterfaceDefineXML(GVariant *inArgs,
GUnixFDList *inFDs G_GNUC_UNUSED,
@@ -1876,6 +1897,7 @@ static virtDBusGDBusMethodTable virtDBusConnectMethodTable[] = {
{ "GetSysinfo", virtDBusConnectGetSysinfo },
{ "InterfaceChangeBegin", virtDBusConnectInterfaceChangeBegin },
{ "InterfaceChangeCommit", virtDBusConnectInterfaceChangeCommit },
+ { "InterfaceChangeRollback", virtDBusConnectInterfaceChangeRollback },
{ "InterfaceDefineXML", virtDBusConnectInterfaceDefineXML },
{ "ListDomains", virtDBusConnectListDomains },
{ "ListInterfaces", virtDBusConnectListInterfaces },
--
2.17.1