On Thu, May 10, 2018 at 07:25:59PM +0200, Katerina Koukiou wrote:
Signed-off-by: Katerina Koukiou <kkoukiou(a)redhat.com>
---
data/org.libvirt.Domain.xml | 7 +++++++
src/events.c | 4 ++++
2 files changed, 11 insertions(+)
diff --git a/data/org.libvirt.Domain.xml b/data/org.libvirt.Domain.xml
index 781ca03..c49f5e8 100644
--- a/data/org.libvirt.Domain.xml
+++ b/data/org.libvirt.Domain.xml
@@ -596,6 +596,13 @@
<arg name="type" type="i"/>
<arg name="status" type="i"/>
</signal>
+ <signal name="BlockJob_2">
Since we will not use the v1 version let's name it "BlockJob"
And document here something like "Callback was registered using
VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2".
+ <arg name="disk" type="s"/>
+ <arg name="type" type="i"/>
+ <arg name="status" type="i"/>
+ </signal>
<signal name="DeviceAdded">
<annotation name="org.gtk.GDBus.DocString"
value="See
https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEven...
diff --git a/src/events.c b/src/events.c
index d89756c..10b2802 100644
--- a/src/events.c
+++ b/src/events.c
@@ -357,6 +357,10 @@ virtDBusEventsRegister(virtDBusConnect *connect)
VIR_DOMAIN_EVENT_ID_BLOCK_JOB,
VIR_DOMAIN_EVENT_CALLBACK(virtDBusEventsDomainBlockJob));
+ virtDBusEventsRegisterDomainEvent(connect,
+ VIR_DOMAIN_EVENT_ID_BLOCK_JOB_2,
+
VIR_DOMAIN_EVENT_CALLBACK(virtDBusEventsDomainBlockJob));
+
This would not work because that function has hardcoded "BlockJob"
signal.
Pavel