On Tue, Apr 17, 2018 at 02:04:41PM +0200, Katerina Koukiou wrote:
Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
data/org.libvirt.Domain.xml | 7 +++++++
src/domain.c | 28 ++++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml
index f68cc39..bc8a6eb 100644
--- a/data/org.libvirt.Domain.xml
+++ b/data/org.libvirt.Domain.xml
@@ -301,6 +301,13 @@
<annotation name="org.gtk.GDBus.DocString"
value="See
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainResume"...
</method>
+ <method name="Save">
+ <annotation name="org.gtk.GDBus.DocString"
+ value="See
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSave"/...
It should point to virDomainSaveFlags.
+ <arg name="to" type="s"
direction="in"/>
+ <arg name="xml" type="s" direction="in"/>
+ <arg name="flags" type="u" direction="in"/>
+ </method>
<method name="SendKey">
<annotation name="org.gtk.GDBus.DocString"
value="See
https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSendKey&quo...
diff --git a/src/domain.c b/src/domain.c
index 2a27667..c30e9b5 100644
--- a/src/domain.c
+++ b/src/domain.c
@@ -1527,6 +1527,33 @@ virtDBusDomainResume(GVariant *inArgs G_GNUC_UNUSED,
virtDBusUtilSetLastVirtError(error);
}
+static void
+virtDBusDomainSave(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;
+ const gchar *to;
+ const gchar *xml;
+ guint flags;
+
+ g_variant_get(inArgs, "(&s&su)", &to, &xml, &flags);
+ if (g_strcmp0(xml, "") == 0)
g_str_equal()
Reviewed-by: Pavel Hrdina <phrdina(a)redhat.com>