Commit 23c3408a authored by Katerina Koukiou's avatar Katerina Koukiou

events: Register VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON

Signed-off-by: default avatarKaterina Koukiou <kkoukiou@redhat.com>
Reviewed-by: Pavel Hrdina's avatarPavel Hrdina <phrdina@redhat.com>
parent 3f38047e
......@@ -659,6 +659,14 @@
<arg name="authScheme" type="s"/>
<arg name="identities" type="a(ss)"/>
</signal>
<signal name="IOErrorReason">
<annotation name="org.gtk.GDBus.DocString"
value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventIOErrorReasonCallback"/>
<arg name="srcPath" type="s"/>
<arg name="device" type="s"/>
<arg name="action" type="i"/>
<arg name="reason" type="s"/>
</signal>
<signal name="JobCompleted">
<annotation name="org.gtk.GDBus.DocString"
value="See https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventJobCompletedCallback"/>
......
......@@ -240,6 +240,33 @@ virtDBusEventsDomainGraphics(virConnectPtr connection G_GNUC_UNUSED,
return 0;
}
static gint
virtDBusEventsDomainIOErrorReason(virConnectPtr connection G_GNUC_UNUSED,
virDomainPtr domain,
const gchar *srcPath,
const gchar *device,
gint action,
const gchar *reason,
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,
"IOErrorReason",
g_variant_new("(ssis)", srcPath,
VIRT_DBUS_EMPTY_STR(device),
action, reason),
NULL);
return 0;
}
static gint
virtDBusEventsDomainJobCompleted(virConnectPtr connection G_GNUC_UNUSED,
virDomainPtr domain,
......@@ -712,6 +739,10 @@ virtDBusEventsRegister(virtDBusConnect *connect)
VIR_DOMAIN_EVENT_ID_GRAPHICS,
VIR_DOMAIN_EVENT_CALLBACK(virtDBusEventsDomainGraphics));
virtDBusEventsRegisterDomainEvent(connect,
VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON,
VIR_DOMAIN_EVENT_CALLBACK(virtDBusEventsDomainIOErrorReason));
virtDBusEventsRegisterDomainEvent(connect,
VIR_DOMAIN_EVENT_ID_JOB_COMPLETED,
VIR_DOMAIN_EVENT_CALLBACK(virtDBusEventsDomainJobCompleted));
......
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