[PATCH 22/34] Removed virDomainEventPtr in favor of virObjectEventPtr

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

 



The virDomainEvent class wasn't defining anything special, thus it has
been dropped.
---
 src/conf/domain_event.c    | 179 +++++++++++++++++----------------------------
 src/conf/domain_event.h    |   5 +-
 src/libxl/libxl_driver.c   |  20 ++---
 src/lxc/lxc_driver.c       |  16 ++--
 src/lxc/lxc_process.c      |   6 +-
 src/qemu/qemu_domain.c     |   4 +-
 src/qemu/qemu_domain.h     |   2 +-
 src/qemu/qemu_driver.c     |  42 +++++------
 src/qemu/qemu_hotplug.c    |  10 +--
 src/qemu/qemu_migration.c  |  12 +--
 src/qemu/qemu_process.c    |  48 ++++++------
 src/remote/remote_driver.c |  36 ++++-----
 src/test/test_driver.c     |  36 ++++-----
 src/uml/uml_driver.c       |  18 ++---
 src/vbox/vbox_tmpl.c       |   4 +-
 src/xen/xen_driver.c       |   2 +-
 src/xen/xen_driver.h       |   2 +-
 src/xen/xen_inotify.c      |   8 +-
 src/xen/xs_internal.c      |   4 +-
 19 files changed, 204 insertions(+), 250 deletions(-)

diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index 7694fcc..d4ecc23 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -50,7 +50,7 @@ struct _virObjectEventCallbackList {
 
 struct _virObjectEventQueue {
     unsigned int count;
-    virDomainEventPtr *events;
+    virObjectEventPtr *events;
 };
 
 struct _virObjectEventState {
@@ -79,7 +79,6 @@ struct _virObjectEventCallback {
 
 
 static virClassPtr virObjectEventClass;
-static virClassPtr virDomainEventClass;
 static virClassPtr virDomainEventLifecycleClass;
 static virClassPtr virDomainEventRTCChangeClass;
 static virClassPtr virDomainEventWatchdogClass;
@@ -92,7 +91,6 @@ static virClassPtr virDomainEventBalloonChangeClass;
 static virClassPtr virDomainEventDeviceRemovedClass;
 
 static void virObjectEventDispose(void *obj);
-static void virDomainEventDispose(void *obj);
 static void virDomainEventLifecycleDispose(void *obj);
 static void virDomainEventRTCChangeDispose(void *obj);
 static void virDomainEventWatchdogDispose(void *obj);
@@ -107,16 +105,11 @@ static void virDomainEventDeviceRemovedDispose(void *obj);
 struct _virObjectEvent {
     virObject parent;
     int eventID;
-};
-
-struct _virDomainEvent {
-    virObjectEvent parent;
-
     virObjectMeta meta;
 };
 
 struct _virDomainEventLifecycle {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     int type;
     int detail;
@@ -125,7 +118,7 @@ typedef struct _virDomainEventLifecycle virDomainEventLifecycle;
 typedef virDomainEventLifecycle *virDomainEventLifecyclePtr;
 
 struct _virDomainEventRTCChange {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     long long offset;
 };
@@ -133,7 +126,7 @@ typedef struct _virDomainEventRTCChange virDomainEventRTCChange;
 typedef virDomainEventRTCChange *virDomainEventRTCChangePtr;
 
 struct _virDomainEventWatchdog {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     int action;
 };
@@ -141,7 +134,7 @@ typedef struct _virDomainEventWatchdog virDomainEventWatchdog;
 typedef virDomainEventWatchdog *virDomainEventWatchdogPtr;
 
 struct _virDomainEventIOError {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     char *srcPath;
     char *devAlias;
@@ -152,7 +145,7 @@ typedef struct _virDomainEventIOError virDomainEventIOError;
 typedef virDomainEventIOError *virDomainEventIOErrorPtr;
 
 struct _virDomainEventBlockJob {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     char *path;
     int type;
@@ -162,7 +155,7 @@ typedef struct _virDomainEventBlockJob virDomainEventBlockJob;
 typedef virDomainEventBlockJob *virDomainEventBlockJobPtr;
 
 struct _virDomainEventGraphics {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     int phase;
     virDomainEventGraphicsAddressPtr local;
@@ -174,7 +167,7 @@ typedef struct _virDomainEventGraphics virDomainEventGraphics;
 typedef virDomainEventGraphics *virDomainEventGraphicsPtr;
 
 struct _virDomainEventDiskChange {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     char *oldSrcPath;
     char *newSrcPath;
@@ -185,7 +178,7 @@ typedef struct _virDomainEventDiskChange virDomainEventDiskChange;
 typedef virDomainEventDiskChange *virDomainEventDiskChangePtr;
 
 struct _virDomainEventTrayChange {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     char *devAlias;
     int reason;
@@ -194,7 +187,7 @@ typedef struct _virDomainEventTrayChange virDomainEventTrayChange;
 typedef virDomainEventTrayChange *virDomainEventTrayChangePtr;
 
 struct _virDomainEventBalloonChange {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     /* In unit of 1024 bytes */
     unsigned long long actual;
@@ -203,7 +196,7 @@ typedef struct _virDomainEventBalloonChange virDomainEventBalloonChange;
 typedef virDomainEventBalloonChange *virDomainEventBalloonChangePtr;
 
 struct _virDomainEventDeviceRemoved {
-    virDomainEvent parent;
+    virObjectEvent parent;
 
     char *devAlias;
 };
@@ -218,67 +211,62 @@ static int virObjectEventOnceInit(void)
                                              sizeof(virObjectEvent),
                                              virObjectEventDispose)))
         return -1;
-    if (!(virDomainEventClass = virClassNew(virObjectEventClass,
-                                             "virDomainEvent",
-                                             sizeof(virDomainEvent),
-                                             virDomainEventDispose)))
-        return -1;
     if (!(virDomainEventLifecycleClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventLifecycle",
                                              sizeof(virDomainEventLifecycle),
                                              virDomainEventLifecycleDispose)))
         return -1;
     if (!(virDomainEventRTCChangeClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventRTCChange",
                                              sizeof(virDomainEventRTCChange),
                                              virDomainEventRTCChangeDispose)))
         return -1;
     if (!(virDomainEventWatchdogClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventWatchdog",
                                              sizeof(virDomainEventWatchdog),
                                              virDomainEventWatchdogDispose)))
         return -1;
     if (!(virDomainEventIOErrorClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventIOError",
                                              sizeof(virDomainEventIOError),
                                              virDomainEventIOErrorDispose)))
         return -1;
     if (!(virDomainEventGraphicsClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventGraphics",
                                              sizeof(virDomainEventGraphics),
                                              virDomainEventGraphicsDispose)))
         return -1;
     if (!(virDomainEventBlockJobClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventBlockJob",
                                              sizeof(virDomainEventBlockJob),
                                              virDomainEventBlockJobDispose)))
         return -1;
     if (!(virDomainEventDiskChangeClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventDiskChange",
                                              sizeof(virDomainEventDiskChange),
                                              virDomainEventDiskChangeDispose)))
         return -1;
     if (!(virDomainEventTrayChangeClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventTrayChange",
                                              sizeof(virDomainEventTrayChange),
                                              virDomainEventTrayChangeDispose)))
         return -1;
     if (!(virDomainEventBalloonChangeClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventBalloonChange",
                                              sizeof(virDomainEventBalloonChange),
                                              virDomainEventBalloonChangeDispose)))
         return -1;
     if (!(virDomainEventDeviceRemovedClass = virClassNew(
-                                             virDomainEventClass,
+                                             virObjectEventClass,
                                              "virDomainEventDeviceRemoved",
                                              sizeof(virDomainEventDeviceRemoved),
                                              virDomainEventDeviceRemovedDispose)))
@@ -305,16 +293,6 @@ static void virObjectEventDispose(void *obj)
     virObjectEventPtr event = obj;
 
     VIR_DEBUG("obj=%p", event);
-}
-
-static void virDomainEventDispose(void *obj)
-{
-    virDomainEventPtr event = obj;
-
-    VIR_DEBUG("obj=%p", event);
-
-    if (!event)
-        return;
 
     VIR_FREE(event->meta.name);
 }
@@ -888,7 +866,10 @@ error:
 }
 
 static void *virObjectEventNew(virClassPtr klass,
-                               int eventID)
+                               int eventID,
+                               int id,
+                               const char *name,
+                               const unsigned char *uuid)
 {
     virObjectEventPtr event;
 
@@ -907,31 +888,6 @@ static void *virObjectEventNew(virClassPtr klass,
 
     event->eventID = eventID;
 
-    VIR_DEBUG("obj=%p", event);
-    return event;
-}
-
-static void *virDomainEventNew(virClassPtr klass,
-                               int eventID,
-                               int id,
-                               const char *name,
-                               const unsigned char *uuid)
-{
-    virDomainEventPtr event;
-
-    if (virObjectEventInitialize() < 0)
-        return NULL;
-
-    if (!virClassIsDerivedFrom(klass, virDomainEventClass)) {
-        virReportInvalidArg(klass,
-                            _("Class %s must derive from virDomainEvent"),
-                            virClassName(klass));
-        return NULL;
-    }
-
-    if (!(event = virObjectEventNew(klass, eventID)))
-        return NULL;
-
     if (VIR_STRDUP(event->meta.name, name) < 0) {
         VIR_FREE(event);
         return NULL;
@@ -939,19 +895,20 @@ static void *virDomainEventNew(virClassPtr klass,
     event->meta.id = id;
     memcpy(event->meta.uuid, uuid, VIR_UUID_BUFLEN);
 
+    VIR_DEBUG("obj=%p", event);
     return event;
 }
 
 void *virDomainEventLifecycleNew(int id, const char *name,
-                                    const unsigned char *uuid,
-                                    int type, int detail)
+                                 const unsigned char *uuid,
+                                 int type, int detail)
 {
     virDomainEventLifecyclePtr event;
 
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(event = virDomainEventNew(virDomainEventLifecycleClass,
+    if (!(event = virObjectEventNew(virDomainEventLifecycleClass,
                                     VIR_DOMAIN_EVENT_ID_LIFECYCLE,
                                     id, name, uuid)))
         return NULL;
@@ -980,12 +937,12 @@ void *virDomainEventLifecycleNewFromDef(virDomainDefPtr def, int type, int detai
 }
 
 void *virDomainEventRebootNew(int id, const char *name,
-                                          const unsigned char *uuid)
+                              const unsigned char *uuid)
 {
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    return virDomainEventNew(virDomainEventClass,
+    return virObjectEventNew(virObjectEventClass,
                              VIR_DOMAIN_EVENT_ID_REBOOT,
                              id, name, uuid);
 }
@@ -995,7 +952,7 @@ void *virDomainEventRebootNewFromDom(virDomainPtr dom)
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    return virDomainEventNew(virDomainEventClass,
+    return virObjectEventNew(virObjectEventClass,
                              VIR_DOMAIN_EVENT_ID_REBOOT,
                              dom->id, dom->name, dom->uuid);
 }
@@ -1005,20 +962,20 @@ void *virDomainEventRebootNewFromObj(virDomainObjPtr obj)
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    return virDomainEventNew(virDomainEventClass,
+    return virObjectEventNew(virObjectEventClass,
                              VIR_DOMAIN_EVENT_ID_REBOOT,
                              obj->def->id, obj->def->name, obj->def->uuid);
 }
 
 void *virDomainEventRTCChangeNewFromDom(virDomainPtr dom,
-                                                    long long offset)
+                                        long long offset)
 {
     virDomainEventRTCChangePtr ev;
 
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventRTCChangeClass,
+    if (!(ev = virObjectEventNew(virDomainEventRTCChangeClass,
                                  VIR_DOMAIN_EVENT_ID_RTC_CHANGE,
                                  dom->id, dom->name, dom->uuid)))
         return NULL;
@@ -1028,14 +985,14 @@ void *virDomainEventRTCChangeNewFromDom(virDomainPtr dom,
     return ev;
 }
 void *virDomainEventRTCChangeNewFromObj(virDomainObjPtr obj,
-                                                    long long offset)
+                                        long long offset)
 {
     virDomainEventRTCChangePtr ev;
 
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventRTCChangeClass,
+    if (!(ev = virObjectEventNew(virDomainEventRTCChangeClass,
                                  VIR_DOMAIN_EVENT_ID_RTC_CHANGE,
                                  obj->def->id, obj->def->name,
                                  obj->def->uuid)))
@@ -1053,7 +1010,7 @@ void *virDomainEventWatchdogNewFromDom(virDomainPtr dom, int action)
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventWatchdogClass,
+    if (!(ev = virObjectEventNew(virDomainEventWatchdogClass,
                                  VIR_DOMAIN_EVENT_ID_WATCHDOG,
                                  dom->id, dom->name, dom->uuid)))
         return NULL;
@@ -1069,7 +1026,7 @@ void *virDomainEventWatchdogNewFromObj(virDomainObjPtr obj, int action)
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventWatchdogClass,
+    if (!(ev = virObjectEventNew(virDomainEventWatchdogClass,
                                  VIR_DOMAIN_EVENT_ID_WATCHDOG,
                                  obj->def->id, obj->def->name,
                                  obj->def->uuid)))
@@ -1092,7 +1049,7 @@ static void *virDomainEventIOErrorNewFromDomImpl(int event,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventIOErrorClass, event,
+    if (!(ev = virObjectEventNew(virDomainEventIOErrorClass, event,
                                  dom->id, dom->name, dom->uuid)))
         return NULL;
 
@@ -1119,7 +1076,7 @@ static void *virDomainEventIOErrorNewFromObjImpl(int event,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventIOErrorClass, event,
+    if (!(ev = virObjectEventNew(virDomainEventIOErrorClass, event,
                                  obj->def->id, obj->def->name,
                                  obj->def->uuid)))
         return NULL;
@@ -1190,7 +1147,7 @@ void *virDomainEventGraphicsNewFromDom(virDomainPtr dom,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventGraphicsClass,
+    if (!(ev = virObjectEventNew(virDomainEventGraphicsClass,
                                  VIR_DOMAIN_EVENT_ID_GRAPHICS,
                                  dom->id, dom->name, dom->uuid)))
         return NULL;
@@ -1219,7 +1176,7 @@ void *virDomainEventGraphicsNewFromObj(virDomainObjPtr obj,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventGraphicsClass,
+    if (!(ev = virObjectEventNew(virDomainEventGraphicsClass,
                                  VIR_DOMAIN_EVENT_ID_GRAPHICS,
                                  obj->def->id, obj->def->name,
                                  obj->def->uuid)))
@@ -1246,7 +1203,7 @@ void * virDomainEventBlockJobNew(int id, const char *name, unsigned char *uuid,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventBlockJobClass,
+    if (!(ev = virObjectEventNew(virDomainEventBlockJobClass,
                                  VIR_DOMAIN_EVENT_ID_BLOCK_JOB,
                                  id, name, uuid)))
         return NULL;
@@ -1281,12 +1238,12 @@ void *virDomainEventBlockJobNewFromDom(virDomainPtr dom,
 
 void *virDomainEventControlErrorNewFromDom(virDomainPtr dom)
 {
-    virDomainEventPtr ev;
+    virObjectEventPtr ev;
 
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventClass,
+    if (!(ev = virObjectEventNew(virObjectEventClass,
                                  VIR_DOMAIN_EVENT_ID_CONTROL_ERROR,
                                  dom->id, dom->name, dom->uuid)))
         return NULL;
@@ -1296,12 +1253,12 @@ void *virDomainEventControlErrorNewFromDom(virDomainPtr dom)
 
 void *virDomainEventControlErrorNewFromObj(virDomainObjPtr obj)
 {
-    virDomainEventPtr ev;
+    virObjectEventPtr ev;
 
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventClass,
+    if (!(ev = virObjectEventNew(virObjectEventClass,
                                  VIR_DOMAIN_EVENT_ID_CONTROL_ERROR,
                                  obj->def->id, obj->def->name,
                                  obj->def->uuid)))
@@ -1321,7 +1278,7 @@ void *virDomainEventDiskChangeNew(int id, const char *name,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventDiskChangeClass,
+    if (!(ev = virObjectEventNew(virDomainEventDiskChangeClass,
                                  VIR_DOMAIN_EVENT_ID_DISK_CHANGE,
                                  id, name, uuid)))
         return NULL;
@@ -1377,7 +1334,7 @@ void *virDomainEventTrayChangeNew(int id, const char *name,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventTrayChangeClass,
+    if (!(ev = virObjectEventNew(virDomainEventTrayChangeClass,
                                  VIR_DOMAIN_EVENT_ID_TRAY_CHANGE,
                                  id, name, uuid)))
         return NULL;
@@ -1416,12 +1373,12 @@ void *virDomainEventTrayChangeNewFromDom(virDomainPtr dom,
 static void *virDomainEventPMWakeupNew(int id, const char *name,
                                        unsigned char *uuid)
 {
-    virDomainEventPtr ev;
+    virObjectEventPtr ev;
 
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventClass,
+    if (!(ev = virObjectEventNew(virObjectEventClass,
                                  VIR_DOMAIN_EVENT_ID_PMWAKEUP,
                                  id, name, uuid)))
         return NULL;
@@ -1444,12 +1401,12 @@ void *virDomainEventPMWakeupNewFromDom(virDomainPtr dom)
 static void *virDomainEventPMSuspendNew(int id, const char *name,
                                         unsigned char *uuid)
 {
-    virDomainEventPtr ev;
+    virObjectEventPtr ev;
 
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventClass,
+    if (!(ev = virObjectEventNew(virObjectEventClass,
                                  VIR_DOMAIN_EVENT_ID_PMSUSPEND,
                                  id, name, uuid)))
         return NULL;
@@ -1472,12 +1429,12 @@ void *virDomainEventPMSuspendNewFromDom(virDomainPtr dom)
 static void *virDomainEventPMSuspendDiskNew(int id, const char *name,
                                             unsigned char *uuid)
 {
-    virDomainEventPtr ev;
+    virObjectEventPtr ev;
 
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventClass,
+    if (!(ev = virObjectEventNew(virObjectEventClass,
                                  VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK,
                                  id, name, uuid)))
         return NULL;
@@ -1504,7 +1461,7 @@ void *virDomainEventBalloonChangeNewFromDom(virDomainPtr dom,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventBalloonChangeClass,
+    if (!(ev = virObjectEventNew(virDomainEventBalloonChangeClass,
                                  VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE,
                                  dom->id, dom->name, dom->uuid)))
         return NULL;
@@ -1521,7 +1478,7 @@ void *virDomainEventBalloonChangeNewFromObj(virDomainObjPtr obj,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventBalloonChangeClass,
+    if (!(ev = virObjectEventNew(virDomainEventBalloonChangeClass,
                                  VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE,
                                  obj->def->id, obj->def->name, obj->def->uuid)))
         return NULL;
@@ -1541,7 +1498,7 @@ static void *virDomainEventDeviceRemovedNew(int id,
     if (virObjectEventInitialize() < 0)
         return NULL;
 
-    if (!(ev = virDomainEventNew(virDomainEventDeviceRemovedClass,
+    if (!(ev = virObjectEventNew(virDomainEventDeviceRemovedClass,
                                  VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED,
                                  id, name, uuid)))
         return NULL;
@@ -1581,7 +1538,7 @@ void *virDomainEventDeviceRemovedNewFromDom(virDomainPtr dom,
  */
 static int
 virObjectEventQueuePush(virObjectEventQueuePtr evtQueue,
-                        virDomainEventPtr event)
+                        virObjectEventPtr event)
 {
     if (!evtQueue) {
         return -1;
@@ -1599,7 +1556,7 @@ virObjectEventQueuePush(virObjectEventQueuePtr evtQueue,
 
 
 typedef void (*virObjectEventDispatchFunc)(virConnectPtr conn,
-                                           virDomainEventPtr event,
+                                           virObjectEventPtr event,
                                            virConnectObjectEventGenericCallback cb,
                                            void *cbopaque,
                                            void *opaque);
@@ -1607,7 +1564,7 @@ typedef void (*virObjectEventDispatchFunc)(virConnectPtr conn,
 
 static void
 virDomainEventDispatchDefaultFunc(virConnectPtr conn,
-                                  virDomainEventPtr event,
+                                  virObjectEventPtr event,
                                   virConnectDomainEventGenericCallback cb,
                                   void *cbopaque,
                                   void *opaque ATTRIBUTE_UNUSED)
@@ -1789,7 +1746,7 @@ cleanup:
 }
 
 
-static int virDomainEventDispatchMatchCallback(virDomainEventPtr event,
+static int virObjectEventDispatchMatchCallback(virObjectEventPtr event,
                                                virObjectEventCallbackPtr cb)
 {
     if (!cb)
@@ -1817,7 +1774,7 @@ static int virDomainEventDispatchMatchCallback(virDomainEventPtr event,
 
 
 static void
-virDomainEventDispatch(virDomainEventPtr event,
+virObjectEventDispatch(virObjectEventPtr event,
                        virObjectEventCallbackListPtr callbacks,
                        virObjectEventDispatchFunc dispatch,
                        void *opaque)
@@ -1829,7 +1786,7 @@ virDomainEventDispatch(virDomainEventPtr event,
     int cbCount = callbacks->count;
 
     for (i = 0; i < cbCount; i++) {
-        if (!virDomainEventDispatchMatchCallback(event, callbacks->callbacks[i]))
+        if (!virObjectEventDispatchMatchCallback(event, callbacks->callbacks[i]))
             continue;
 
         (*dispatch)(callbacks->callbacks[i]->conn,
@@ -1850,7 +1807,7 @@ virObjectEventQueueDispatch(virObjectEventQueuePtr queue,
     size_t i;
 
     for (i = 0; i < queue->count; i++) {
-        virDomainEventDispatch(queue->events[i], callbacks, dispatch, opaque);
+        virObjectEventDispatch(queue->events[i], callbacks, dispatch, opaque);
         virObjectUnref(queue->events[i]);
     }
     VIR_FREE(queue->events);
@@ -1859,7 +1816,7 @@ virObjectEventQueueDispatch(virObjectEventQueuePtr queue,
 
 void
 virObjectEventStateQueue(virObjectEventStatePtr state,
-                         virDomainEventPtr event)
+                         virObjectEventPtr event)
 {
     if (state->timer < 0) {
         virObjectUnref(event);
@@ -1881,7 +1838,7 @@ virObjectEventStateQueue(virObjectEventStatePtr state,
 
 static void
 virObjectEventStateDispatchFunc(virConnectPtr conn,
-                                virDomainEventPtr event,
+                                virObjectEventPtr event,
                                 virConnectObjectEventGenericCallback cb,
                                 void *cbopaque,
                                 void *opaque)
diff --git a/src/conf/domain_event.h b/src/conf/domain_event.h
index 06443a0..4e438f2 100644
--- a/src/conf/domain_event.h
+++ b/src/conf/domain_event.h
@@ -41,9 +41,6 @@ typedef virObjectEventCallbackList *virObjectEventCallbackListPtr;
 typedef struct _virObjectEvent virObjectEvent;
 typedef virObjectEvent *virObjectEventPtr;
 
-typedef struct _virDomainEvent virDomainEvent;
-typedef virDomainEvent *virDomainEventPtr;
-
 typedef struct _virObjectEventQueue virObjectEventQueue;
 typedef virObjectEventQueue *virObjectEventQueuePtr;
 
@@ -169,7 +166,7 @@ typedef void (*virConnectObjectEventGenericCallback)(virConnectPtr conn,
 
 void
 virObjectEventStateQueue(virObjectEventStatePtr state,
-                         virDomainEventPtr event)
+                         virObjectEventPtr event)
     ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2);
 int virDomainEventStateRegister(virConnectPtr conn,
                                 virObjectEventStatePtr state,
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 9a598a9..692c3b7 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -100,7 +100,7 @@ libxlDomObjFromDomain(virDomainPtr dom)
 }
 
 static void
-libxlDomainEventQueue(libxlDriverPrivatePtr driver, virDomainEventPtr event)
+libxlDomainEventQueue(libxlDriverPrivatePtr driver, virObjectEventPtr event)
 {
     virObjectEventStateQueue(driver->domainEventState, event);
 }
@@ -359,7 +359,7 @@ libxlEventHandler(void *data, VIR_LIBXL_EVENT_CONST libxl_event *event)
     libxlDriverPrivatePtr driver = libxl_driver;
     libxlDomainObjPrivatePtr priv = ((virDomainObjPtr)data)->privateData;
     virDomainObjPtr vm = NULL;
-    virDomainEventPtr dom_event = NULL;
+    virObjectEventPtr dom_event = NULL;
     libxl_shutdown_reason xl_reason = event->u.domain_shutdown.shutdown_reason;
 
     if (event->type == LIBXL_EVENT_TYPE_DOMAIN_SHUTDOWN) {
@@ -546,7 +546,7 @@ libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
 {
     libxl_domain_config d_config;
     virDomainDefPtr def = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     libxlSavefileHeader hdr;
     int ret;
     uint32_t domid = 0;
@@ -1298,7 +1298,7 @@ libxlDomainSuspend(virDomainPtr dom)
     libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
     virDomainObjPtr vm;
     libxlDomainObjPrivatePtr priv;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     if (!(vm = libxlDomObjFromDomain(dom)))
@@ -1350,7 +1350,7 @@ libxlDomainResume(virDomainPtr dom)
     libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
     virDomainObjPtr vm;
     libxlDomainObjPrivatePtr priv;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     if (!(vm = libxlDomObjFromDomain(dom)))
@@ -1485,7 +1485,7 @@ libxlDomainDestroyFlags(virDomainPtr dom,
     libxlDriverPrivatePtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
     int ret = -1;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     virCheckFlags(0, -1);
 
@@ -1773,7 +1773,7 @@ libxlDoDomainSave(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
 {
     libxlDomainObjPrivatePtr priv = vm->privateData;
     libxlSavefileHeader hdr;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     char *xml = NULL;
     uint32_t xml_len;
     int fd = -1;
@@ -1963,7 +1963,7 @@ libxlDomainCoreDump(virDomainPtr dom, const char *to, unsigned int flags)
     libxlDriverPrivatePtr driver = dom->conn->privateData;
     libxlDomainObjPrivatePtr priv;
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     bool paused = false;
     int ret = -1;
 
@@ -2665,7 +2665,7 @@ libxlDomainDefineXML(virConnectPtr conn, const char *xml)
     virDomainDefPtr def = NULL;
     virDomainObjPtr vm = NULL;
     virDomainPtr dom = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virDomainDefPtr oldDef = NULL;
 
     /* Lock the driver until the virDomainObj is created and locked */
@@ -2726,7 +2726,7 @@ libxlDomainUndefineFlags(virDomainPtr dom,
     libxlDriverPrivatePtr driver = dom->conn->privateData;
     libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver);
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     char *name = NULL;
     int ret = -1;
 
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 57d64b8..c499182 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -441,7 +441,7 @@ static virDomainPtr lxcDomainDefineXML(virConnectPtr conn, const char *xml)
     virDomainDefPtr def = NULL;
     virDomainObjPtr vm = NULL;
     virDomainPtr dom = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virDomainDefPtr oldDef = NULL;
     virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
     virCapsPtr caps = NULL;
@@ -507,7 +507,7 @@ static int lxcDomainUndefineFlags(virDomainPtr dom,
 {
     virLXCDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
     virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
 
@@ -902,7 +902,7 @@ static int lxcDomainCreateWithFiles(virDomainPtr dom,
 {
     virLXCDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
     virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
 
@@ -996,7 +996,7 @@ lxcDomainCreateXMLWithFiles(virConnectPtr conn,
     virDomainObjPtr vm = NULL;
     virDomainDefPtr def = NULL;
     virDomainPtr dom = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
     virCapsPtr caps = NULL;
 
@@ -1268,7 +1268,7 @@ lxcDomainDestroyFlags(virDomainPtr dom,
 {
     virLXCDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
     virLXCDomainObjPrivatePtr priv;
 
@@ -1481,7 +1481,7 @@ static void lxcNotifyLoadDomain(virDomainObjPtr vm, int newVM, void *opaque)
     virLXCDriverPtr driver = opaque;
 
     if (newVM) {
-        virDomainEventPtr event =
+        virObjectEventPtr event =
             virDomainEventLifecycleNewFromObj(vm,
                                      VIR_DOMAIN_EVENT_DEFINED,
                                      VIR_DOMAIN_EVENT_DEFINED_ADDED);
@@ -2337,7 +2337,7 @@ static int lxcDomainSuspend(virDomainPtr dom)
 {
     virLXCDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
     virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
 
@@ -2383,7 +2383,7 @@ static int lxcDomainResume(virDomainPtr dom)
 {
     virLXCDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
     virLXCDomainObjPrivatePtr priv;
     virLXCDriverConfigPtr cfg = virLXCDriverGetConfig(driver);
diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 9b5f3f2..131b5c1 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -62,7 +62,7 @@ lxcProcessAutoDestroy(virDomainObjPtr dom,
                       void *opaque)
 {
     virLXCDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virLXCDomainObjPrivatePtr priv;
 
     VIR_DEBUG("driver=%p dom=%s conn=%p", driver, dom->def->name, conn);
@@ -490,7 +490,7 @@ static void virLXCProcessMonitorEOFNotify(virLXCMonitorPtr mon,
                                           virDomainObjPtr vm)
 {
     virLXCDriverPtr driver = lxc_driver;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virLXCDomainObjPrivatePtr priv;
 
     VIR_DEBUG("mon=%p vm=%p", mon, vm);
@@ -1394,7 +1394,7 @@ virLXCProcessAutostartDomain(virDomainObjPtr vm,
                       vm->def->name,
                       err ? err->message : "");
         } else {
-            virDomainEventPtr event =
+            virObjectEventPtr event =
                 virDomainEventLifecycleNewFromObj(vm,
                                          VIR_DOMAIN_EVENT_STARTED,
                                          VIR_DOMAIN_EVENT_STARTED_BOOTED);
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index a5fc8d6..e964c75 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -118,7 +118,7 @@ qemuDomainAsyncJobPhaseFromString(enum qemuDomainAsyncJob job,
 
 
 void qemuDomainEventQueue(virQEMUDriverPtr driver,
-                          virDomainEventPtr event)
+                          virObjectEventPtr event)
 {
     virObjectEventStateQueue(driver->domainEventState, event);
 }
@@ -2117,7 +2117,7 @@ qemuDomainCheckRemoveOptionalDisk(virQEMUDriverPtr driver,
                                   virDomainDiskDefPtr disk)
 {
     char uuid[VIR_UUID_STRING_BUFLEN];
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virDomainDiskDefPtr del_disk = NULL;
 
     virUUIDFormat(vm->def->uuid, uuid);
diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
index 77e0c20..6a92351 100644
--- a/src/qemu/qemu_domain.h
+++ b/src/qemu/qemu_domain.h
@@ -196,7 +196,7 @@ int qemuDomainAsyncJobPhaseFromString(enum qemuDomainAsyncJob job,
 void qemuDomainEventFlush(int timer, void *opaque);
 
 void qemuDomainEventQueue(virQEMUDriverPtr driver,
-                          virDomainEventPtr event);
+                          virObjectEventPtr event);
 
 int qemuDomainObjBeginJob(virQEMUDriverPtr driver,
                           virDomainObjPtr obj,
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index b6be9a8..b1c4795 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -878,7 +878,7 @@ static void qemuNotifyLoadDomain(virDomainObjPtr vm, int newVM, void *opaque)
     virQEMUDriverPtr driver = opaque;
 
     if (newVM) {
-        virDomainEventPtr event =
+        virObjectEventPtr event =
             virDomainEventLifecycleNewFromObj(vm,
                                      VIR_DOMAIN_EVENT_DEFINED,
                                      VIR_DOMAIN_EVENT_DEFINED_ADDED);
@@ -1566,8 +1566,8 @@ static virDomainPtr qemuDomainCreateXML(virConnectPtr conn,
     virDomainDefPtr def = NULL;
     virDomainObjPtr vm = NULL;
     virDomainPtr dom = NULL;
-    virDomainEventPtr event = NULL;
-    virDomainEventPtr event2 = NULL;
+    virObjectEventPtr event = NULL;
+    virObjectEventPtr event2 = NULL;
     unsigned int start_flags = VIR_QEMU_PROCESS_START_COLD;
     virQEMUCapsPtr qemuCaps = NULL;
     virCapsPtr caps = NULL;
@@ -1668,7 +1668,7 @@ static int qemuDomainSuspend(virDomainPtr dom) {
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
     int ret = -1;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     qemuDomainObjPrivatePtr priv;
     virDomainPausedReason reason;
     int eventDetail;
@@ -1749,7 +1749,7 @@ static int qemuDomainResume(virDomainPtr dom) {
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
     int ret = -1;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int state;
     virQEMUDriverConfigPtr cfg = NULL;
     virCapsPtr caps = NULL;
@@ -2074,7 +2074,7 @@ qemuDomainDestroyFlags(virDomainPtr dom,
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
     int ret = -1;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     qemuDomainObjPrivatePtr priv;
 
     virCheckFlags(VIR_DOMAIN_DESTROY_GRACEFUL, -1);
@@ -3037,7 +3037,7 @@ qemuDomainSaveInternal(virQEMUDriverPtr driver, virDomainPtr dom,
     bool was_running = false;
     int ret = -1;
     int rc;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     qemuDomainObjPrivatePtr priv = vm->privateData;
     virCapsPtr caps;
 
@@ -3517,7 +3517,7 @@ static int qemuDomainCoreDump(virDomainPtr dom,
     qemuDomainObjPrivatePtr priv;
     bool resume = false, paused = false;
     int ret = -1;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     virCheckFlags(VIR_DUMP_LIVE | VIR_DUMP_CRASH |
                   VIR_DUMP_BYPASS_CACHE | VIR_DUMP_RESET |
@@ -3822,7 +3822,7 @@ processGuestPanicEvent(virQEMUDriverPtr driver,
                        int action)
 {
     qemuDomainObjPrivatePtr priv = vm->privateData;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     if (!virDomainObjIsActive(vm)) {
@@ -5336,7 +5336,7 @@ qemuDomainSaveImageStartVM(virConnectPtr conn,
                            bool start_paused)
 {
     int ret = -1;
-    virDomainEventPtr event;
+    virObjectEventPtr event;
     int intermediatefd = -1;
     virCommandPtr cmd = NULL;
     char *errbuf = NULL;
@@ -6058,7 +6058,7 @@ qemuDomainObjStart(virConnectPtr conn,
                            VIR_NETDEV_VPORT_PROFILE_OP_CREATE, start_flags);
     virDomainAuditStart(vm, "booted", ret >= 0);
     if (ret >= 0) {
-        virDomainEventPtr event =
+        virObjectEventPtr event =
             virDomainEventLifecycleNewFromObj(vm,
                                      VIR_DOMAIN_EVENT_STARTED,
                                      VIR_DOMAIN_EVENT_STARTED_BOOTED);
@@ -6133,7 +6133,7 @@ static virDomainPtr qemuDomainDefineXML(virConnectPtr conn, const char *xml) {
     virDomainDefPtr oldDef = NULL;
     virDomainObjPtr vm = NULL;
     virDomainPtr dom = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virQEMUCapsPtr qemuCaps = NULL;
     virQEMUDriverConfigPtr cfg;
     virCapsPtr caps = NULL;
@@ -6226,7 +6226,7 @@ qemuDomainUndefineFlags(virDomainPtr dom,
 {
     virQEMUDriverPtr driver = dom->conn->privateData;
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     char *name = NULL;
     int ret = -1;
     int nsnapshots;
@@ -11663,7 +11663,7 @@ qemuDomainSnapshotCreateActiveInternal(virConnectPtr conn,
 {
     virDomainObjPtr vm = *vmptr;
     qemuDomainObjPrivatePtr priv = vm->privateData;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     bool resume = false;
     int ret = -1;
 
@@ -12249,7 +12249,7 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
 
     /* the snapshot is complete now */
     if (flags & VIR_DOMAIN_SNAPSHOT_CREATE_HALT) {
-        virDomainEventPtr event;
+        virObjectEventPtr event;
 
         event = virDomainEventLifecycleNewFromObj(vm, VIR_DOMAIN_EVENT_STOPPED,
                                          VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT);
@@ -12267,7 +12267,7 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr conn,
         /* qemu 1.3 is unable to save a domain in pm-suspended (S3)
          * state; so we must emit an event stating that it was
          * converted to paused.  */
-        virDomainEventPtr event;
+        virObjectEventPtr event;
 
         virDomainObjSetState(vm, VIR_DOMAIN_PAUSED,
                              VIR_DOMAIN_PAUSED_FROM_SNAPSHOT);
@@ -12284,7 +12284,7 @@ endjob:
         qemuProcessStartCPUs(driver, vm, conn,
                              VIR_DOMAIN_RUNNING_UNPAUSED,
                              QEMU_ASYNC_JOB_SNAPSHOT) < 0) {
-        virDomainEventPtr event = NULL;
+        virObjectEventPtr event = NULL;
         event = virDomainEventLifecycleNewFromObj(vm,
                                          VIR_DOMAIN_EVENT_SUSPENDED,
                                          VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR);
@@ -12944,8 +12944,8 @@ static int qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
     virDomainObjPtr vm = NULL;
     int ret = -1;
     virDomainSnapshotObjPtr snap = NULL;
-    virDomainEventPtr event = NULL;
-    virDomainEventPtr event2 = NULL;
+    virObjectEventPtr event = NULL;
+    virObjectEventPtr event2 = NULL;
     int detail;
     qemuDomainObjPrivatePtr priv;
     int rc;
@@ -13900,7 +13900,7 @@ cleanup:
         qemuProcessStartCPUs(driver, vm, conn,
                              VIR_DOMAIN_RUNNING_UNPAUSED,
                              QEMU_ASYNC_JOB_NONE) < 0) {
-        virDomainEventPtr event = NULL;
+        virObjectEventPtr event = NULL;
         event = virDomainEventLifecycleNewFromObj(vm,
                                          VIR_DOMAIN_EVENT_SUSPENDED,
                                          VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR);
@@ -13927,7 +13927,7 @@ qemuDomainBlockJobImpl(virDomainObjPtr vm,
     char *device = NULL;
     int ret = -1;
     bool async = false;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int idx;
     virDomainDiskDefPtr disk;
 
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 649c884..a4c8ebf 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -2427,7 +2427,7 @@ qemuDomainRemoveDiskDevice(virQEMUDriverPtr driver,
                            virDomainDiskDefPtr disk)
 {
     virDomainDeviceDef dev;
-    virDomainEventPtr event;
+    virObjectEventPtr event;
     size_t i;
 
     VIR_DEBUG("Removing disk %s from domain %p %s",
@@ -2471,7 +2471,7 @@ qemuDomainRemoveControllerDevice(virQEMUDriverPtr driver,
                                  virDomainObjPtr vm,
                                  virDomainControllerDefPtr controller)
 {
-    virDomainEventPtr event;
+    virObjectEventPtr event;
     size_t i;
 
     VIR_DEBUG("Removing controller %s from domain %p %s",
@@ -2559,7 +2559,7 @@ qemuDomainRemoveHostDevice(virQEMUDriverPtr driver,
 {
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
     virDomainNetDefPtr net = NULL;
-    virDomainEventPtr event;
+    virObjectEventPtr event;
     size_t i;
 
     VIR_DEBUG("Removing host device %s from domain %p %s",
@@ -2630,7 +2630,7 @@ qemuDomainRemoveNetDevice(virQEMUDriverPtr driver,
 {
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
     virNetDevVPortProfilePtr vport;
-    virDomainEventPtr event;
+    virObjectEventPtr event;
     size_t i;
 
     if (virDomainNetGetActualType(net) == VIR_DOMAIN_NET_TYPE_HOSTDEV) {
@@ -2695,7 +2695,7 @@ qemuDomainRemoveChrDevice(virQEMUDriverPtr driver,
                           virDomainObjPtr vm,
                           virDomainChrDefPtr chr)
 {
-    virDomainEventPtr event;
+    virObjectEventPtr event;
 
     VIR_DEBUG("Removing character device %s from domain %p %s",
               chr->info.alias, vm, vm->def->name);
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 221beea..9342062 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -1511,7 +1511,7 @@ qemuMigrationSetOffline(virQEMUDriverPtr driver,
     ret = qemuProcessStopCPUs(driver, vm, VIR_DOMAIN_PAUSED_MIGRATION,
                               QEMU_ASYNC_JOB_MIGRATION_OUT);
     if (ret == 0) {
-        virDomainEventPtr event;
+        virObjectEventPtr event;
 
         event = virDomainEventLifecycleNewFromObj(vm,
                                          VIR_DOMAIN_EVENT_SUSPENDED,
@@ -2169,7 +2169,7 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver,
                         unsigned long flags)
 {
     virDomainObjPtr vm = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
     int dataFD[2] = { -1, -1 };
     qemuDomainObjPrivatePtr priv = NULL;
@@ -2702,7 +2702,7 @@ qemuMigrationConfirmPhase(virQEMUDriverPtr driver,
                           int retcode)
 {
     qemuMigrationCookiePtr mig;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int rv = -1;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
@@ -4055,7 +4055,7 @@ qemuMigrationPerformJob(virQEMUDriverPtr driver,
                         unsigned long resource,
                         bool v3proto)
 {
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
     int resume = 0;
     virErrorPtr orig_err = NULL;
@@ -4169,7 +4169,7 @@ qemuMigrationPerformPhase(virQEMUDriverPtr driver,
                           unsigned long flags,
                           unsigned long resource)
 {
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
     bool resume;
     bool hasrefs;
@@ -4365,7 +4365,7 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
                     bool v3proto)
 {
     virDomainPtr dom = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     bool newVM = true;
     qemuMigrationCookiePtr mig = NULL;
     virErrorPtr orig_err = NULL;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 7904ee5..bbe9c68 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -286,7 +286,7 @@ qemuProcessHandleMonitorEOF(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                             void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     qemuDomainObjPrivatePtr priv;
     int eventReason = VIR_DOMAIN_EVENT_STOPPED_SHUTDOWN;
     int stopReason = VIR_DOMAIN_SHUTOFF_SHUTDOWN;
@@ -348,7 +348,7 @@ qemuProcessHandleMonitorError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                               void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     VIR_DEBUG("Received error on %p '%s'", vm, vm->def->name);
 
@@ -516,7 +516,7 @@ qemuProcessHandleReset(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                        void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event;
+    virObjectEventPtr event;
     qemuDomainObjPrivatePtr priv;
 
     virObjectLock(vm);
@@ -549,7 +549,7 @@ qemuProcessFakeReboot(void *opaque)
     virQEMUDriverPtr driver = qemu_driver;
     virDomainObjPtr vm = opaque;
     qemuDomainObjPrivatePtr priv = vm->privateData;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
     virDomainRunningReason reason = VIR_DOMAIN_RUNNING_BOOTED;
     int ret = -1;
@@ -648,7 +648,7 @@ qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
 {
     virQEMUDriverPtr driver = opaque;
     qemuDomainObjPrivatePtr priv;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     VIR_DEBUG("vm=%p", vm);
@@ -702,7 +702,7 @@ qemuProcessHandleStop(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                       void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     virObjectLock(vm);
@@ -749,7 +749,7 @@ qemuProcessHandleResume(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                         void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     virObjectLock(vm);
@@ -803,7 +803,7 @@ qemuProcessHandleRTCChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                            void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     virObjectLock(vm);
@@ -844,8 +844,8 @@ qemuProcessHandleWatchdog(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                           void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr watchdogEvent = NULL;
-    virDomainEventPtr lifecycleEvent = NULL;
+    virObjectEventPtr watchdogEvent = NULL;
+    virObjectEventPtr lifecycleEvent = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     virObjectLock(vm);
@@ -911,9 +911,9 @@ qemuProcessHandleIOError(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                          void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr ioErrorEvent = NULL;
-    virDomainEventPtr ioErrorEvent2 = NULL;
-    virDomainEventPtr lifecycleEvent = NULL;
+    virObjectEventPtr ioErrorEvent = NULL;
+    virObjectEventPtr ioErrorEvent2 = NULL;
+    virObjectEventPtr lifecycleEvent = NULL;
     const char *srcPath;
     const char *devAlias;
     virDomainDiskDefPtr disk;
@@ -972,7 +972,7 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                           void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     const char *path;
     virDomainDiskDefPtr disk;
 
@@ -1025,7 +1025,7 @@ qemuProcessHandleGraphics(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                           void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event;
+    virObjectEventPtr event;
     virDomainEventGraphicsAddressPtr localAddr = NULL;
     virDomainEventGraphicsAddressPtr remoteAddr = NULL;
     virDomainEventGraphicsSubjectPtr subject = NULL;
@@ -1104,7 +1104,7 @@ qemuProcessHandleTrayChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                             void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virDomainDiskDefPtr disk;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
@@ -1140,8 +1140,8 @@ qemuProcessHandlePMWakeup(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                           void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
-    virDomainEventPtr lifecycleEvent = NULL;
+    virObjectEventPtr event = NULL;
+    virObjectEventPtr lifecycleEvent = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     virObjectLock(vm);
@@ -1181,8 +1181,8 @@ qemuProcessHandlePMSuspend(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                            void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
-    virDomainEventPtr lifecycleEvent = NULL;
+    virObjectEventPtr event = NULL;
+    virObjectEventPtr lifecycleEvent = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     virObjectLock(vm);
@@ -1226,7 +1226,7 @@ qemuProcessHandleBalloonChange(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                                void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     virObjectLock(vm);
@@ -1253,8 +1253,8 @@ qemuProcessHandlePMSuspendDisk(qemuMonitorPtr mon ATTRIBUTE_UNUSED,
                                void *opaque)
 {
     virQEMUDriverPtr driver = opaque;
-    virDomainEventPtr event = NULL;
-    virDomainEventPtr lifecycleEvent = NULL;
+    virObjectEventPtr event = NULL;
+    virObjectEventPtr lifecycleEvent = NULL;
     virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver);
 
     virObjectLock(vm);
@@ -4628,7 +4628,7 @@ qemuProcessAutoDestroy(virDomainObjPtr dom,
 {
     virQEMUDriverPtr driver = opaque;
     qemuDomainObjPrivatePtr priv = dom->privateData;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     VIR_DEBUG("vm=%s, conn=%p", dom->def->name, conn);
 
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 9d1a7c5..4a84a52 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -150,7 +150,7 @@ static void make_nonnull_storage_vol(remote_nonnull_storage_vol *vol_dst, virSto
 static void make_nonnull_secret(remote_nonnull_secret *secret_dst, virSecretPtr secret_src);
 static void make_nonnull_nwfilter(remote_nonnull_nwfilter *nwfilter_dst, virNWFilterPtr nwfilter_src);
 static void make_nonnull_domain_snapshot(remote_nonnull_domain_snapshot *snapshot_dst, virDomainSnapshotPtr snapshot_src);
-static void remoteDomainEventQueue(struct private_data *priv, virDomainEventPtr event);
+static void remoteDomainEventQueue(struct private_data *priv, virObjectEventPtr event);
 /*----------------------------------------------------------------------*/
 
 /* Helper functions for remoteOpen. */
@@ -4380,7 +4380,7 @@ remoteDomainBuildEventLifecycle(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_lifecycle_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4402,7 +4402,7 @@ remoteDomainBuildEventReboot(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_reboot_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4424,7 +4424,7 @@ remoteDomainBuildEventRTCChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_rtc_change_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4446,7 +4446,7 @@ remoteDomainBuildEventWatchdog(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_watchdog_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4468,7 +4468,7 @@ remoteDomainBuildEventIOError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_io_error_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4493,7 +4493,7 @@ remoteDomainBuildEventIOErrorReason(virNetClientProgramPtr prog ATTRIBUTE_UNUSED
     struct private_data *priv = conn->privateData;
     remote_domain_event_io_error_reason_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4519,7 +4519,7 @@ remoteDomainBuildEventBlockJob(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_block_job_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4542,7 +4542,7 @@ remoteDomainBuildEventGraphics(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_graphics_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virDomainEventGraphicsAddressPtr localAddr = NULL;
     virDomainEventGraphicsAddressPtr remoteAddr = NULL;
     virDomainEventGraphicsSubjectPtr subject = NULL;
@@ -4622,7 +4622,7 @@ remoteDomainBuildEventControlError(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_control_error_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4645,7 +4645,7 @@ remoteDomainBuildEventDiskChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_disk_change_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4672,7 +4672,7 @@ remoteDomainBuildEventTrayChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_tray_change_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4696,7 +4696,7 @@ remoteDomainBuildEventPMWakeup(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_pmwakeup_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4718,7 +4718,7 @@ remoteDomainBuildEventPMSuspend(virNetClientProgramPtr prog ATTRIBUTE_UNUSED,
     struct private_data *priv = conn->privateData;
     remote_domain_event_pmsuspend_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4741,7 +4741,7 @@ remoteDomainBuildEventBalloonChange(virNetClientProgramPtr prog ATTRIBUTE_UNUSED
     struct private_data *priv = conn->privateData;
     remote_domain_event_balloon_change_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4763,7 +4763,7 @@ remoteDomainBuildEventPMSuspendDisk(virNetClientProgramPtr prog ATTRIBUTE_UNUSED
     struct private_data *priv = conn->privateData;
     remote_domain_event_pmsuspend_disk_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -4786,7 +4786,7 @@ remoteDomainBuildEventDeviceRemoved(virNetClientProgramPtr prog ATTRIBUTE_UNUSED
     struct private_data *priv = conn->privateData;
     remote_domain_event_device_removed_msg *msg = evdata;
     virDomainPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     dom = get_nonnull_domain(conn, msg->dom);
     if (!dom)
@@ -6690,7 +6690,7 @@ done:
 }
 
 static void
-remoteDomainEventQueue(struct private_data *priv, virDomainEventPtr event)
+remoteDomainEventQueue(struct private_data *priv, virObjectEventPtr event)
 {
     virObjectEventStateQueue(priv->domainEventState, event);
 }
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index fdd1d3e..6d2a0e2 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -122,7 +122,7 @@ static const virNodeInfo defaultNodeInfo = {
 
 static int testConnectClose(virConnectPtr conn);
 static void testDomainEventQueue(testConnPtr driver,
-                                 virDomainEventPtr event);
+                                 virObjectEventPtr event);
 
 
 static void testDriverLock(testConnPtr driver)
@@ -1615,7 +1615,7 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
     virDomainPtr ret = NULL;
     virDomainDefPtr def;
     virDomainObjPtr dom = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     virCheckFlags(0, NULL);
 
@@ -1753,7 +1753,7 @@ static int testDomainDestroy(virDomainPtr domain)
 {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     testDriverLock(privconn);
@@ -1790,7 +1790,7 @@ static int testDomainResume(virDomainPtr domain)
 {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     testDriverLock(privconn);
@@ -1831,7 +1831,7 @@ static int testDomainSuspend(virDomainPtr domain)
 {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
     int state;
 
@@ -1875,7 +1875,7 @@ static int testDomainShutdownFlags(virDomainPtr domain,
 {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     virCheckFlags(0, -1);
@@ -1927,7 +1927,7 @@ static int testDomainReboot(virDomainPtr domain,
 {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     testDriverLock(privconn);
@@ -2071,7 +2071,7 @@ testDomainSaveFlags(virDomainPtr domain, const char *path,
     int fd = -1;
     int len;
     virDomainObjPtr privdom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     virCheckFlags(0, -1);
@@ -2184,7 +2184,7 @@ testDomainRestoreFlags(virConnectPtr conn,
     int len;
     virDomainDefPtr def = NULL;
     virDomainObjPtr dom = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     virCheckFlags(0, -1);
@@ -2284,7 +2284,7 @@ static int testDomainCoreDump(virDomainPtr domain,
     testConnPtr privconn = domain->conn->privateData;
     int fd = -1;
     virDomainObjPtr privdom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     virCheckFlags(VIR_DUMP_CRASH, -1);
@@ -2783,7 +2783,7 @@ static virDomainPtr testDomainDefineXML(virConnectPtr conn,
     virDomainPtr ret = NULL;
     virDomainDefPtr def;
     virDomainObjPtr dom = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     virDomainDefPtr oldDef = NULL;
 
     testDriverLock(privconn);
@@ -2921,7 +2921,7 @@ cleanup:
 static int testDomainCreateWithFlags(virDomainPtr domain, unsigned int flags) {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     virCheckFlags(0, -1);
@@ -2969,7 +2969,7 @@ static int testDomainUndefineFlags(virDomainPtr domain,
 {
     testConnPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int nsnapshots;
     int ret = -1;
 
@@ -6029,7 +6029,7 @@ testConnectDomainEventDeregisterAny(virConnectPtr conn,
 
 /* driver must be locked before calling */
 static void testDomainEventQueue(testConnPtr driver,
-                                 virDomainEventPtr event)
+                                 virObjectEventPtr event)
 {
     virObjectEventStateQueue(driver->domainEventState, event);
 }
@@ -6151,7 +6151,7 @@ testDomainManagedSave(virDomainPtr dom, unsigned int flags)
 {
     testConnPtr privconn = dom->conn->privateData;
     virDomainObjPtr vm = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     virCheckFlags(VIR_DOMAIN_SAVE_BYPASS_CACHE |
@@ -6641,7 +6641,7 @@ testDomainSnapshotCreateXML(virDomainPtr domain,
     virDomainSnapshotDefPtr def = NULL;
     virDomainSnapshotObjPtr snap = NULL;
     virDomainSnapshotPtr snapshot = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     char *xml = NULL;
     bool update_current = true;
     bool redefine = flags & VIR_DOMAIN_SNAPSHOT_CREATE_REDEFINE;
@@ -6890,8 +6890,8 @@ testDomainRevertToSnapshot(virDomainSnapshotPtr snapshot,
     testConnPtr privconn = snapshot->domain->conn->privateData;
     virDomainObjPtr vm = NULL;
     virDomainSnapshotObjPtr snap = NULL;
-    virDomainEventPtr event = NULL;
-    virDomainEventPtr event2 = NULL;
+    virObjectEventPtr event = NULL;
+    virObjectEventPtr event2 = NULL;
     virDomainDefPtr config = NULL;
     int ret = -1;
 
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index 4c5bac5..1784eb5 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -128,7 +128,7 @@ static int umlOpenMonitor(struct uml_driver *driver,
 static int umlReadPidFile(struct uml_driver *driver,
                           virDomainObjPtr vm);
 static void umlDomainEventQueue(struct uml_driver *driver,
-                                virDomainEventPtr event);
+                                virObjectEventPtr event);
 
 static int umlStartVMDaemon(virConnectPtr conn,
                             struct uml_driver *driver,
@@ -194,7 +194,7 @@ umlAutostartDomain(virDomainObjPtr vm,
             VIR_ERROR(_("Failed to autostart VM '%s': %s"),
                       vm->def->name, err ? err->message : _("unknown error"));
         } else {
-            virDomainEventPtr event =
+            virObjectEventPtr event =
                 virDomainEventLifecycleNewFromObj(vm,
                                          VIR_DOMAIN_EVENT_STARTED,
                                          VIR_DOMAIN_EVENT_STARTED_BOOTED);
@@ -301,7 +301,7 @@ umlInotifyEvent(int watch,
     char *tmp, *name;
     struct uml_driver *driver = data;
     virDomainObjPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     umlDriverLock(driver);
     if (watch != driver->inotifyWatch)
@@ -604,7 +604,7 @@ static void umlNotifyLoadDomain(virDomainObjPtr vm, int newVM, void *opaque)
     struct uml_driver *driver = opaque;
 
     if (newVM) {
-        virDomainEventPtr event =
+        virObjectEventPtr event =
             virDomainEventLifecycleNewFromObj(vm,
                                      VIR_DOMAIN_EVENT_DEFINED,
                                      VIR_DOMAIN_EVENT_DEFINED_ADDED);
@@ -716,7 +716,7 @@ static void umlProcessAutoDestroyDom(void *payload,
     const char *uuidstr = name;
     unsigned char uuid[VIR_UUID_BUFLEN];
     virDomainObjPtr dom;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     VIR_DEBUG("conn=%p uuidstr=%s thisconn=%p", conn, uuidstr, data->conn);
 
@@ -1571,7 +1571,7 @@ static virDomainPtr umlDomainCreateXML(virConnectPtr conn, const char *xml,
     virDomainDefPtr def;
     virDomainObjPtr vm = NULL;
     virDomainPtr dom = NULL;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
 
     virCheckFlags(VIR_DOMAIN_START_AUTODESTROY, NULL);
 
@@ -1667,7 +1667,7 @@ umlDomainDestroyFlags(virDomainPtr dom,
 {
     struct uml_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     virCheckFlags(0, -1);
@@ -1993,7 +1993,7 @@ static int umlConnectNumOfDefinedDomains(virConnectPtr conn) {
 static int umlDomainCreateWithFlags(virDomainPtr dom, unsigned int flags) {
     struct uml_driver *driver = dom->conn->privateData;
     virDomainObjPtr vm;
-    virDomainEventPtr event = NULL;
+    virObjectEventPtr event = NULL;
     int ret = -1;
 
     virCheckFlags(VIR_DOMAIN_START_AUTODESTROY, -1);
@@ -2691,7 +2691,7 @@ umlConnectDomainEventDeregisterAny(virConnectPtr conn,
 
 /* driver must be locked before calling */
 static void umlDomainEventQueue(struct uml_driver *driver,
-                                virDomainEventPtr event)
+                                virObjectEventPtr event)
 {
     virObjectEventStateQueue(driver->domainEventState, event);
 }
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 6e930ee..3cb65cf 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -6954,7 +6954,7 @@ vboxCallbackOnMachineStateChange(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
 
         dom = vboxDomainLookupByUUID(g_pVBoxGlobalData->conn, uuid);
         if (dom) {
-            virDomainEventPtr ev;
+            virObjectEventPtr ev;
 
             if (state == MachineState_Starting) {
                 event  = VIR_DOMAIN_EVENT_STARTED;
@@ -7073,7 +7073,7 @@ vboxCallbackOnMachineRegistered(IVirtualBoxCallback *pThis ATTRIBUTE_UNUSED,
 
         dom = vboxDomainLookupByUUID(g_pVBoxGlobalData->conn, uuid);
         if (dom) {
-            virDomainEventPtr ev;
+            virObjectEventPtr ev;
 
             /* CURRENT LIMITATION: we never get the VIR_DOMAIN_EVENT_UNDEFINED
              * event because the when the machine is de-registered the call
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 82c1887..4103dc9 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2946,7 +2946,7 @@ xenUnifiedRemoveDomainInfo(xenUnifiedDomainInfoListPtr list,
  *
  */
 void xenUnifiedDomainEventDispatch(xenUnifiedPrivatePtr priv,
-                                    virDomainEventPtr event)
+                                    virObjectEventPtr event)
 {
     if (!priv)
         return;
diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h
index a4b9149..b8c1c27 100644
--- a/src/xen/xen_driver.h
+++ b/src/xen/xen_driver.h
@@ -199,7 +199,7 @@ int  xenUnifiedRemoveDomainInfo(xenUnifiedDomainInfoListPtr info,
                                 int id, char *name,
                                 unsigned char *uuid);
 void xenUnifiedDomainEventDispatch (xenUnifiedPrivatePtr priv,
-                                    virDomainEventPtr event);
+                                    virObjectEventPtr event);
 unsigned long xenUnifiedVersion(void);
 int xenUnifiedConnectGetMaxVcpus(virConnectPtr conn, const char *type);
 
diff --git a/src/xen/xen_inotify.c b/src/xen/xen_inotify.c
index defbe44..2e9787f 100644
--- a/src/xen/xen_inotify.c
+++ b/src/xen/xen_inotify.c
@@ -135,13 +135,13 @@ xenInotifyDomainLookup(virConnectPtr conn,
         return xenInotifyXendDomainsDirLookup(conn, filename, name, uuid);
 }
 
-static virDomainEventPtr
+static virObjectEventPtr
 xenInotifyDomainEventFromFile(virConnectPtr conn,
                               const char *filename,
                               int type,
                               int detail)
 {
-    virDomainEventPtr event;
+    virObjectEventPtr event;
     char *name = NULL;
     unsigned char uuid[VIR_UUID_BUFLEN];
 
@@ -290,7 +290,7 @@ reread:
                  priv->configDir, name);
 
         if (e->mask & (IN_DELETE | IN_MOVED_FROM)) {
-            virDomainEventPtr event =
+            virObjectEventPtr event =
                 xenInotifyDomainEventFromFile(conn, fname,
                                               VIR_DOMAIN_EVENT_UNDEFINED,
                                               VIR_DOMAIN_EVENT_UNDEFINED_REMOVED);
@@ -306,7 +306,7 @@ reread:
                 goto cleanup;
             }
         } else if (e->mask & (IN_CREATE | IN_CLOSE_WRITE | IN_MOVED_TO)) {
-            virDomainEventPtr event;
+            virObjectEventPtr event;
             if (xenInotifyAddDomainConfigInfo(conn, fname) < 0) {
                 virReportError(VIR_ERR_INTERNAL_ERROR,
                                "%s", _("Error adding file to config cache"));
diff --git a/src/xen/xs_internal.c b/src/xen/xs_internal.c
index c12e123..9be7591 100644
--- a/src/xen/xs_internal.c
+++ b/src/xen/xs_internal.c
@@ -835,7 +835,7 @@ retry:
         }
 
         if (!found) {
-            virDomainEventPtr event;
+            virObjectEventPtr event;
             char *name;
             unsigned char uuid[VIR_UUID_BUFLEN];
 
@@ -918,7 +918,7 @@ retry:
         }
 
         if (!found) {
-            virDomainEventPtr event =
+            virObjectEventPtr event =
                 virDomainEventLifecycleNew(-1,
                                            priv->activeDomainList->doms[j]->name,
                                            priv->activeDomainList->doms[j]->uuid,
-- 
1.8.4.2

--
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]