Commit 88629345 authored by Anya Harter's avatar Anya Harter Committed by Katerina Koukiou

Implement InterfaceChangeCommit method for Connect Interface

Signed-off-by: 's avatarAnya Harter <aharter@redhat.com>
Reviewed-by: 's avatarKaterina Koukiou <kkoukiou@redhat.com>
parent b718a463
......@@ -153,6 +153,11 @@
value="See https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeBegin"/>
<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#virInterfaceChangeCommit"/>
<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#virInterfaceDefineXML"/>
......
......@@ -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 },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment