Re: [libvirt] [dbus PATCH v2 13/17] Implement InterfaceChangeBegin method for Connect Interface

2018-07-24 Thread Katerina Koukiou
On Fri, Jul 20, 2018 at 02:34:57PM -0400, Anya Harter wrote:
> Signed-off-by: Anya Harter 
> ---
>  data/org.libvirt.Connect.xml |  5 +
>  src/connect.c| 22 ++
>  2 files changed, 27 insertions(+)

Reviewed-by: Katerina Koukiou 


signature.asc
Description: PGP signature
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [dbus PATCH v2 13/17] Implement InterfaceChangeBegin method for Connect Interface

2018-07-20 Thread Anya Harter
Signed-off-by: Anya Harter 
---
 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 791e1f5..604afea 100644
--- a/data/org.libvirt.Connect.xml
+++ b/data/org.libvirt.Connect.xml
@@ -148,6 +148,11 @@
   
   
 
+
+  https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeBegin"/>
+  
+
 
   https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceDefineXML"/>
diff --git a/src/connect.c b/src/connect.c
index 9be8264..0e19e91 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -735,6 +735,27 @@ virtDBusConnectGetSysinfo(GVariant *inArgs,
 *outArgs = g_variant_new("(s)", sysinfo);
 }
 
+static void
+virtDBusConnectInterfaceChangeBegin(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 (virInterfaceChangeBegin(connect->connection, flags) < 0)
+virtDBusUtilSetLastVirtError(error);
+}
+
 static void
 virtDBusConnectInterfaceDefineXML(GVariant *inArgs,
   GUnixFDList *inFDs G_GNUC_UNUSED,
@@ -1832,6 +1853,7 @@ static virtDBusGDBusMethodTable 
virtDBusConnectMethodTable[] = {
 { "GetCPUModelNames", virtDBusConnectGetCPUModelNames },
 { "GetDomainCapabilities", virtDBusConnectGetDomainCapabilities },
 { "GetSysinfo", virtDBusConnectGetSysinfo },
+{ "InterfaceChangeBegin", virtDBusConnectInterfaceChangeBegin },
 { "InterfaceDefineXML", virtDBusConnectInterfaceDefineXML },
 { "ListDomains", virtDBusConnectListDomains },
 { "ListInterfaces", virtDBusConnectListInterfaces },
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list