mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
Renamed virDomainEventNewInternal to virDomainEventNew
This change may be confusing at first, but provides a much more consistent naming scheme for the virObjectEvent children construction functions.
This commit is contained in:
parent
6ffce0f698
commit
2c0008cc3e
@ -759,7 +759,7 @@ static void *virObjectEventNew(virClassPtr klass,
|
||||
return event;
|
||||
}
|
||||
|
||||
static void *virDomainEventNewInternal(virClassPtr klass,
|
||||
static void *virDomainEventNew(virClassPtr klass,
|
||||
int eventID,
|
||||
int id,
|
||||
const char *name,
|
||||
@ -799,7 +799,7 @@ virDomainEventPtr virDomainEventLifecycleNew(int id, const char *name,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(event = virDomainEventNewInternal(virDomainEventLifecycleClass,
|
||||
if (!(event = virDomainEventNew(virDomainEventLifecycleClass,
|
||||
VIR_DOMAIN_EVENT_ID_LIFECYCLE,
|
||||
id, name, uuid)))
|
||||
return NULL;
|
||||
@ -833,7 +833,7 @@ virDomainEventPtr virDomainEventRebootNew(int id, const char *name,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
return virDomainEventNewInternal(virDomainEventClass,
|
||||
return virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_REBOOT,
|
||||
id, name, uuid);
|
||||
}
|
||||
@ -843,7 +843,7 @@ virDomainEventPtr virDomainEventRebootNewFromDom(virDomainPtr dom)
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
return virDomainEventNewInternal(virDomainEventClass,
|
||||
return virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_REBOOT,
|
||||
dom->id, dom->name, dom->uuid);
|
||||
}
|
||||
@ -853,7 +853,7 @@ virDomainEventPtr virDomainEventRebootNewFromObj(virDomainObjPtr obj)
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
return virDomainEventNewInternal(virDomainEventClass,
|
||||
return virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_REBOOT,
|
||||
obj->def->id, obj->def->name, obj->def->uuid);
|
||||
}
|
||||
@ -866,7 +866,7 @@ virDomainEventPtr virDomainEventRTCChangeNewFromDom(virDomainPtr dom,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_RTC_CHANGE,
|
||||
dom->id, dom->name, dom->uuid)))
|
||||
return NULL;
|
||||
@ -883,7 +883,7 @@ virDomainEventPtr virDomainEventRTCChangeNewFromObj(virDomainObjPtr obj,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_RTC_CHANGE,
|
||||
obj->def->id, obj->def->name,
|
||||
obj->def->uuid)))
|
||||
@ -902,7 +902,7 @@ virDomainEventPtr virDomainEventWatchdogNewFromDom(virDomainPtr dom,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_WATCHDOG,
|
||||
dom->id, dom->name, dom->uuid)))
|
||||
return NULL;
|
||||
@ -919,7 +919,7 @@ virDomainEventPtr virDomainEventWatchdogNewFromObj(virDomainObjPtr obj,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_WATCHDOG,
|
||||
obj->def->id, obj->def->name,
|
||||
obj->def->uuid)))
|
||||
@ -942,7 +942,7 @@ static virDomainEventPtr virDomainEventIOErrorNewFromDomImpl(int event,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass, event,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass, event,
|
||||
dom->id, dom->name, dom->uuid)))
|
||||
return NULL;
|
||||
|
||||
@ -969,7 +969,7 @@ static virDomainEventPtr virDomainEventIOErrorNewFromObjImpl(int event,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass, event,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass, event,
|
||||
obj->def->id, obj->def->name,
|
||||
obj->def->uuid)))
|
||||
return NULL;
|
||||
@ -1040,7 +1040,7 @@ virDomainEventPtr virDomainEventGraphicsNewFromDom(virDomainPtr dom,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_GRAPHICS,
|
||||
dom->id, dom->name, dom->uuid)))
|
||||
return NULL;
|
||||
@ -1069,7 +1069,7 @@ virDomainEventPtr virDomainEventGraphicsNewFromObj(virDomainObjPtr obj,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_GRAPHICS,
|
||||
obj->def->id, obj->def->name,
|
||||
obj->def->uuid)))
|
||||
@ -1096,7 +1096,7 @@ virDomainEventBlockJobNew(int id, const char *name, unsigned char *uuid,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_BLOCK_JOB,
|
||||
id, name, uuid)))
|
||||
return NULL;
|
||||
@ -1136,7 +1136,7 @@ virDomainEventPtr virDomainEventControlErrorNewFromDom(virDomainPtr dom)
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_CONTROL_ERROR,
|
||||
dom->id, dom->name, dom->uuid)))
|
||||
return NULL;
|
||||
@ -1151,7 +1151,7 @@ virDomainEventPtr virDomainEventControlErrorNewFromObj(virDomainObjPtr obj)
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_CONTROL_ERROR,
|
||||
obj->def->id, obj->def->name,
|
||||
obj->def->uuid)))
|
||||
@ -1171,7 +1171,7 @@ virDomainEventDiskChangeNew(int id, const char *name,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_DISK_CHANGE,
|
||||
id, name, uuid)))
|
||||
return NULL;
|
||||
@ -1227,7 +1227,7 @@ virDomainEventTrayChangeNew(int id, const char *name,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_TRAY_CHANGE,
|
||||
id, name, uuid)))
|
||||
return NULL;
|
||||
@ -1272,7 +1272,7 @@ virDomainEventPMWakeupNew(int id, const char *name,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_PMWAKEUP,
|
||||
id, name, uuid)))
|
||||
return NULL;
|
||||
@ -1303,7 +1303,7 @@ virDomainEventPMSuspendNew(int id, const char *name,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_PMSUSPEND,
|
||||
id, name, uuid)))
|
||||
return NULL;
|
||||
@ -1334,7 +1334,7 @@ virDomainEventPMSuspendDiskNew(int id, const char *name,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK,
|
||||
id, name, uuid)))
|
||||
return NULL;
|
||||
@ -1363,7 +1363,7 @@ virDomainEventPtr virDomainEventBalloonChangeNewFromDom(virDomainPtr dom,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE,
|
||||
dom->id, dom->name, dom->uuid)))
|
||||
return NULL;
|
||||
@ -1380,7 +1380,7 @@ virDomainEventPtr virDomainEventBalloonChangeNewFromObj(virDomainObjPtr obj,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_BALLOON_CHANGE,
|
||||
obj->def->id, obj->def->name, obj->def->uuid)))
|
||||
return NULL;
|
||||
@ -1401,7 +1401,7 @@ virDomainEventDeviceRemovedNew(int id,
|
||||
if (virObjectEventInitialize() < 0)
|
||||
return NULL;
|
||||
|
||||
if (!(ev = virDomainEventNewInternal(virDomainEventClass,
|
||||
if (!(ev = virDomainEventNew(virDomainEventClass,
|
||||
VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED,
|
||||
id, name, uuid)))
|
||||
return NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user