Commit 66692fca authored by Katerina Koukiou's avatar Katerina Koukiou

events: Register VIR_DOMAIN_EVENT_ID_CONTROL_ERROR

Signed-off-by: default avatarKaterina Koukiou <kkoukiou@redhat.com>
Reviewed-by: Pavel Hrdina's avatarPavel Hrdina <phrdina@redhat.com>
parent 0d7a5b2c
......@@ -613,6 +613,10 @@
value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventBalloonChangeCallback"/>
<arg name="actual" type="t"/>
</signal>
<signal name="ControlError">
<annotation name="org.gtk.GDBus.DocString"
value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventGenericCallback"/>
</signal>
<signal name="DeviceAdded">
<annotation name="org.gtk.GDBus.DocString"
value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventDeviceAddedCallback"/>
......
......@@ -50,6 +50,27 @@ virtDBusEventsDomainBalloonChange(virConnectPtr connection G_GNUC_UNUSED,
return 0;
}
static gint
virtDBusEventsDomainControlError(virConnectPtr connection G_GNUC_UNUSED,
virDomainPtr domain,
gpointer opaque)
{
virtDBusConnect *connect = opaque;
g_autofree gchar *path = NULL;
path = virtDBusUtilBusPathForVirDomain(domain, connect->domainPath);
g_dbus_connection_emit_signal(connect->bus,
NULL,
path,
VIRT_DBUS_DOMAIN_INTERFACE,
"ControlError",
NULL,
NULL);
return 0;
}
static gint
virtDBusEventsDomainLifecycle(virConnectPtr connection G_GNUC_UNUSED,
virDomainPtr domain,
......@@ -329,6 +350,10 @@ virtDBusEventsRegister(virtDBusConnect *connect)
VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE,
VIR_DOMAIN_EVENT_CALLBACK(virtDBusEventsDomainBalloonChange));
virtDBusEventsRegisterDomainEvent(connect,
VIR_DOMAIN_EVENT_ID_CONTROL_ERROR,
VIR_DOMAIN_EVENT_CALLBACK(virtDBusEventsDomainControlError));
virtDBusEventsRegisterDomainEvent(connect,
VIR_DOMAIN_EVENT_ID_LIFECYCLE,
VIR_DOMAIN_EVENT_CALLBACK(virtDBusEventsDomainLifecycle));
......
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