[PATCH 65/66] vbox: Add registerDomainEvent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/vbox/vbox_tmpl.c          |   20 ++++++++++++++++++++
 src/vbox/vbox_uniformed_api.h |    1 +
 2 files changed, 21 insertions(+)

diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 72d4c4d..fbd0d08 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -1492,6 +1492,16 @@ _vboxDomainSnapshotRestore(virDomainPtr dom,
 #if VBOX_API_VERSION <= 2002000 || VBOX_API_VERSION >= 4000000
     /* No Callback support for VirtualBox 2.2.* series */
     /* No Callback support for VirtualBox 4.* series */
+
+static void
+_registerDomainEvent(virDriverPtr driver)
+{
+    driver->connectDomainEventRegister = NULL;
+    driver->connectDomainEventDeregister = NULL;
+    driver->connectDomainEventRegisterAny = NULL;
+    driver->connectDomainEventDeregisterAny = NULL;
+}
+
 #else /* !(VBOX_API_VERSION == 2002000 || VBOX_API_VERSION >= 4000000) */
 
 /* Functions needed for Callbacks */
@@ -2034,6 +2044,15 @@ vboxConnectDomainEventDeregisterAny(virConnectPtr conn,
     return ret;
 }
 
+static void
+_registerDomainEvent(virDriverPtr driver)
+{
+    driver->connectDomainEventRegister = vboxConnectDomainEventRegister; /* 0.7.0 */
+    driver->connectDomainEventDeregister = vboxConnectDomainEventDeregister; /* 0.7.0 */
+    driver->connectDomainEventRegisterAny = vboxConnectDomainEventRegisterAny; /* 0.8.0 */
+    driver->connectDomainEventDeregisterAny = vboxConnectDomainEventDeregisterAny; /* 0.8.0 */
+}
+
 #endif /* !(VBOX_API_VERSION == 2002000 || VBOX_API_VERSION >= 4000000) */
 
 /**
@@ -6381,6 +6400,7 @@ void NAME(InstallUniformedAPI)(vboxUniformedAPI *pVBoxAPI)
     pVBoxAPI->attachFloppy = _attachFloppy;
     pVBoxAPI->detachFloppy = _detachFloppy;
     pVBoxAPI->snapshotRestore = _vboxDomainSnapshotRestore;
+    pVBoxAPI->registerDomainEvent = _registerDomainEvent;
     pVBoxAPI->UPFN = _UPFN;
     pVBoxAPI->UIID = _UIID;
     pVBoxAPI->UArray = _UArray;
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index a868ac0..c0586c0 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -493,6 +493,7 @@ typedef struct {
     int (*attachFloppy)(vboxGlobalData *data, IMachine *machine, const char *src);
     int (*detachFloppy)(IMachine *machine);
     int (*snapshotRestore)(virDomainPtr dom, IMachine *machine, ISnapshot *snapshot);
+    void (*registerDomainEvent)(virDriverPtr driver);
     vboxUniformedPFN UPFN;
     vboxUniformedIID UIID;
     vboxUniformedArray UArray;
-- 
1.7.9.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]