Re: [dbus PATCH 22/25] Implement Save method for Domain Interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 17, 2018 at 02:04:41PM +0200, Katerina Koukiou wrote:
> Signed-off-by: Katerina Koukiou <kkoukiou@xxxxxxxxxx>
> ---
>  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"/>
> 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@xxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux