For convenience and the sake of type safety we don't let the
user deal with Libvirt.VirDomainEventCallback interfaces directly.

Instead, there will be a specific interface definition for each type
of callback as we soon shall see.

Signed-off-by: Claudio Bley <[email protected]>
---
 src/main/java/org/libvirt/Connect.java |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/main/java/org/libvirt/Connect.java 
b/src/main/java/org/libvirt/Connect.java
index 1b05f6f..c8ae1ec 100644
--- a/src/main/java/org/libvirt/Connect.java
+++ b/src/main/java/org/libvirt/Connect.java
@@ -350,6 +350,16 @@ public class Connect {
             ErrorHandler.processError(Libvirt.INSTANCE);
    }
 
+    int domainEventRegister(Domain domain, int eventID, 
Libvirt.VirDomainEventCallback cb)
+        throws LibvirtException
+    {
+        DomainPointer ptr = domain == null ? null : domain.VDP;
+
+        return processError(libvirt.virConnectDomainEventRegisterAny(VCP, ptr,
+                                                                     eventID, 
cb,
+                                                                     null, 
null));
+    }
+
     /**
      * Finds a domain based on the hypervisor ID number.
      *
-- 
1.7.9.5

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to