Signed-off-by: Anya Harter <aharter@xxxxxxxxxx> --- 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 @@ <arg name="flags" type="u" direction="in"/> <arg name="sysinfo" type="s" direction="out"/> </method> + <method name="InterfaceChangeBegin"> + <annotation name="org.gtk.GDBus.DocString" + value="See https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeBegin"/> + <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"/> diff --git a/src/connect.c b/src/connect.c index 8c39d52..7cf2d66 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@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list