Fixed indentation in src/conf/*_event*

This commit is contained in:
Cédric Bosdonnat 2013-12-11 11:38:03 +01:00 committed by Daniel P. Berrange
parent cd88e9293a
commit 1b07406e9e
4 changed files with 353 additions and 249 deletions

View File

@ -443,7 +443,8 @@ virDomainEventCallbackListAdd(virConnectPtr conn,
}
static void *virDomainEventNew(virClassPtr klass,
static void *
virDomainEventNew(virClassPtr klass,
int eventID,
int id,
const char *name,
@ -468,9 +469,12 @@ static void *virDomainEventNew(virClassPtr klass,
return (virObjectEventPtr)event;
}
virObjectEventPtr virDomainEventLifecycleNew(int id, const char *name,
virObjectEventPtr
virDomainEventLifecycleNew(int id,
const char *name,
const unsigned char *uuid,
int type, int detail)
int type,
int detail)
{
virDomainEventLifecyclePtr event;
@ -488,24 +492,35 @@ virObjectEventPtr virDomainEventLifecycleNew(int id, const char *name,
return (virObjectEventPtr)event;
}
virObjectEventPtr virDomainEventLifecycleNewFromDom(virDomainPtr dom, int type, int detail)
virObjectEventPtr
virDomainEventLifecycleNewFromDom(virDomainPtr dom,
int type,
int detail)
{
return virDomainEventLifecycleNew(dom->id, dom->name, dom->uuid,
type, detail);
}
virObjectEventPtr virDomainEventLifecycleNewFromObj(virDomainObjPtr obj, int type, int detail)
virObjectEventPtr
virDomainEventLifecycleNewFromObj(virDomainObjPtr obj,
int type,
int detail)
{
return virDomainEventLifecycleNewFromDef(obj->def, type, detail);
}
virObjectEventPtr virDomainEventLifecycleNewFromDef(virDomainDefPtr def, int type, int detail)
virObjectEventPtr
virDomainEventLifecycleNewFromDef(virDomainDefPtr def,
int type,
int detail)
{
return virDomainEventLifecycleNew(def->id, def->name, def->uuid,
type, detail);
}
virObjectEventPtr virDomainEventRebootNew(int id, const char *name,
virObjectEventPtr
virDomainEventRebootNew(int id,
const char *name,
const unsigned char *uuid)
{
if (virDomainEventsInitialize() < 0)
@ -516,7 +531,8 @@ virObjectEventPtr virDomainEventRebootNew(int id, const char *name,
id, name, uuid);
}
virObjectEventPtr virDomainEventRebootNewFromDom(virDomainPtr dom)
virObjectEventPtr
virDomainEventRebootNewFromDom(virDomainPtr dom)
{
if (virDomainEventsInitialize() < 0)
return NULL;
@ -526,7 +542,8 @@ virObjectEventPtr virDomainEventRebootNewFromDom(virDomainPtr dom)
dom->id, dom->name, dom->uuid);
}
virObjectEventPtr virDomainEventRebootNewFromObj(virDomainObjPtr obj)
virObjectEventPtr
virDomainEventRebootNewFromObj(virDomainObjPtr obj)
{
if (virDomainEventsInitialize() < 0)
return NULL;
@ -536,7 +553,8 @@ virObjectEventPtr virDomainEventRebootNewFromObj(virDomainObjPtr obj)
obj->def->id, obj->def->name, obj->def->uuid);
}
virObjectEventPtr virDomainEventRTCChangeNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventRTCChangeNewFromDom(virDomainPtr dom,
long long offset)
{
virDomainEventRTCChangePtr ev;
@ -553,7 +571,8 @@ virObjectEventPtr virDomainEventRTCChangeNewFromDom(virDomainPtr dom,
return (virObjectEventPtr)ev;
}
virObjectEventPtr virDomainEventRTCChangeNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventRTCChangeNewFromObj(virDomainObjPtr obj,
long long offset)
{
virDomainEventRTCChangePtr ev;
@ -572,7 +591,9 @@ virObjectEventPtr virDomainEventRTCChangeNewFromObj(virDomainObjPtr obj,
return (virObjectEventPtr)ev;
}
virObjectEventPtr virDomainEventWatchdogNewFromDom(virDomainPtr dom, int action)
virObjectEventPtr
virDomainEventWatchdogNewFromDom(virDomainPtr dom,
int action)
{
virDomainEventWatchdogPtr ev;
@ -588,7 +609,9 @@ virObjectEventPtr virDomainEventWatchdogNewFromDom(virDomainPtr dom, int action)
return (virObjectEventPtr)ev;
}
virObjectEventPtr virDomainEventWatchdogNewFromObj(virDomainObjPtr obj, int action)
virObjectEventPtr
virDomainEventWatchdogNewFromObj(virDomainObjPtr obj,
int action)
{
virDomainEventWatchdogPtr ev;
@ -606,7 +629,8 @@ virObjectEventPtr virDomainEventWatchdogNewFromObj(virDomainObjPtr obj, int acti
return (virObjectEventPtr)ev;
}
static virObjectEventPtr virDomainEventIOErrorNewFromDomImpl(int event,
static virObjectEventPtr
virDomainEventIOErrorNewFromDomImpl(int event,
virDomainPtr dom,
const char *srcPath,
const char *devAlias,
@ -633,7 +657,8 @@ static virObjectEventPtr virDomainEventIOErrorNewFromDomImpl(int event,
return (virObjectEventPtr)ev;
}
static virObjectEventPtr virDomainEventIOErrorNewFromObjImpl(int event,
static virObjectEventPtr
virDomainEventIOErrorNewFromObjImpl(int event,
virDomainObjPtr obj,
const char *srcPath,
const char *devAlias,
@ -661,7 +686,8 @@ static virObjectEventPtr virDomainEventIOErrorNewFromObjImpl(int event,
return (virObjectEventPtr)ev;
}
virObjectEventPtr virDomainEventIOErrorNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventIOErrorNewFromDom(virDomainPtr dom,
const char *srcPath,
const char *devAlias,
int action)
@ -671,7 +697,8 @@ virObjectEventPtr virDomainEventIOErrorNewFromDom(virDomainPtr dom,
action, NULL);
}
virObjectEventPtr virDomainEventIOErrorNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventIOErrorNewFromObj(virDomainObjPtr obj,
const char *srcPath,
const char *devAlias,
int action)
@ -681,7 +708,8 @@ virObjectEventPtr virDomainEventIOErrorNewFromObj(virDomainObjPtr obj,
action, NULL);
}
virObjectEventPtr virDomainEventIOErrorReasonNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventIOErrorReasonNewFromDom(virDomainPtr dom,
const char *srcPath,
const char *devAlias,
int action,
@ -692,7 +720,8 @@ virObjectEventPtr virDomainEventIOErrorReasonNewFromDom(virDomainPtr dom,
action, reason);
}
virObjectEventPtr virDomainEventIOErrorReasonNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventIOErrorReasonNewFromObj(virDomainObjPtr obj,
const char *srcPath,
const char *devAlias,
int action,
@ -704,7 +733,8 @@ virObjectEventPtr virDomainEventIOErrorReasonNewFromObj(virDomainObjPtr obj,
}
virObjectEventPtr virDomainEventGraphicsNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventGraphicsNewFromDom(virDomainPtr dom,
int phase,
virDomainEventGraphicsAddressPtr local,
virDomainEventGraphicsAddressPtr remote,
@ -733,7 +763,8 @@ virObjectEventPtr virDomainEventGraphicsNewFromDom(virDomainPtr dom,
return (virObjectEventPtr)ev;
}
virObjectEventPtr virDomainEventGraphicsNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventGraphicsNewFromObj(virDomainObjPtr obj,
int phase,
virDomainEventGraphicsAddressPtr local,
virDomainEventGraphicsAddressPtr remote,
@ -763,8 +794,8 @@ virObjectEventPtr virDomainEventGraphicsNewFromObj(virDomainObjPtr obj,
return (virObjectEventPtr)ev;
}
static
virObjectEventPtr virDomainEventBlockJobNew(int id,
static virObjectEventPtr
virDomainEventBlockJobNew(int id,
const char *name,
unsigned char *uuid,
const char *path,
@ -791,7 +822,8 @@ virObjectEventPtr virDomainEventBlockJobNew(int id,
return (virObjectEventPtr)ev;
}
virObjectEventPtr virDomainEventBlockJobNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventBlockJobNewFromObj(virDomainObjPtr obj,
const char *path,
int type,
int status)
@ -800,7 +832,8 @@ virObjectEventPtr virDomainEventBlockJobNewFromObj(virDomainObjPtr obj,
obj->def->uuid, path, type, status);
}
virObjectEventPtr virDomainEventBlockJobNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventBlockJobNewFromDom(virDomainPtr dom,
const char *path,
int type,
int status)
@ -809,7 +842,8 @@ virObjectEventPtr virDomainEventBlockJobNewFromDom(virDomainPtr dom,
path, type, status);
}
virObjectEventPtr virDomainEventControlErrorNewFromDom(virDomainPtr dom)
virObjectEventPtr
virDomainEventControlErrorNewFromDom(virDomainPtr dom)
{
virObjectEventPtr ev;
@ -824,7 +858,8 @@ virObjectEventPtr virDomainEventControlErrorNewFromDom(virDomainPtr dom)
}
virObjectEventPtr virDomainEventControlErrorNewFromObj(virDomainObjPtr obj)
virObjectEventPtr
virDomainEventControlErrorNewFromObj(virDomainObjPtr obj)
{
virObjectEventPtr ev;
@ -839,12 +874,14 @@ virObjectEventPtr virDomainEventControlErrorNewFromObj(virDomainObjPtr obj)
return ev;
}
static
virObjectEventPtr virDomainEventDiskChangeNew(int id, const char *name,
static virObjectEventPtr
virDomainEventDiskChangeNew(int id,
const char *name,
unsigned char *uuid,
const char *oldSrcPath,
const char *newSrcPath,
const char *devAlias, int reason)
const char *devAlias,
int reason)
{
virDomainEventDiskChangePtr ev;
@ -874,7 +911,8 @@ error:
return NULL;
}
virObjectEventPtr virDomainEventDiskChangeNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventDiskChangeNewFromObj(virDomainObjPtr obj,
const char *oldSrcPath,
const char *newSrcPath,
const char *devAlias,
@ -885,7 +923,8 @@ virObjectEventPtr virDomainEventDiskChangeNewFromObj(virDomainObjPtr obj,
newSrcPath, devAlias, reason);
}
virObjectEventPtr virDomainEventDiskChangeNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventDiskChangeNewFromDom(virDomainPtr dom,
const char *oldSrcPath,
const char *newSrcPath,
const char *devAlias,
@ -897,7 +936,8 @@ virObjectEventPtr virDomainEventDiskChangeNewFromDom(virDomainPtr dom,
}
static virObjectEventPtr
virDomainEventTrayChangeNew(int id, const char *name,
virDomainEventTrayChangeNew(int id,
const char *name,
unsigned char *uuid,
const char *devAlias,
int reason)
@ -924,7 +964,8 @@ error:
return NULL;
}
virObjectEventPtr virDomainEventTrayChangeNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventTrayChangeNewFromObj(virDomainObjPtr obj,
const char *devAlias,
int reason)
{
@ -935,7 +976,8 @@ virObjectEventPtr virDomainEventTrayChangeNewFromObj(virDomainObjPtr obj,
reason);
}
virObjectEventPtr virDomainEventTrayChangeNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventTrayChangeNewFromDom(virDomainPtr dom,
const char *devAlias,
int reason)
{
@ -944,7 +986,8 @@ virObjectEventPtr virDomainEventTrayChangeNewFromDom(virDomainPtr dom,
}
static virObjectEventPtr
virDomainEventPMWakeupNew(int id, const char *name,
virDomainEventPMWakeupNew(int id,
const char *name,
unsigned char *uuid)
{
virObjectEventPtr ev;
@ -975,7 +1018,8 @@ virDomainEventPMWakeupNewFromDom(virDomainPtr dom)
}
static virObjectEventPtr
virDomainEventPMSuspendNew(int id, const char *name,
virDomainEventPMSuspendNew(int id,
const char *name,
unsigned char *uuid)
{
virObjectEventPtr ev;
@ -1006,7 +1050,8 @@ virDomainEventPMSuspendNewFromDom(virDomainPtr dom)
}
static virObjectEventPtr
virDomainEventPMSuspendDiskNew(int id, const char *name,
virDomainEventPMSuspendDiskNew(int id,
const char *name,
unsigned char *uuid)
{
virObjectEventPtr ev;
@ -1035,7 +1080,8 @@ virDomainEventPMSuspendDiskNewFromDom(virDomainPtr dom)
return virDomainEventPMSuspendDiskNew(dom->id, dom->name, dom->uuid);
}
virObjectEventPtr virDomainEventBalloonChangeNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventBalloonChangeNewFromDom(virDomainPtr dom,
unsigned long long actual)
{
virDomainEventBalloonChangePtr ev;
@ -1052,7 +1098,8 @@ virObjectEventPtr virDomainEventBalloonChangeNewFromDom(virDomainPtr dom,
return (virObjectEventPtr)ev;
}
virObjectEventPtr virDomainEventBalloonChangeNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventBalloonChangeNewFromObj(virDomainObjPtr obj,
unsigned long long actual)
{
virDomainEventBalloonChangePtr ev;
@ -1070,7 +1117,8 @@ virObjectEventPtr virDomainEventBalloonChangeNewFromObj(virDomainObjPtr obj,
return (virObjectEventPtr)ev;
}
static virObjectEventPtr virDomainEventDeviceRemovedNew(int id,
static virObjectEventPtr
virDomainEventDeviceRemovedNew(int id,
const char *name,
unsigned char *uuid,
const char *devAlias)
@ -1095,14 +1143,16 @@ error:
return NULL;
}
virObjectEventPtr virDomainEventDeviceRemovedNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventDeviceRemovedNewFromObj(virDomainObjPtr obj,
const char *devAlias)
{
return virDomainEventDeviceRemovedNew(obj->def->id, obj->def->name,
obj->def->uuid, devAlias);
}
virObjectEventPtr virDomainEventDeviceRemovedNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventDeviceRemovedNewFromDom(virDomainPtr dom,
const char *devAlias)
{
return virDomainEventDeviceRemovedNew(dom->id, dom->name, dom->uuid,

View File

@ -31,113 +31,158 @@
# include "domain_conf.h"
virObjectEventPtr virDomainEventLifecycleNew(int id,
virObjectEventPtr
virDomainEventLifecycleNew(int id,
const char *name,
const unsigned char *uuid,
int type,
int detail);
virObjectEventPtr virDomainEventLifecycleNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventLifecycleNewFromDom(virDomainPtr dom,
int type,
int detail);
virObjectEventPtr virDomainEventLifecycleNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventLifecycleNewFromObj(virDomainObjPtr obj,
int type,
int detail);
virObjectEventPtr virDomainEventLifecycleNewFromDef(virDomainDefPtr def,
virObjectEventPtr
virDomainEventLifecycleNewFromDef(virDomainDefPtr def,
int type,
int detail);
virObjectEventPtr virDomainEventRebootNew(int id, const char *name, const unsigned char *uuid);
virObjectEventPtr virDomainEventRebootNewFromDom(virDomainPtr dom);
virObjectEventPtr virDomainEventRebootNewFromObj(virDomainObjPtr obj);
virObjectEventPtr
virDomainEventRebootNew(int id,
const char *name,
const unsigned char *uuid);
virObjectEventPtr
virDomainEventRebootNewFromDom(virDomainPtr dom);
virObjectEventPtr
virDomainEventRebootNewFromObj(virDomainObjPtr obj);
virObjectEventPtr virDomainEventRTCChangeNewFromDom(virDomainPtr dom, long long offset);
virObjectEventPtr virDomainEventRTCChangeNewFromObj(virDomainObjPtr obj, long long offset);
virObjectEventPtr
virDomainEventRTCChangeNewFromDom(virDomainPtr dom,
long long offset);
virObjectEventPtr
virDomainEventRTCChangeNewFromObj(virDomainObjPtr obj,
long long offset);
virObjectEventPtr virDomainEventWatchdogNewFromDom(virDomainPtr dom, int action);
virObjectEventPtr virDomainEventWatchdogNewFromObj(virDomainObjPtr obj, int action);
virObjectEventPtr
virDomainEventWatchdogNewFromDom(virDomainPtr dom,
int action);
virObjectEventPtr
virDomainEventWatchdogNewFromObj(virDomainObjPtr obj,
int action);
virObjectEventPtr virDomainEventIOErrorNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventIOErrorNewFromDom(virDomainPtr dom,
const char *srcPath,
const char *devAlias,
int action);
virObjectEventPtr virDomainEventIOErrorNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventIOErrorNewFromObj(virDomainObjPtr obj,
const char *srcPath,
const char *devAlias,
int action);
virObjectEventPtr virDomainEventIOErrorReasonNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventIOErrorReasonNewFromDom(virDomainPtr dom,
const char *srcPath,
const char *devAlias,
int action,
const char *reason);
virObjectEventPtr virDomainEventIOErrorReasonNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventIOErrorReasonNewFromObj(virDomainObjPtr obj,
const char *srcPath,
const char *devAlias,
int action,
const char *reason);
virObjectEventPtr virDomainEventGraphicsNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventGraphicsNewFromDom(virDomainPtr dom,
int phase,
virDomainEventGraphicsAddressPtr local,
virDomainEventGraphicsAddressPtr remote,
const char *authScheme,
virDomainEventGraphicsSubjectPtr subject);
virObjectEventPtr virDomainEventGraphicsNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventGraphicsNewFromObj(virDomainObjPtr obj,
int phase,
virDomainEventGraphicsAddressPtr local,
virDomainEventGraphicsAddressPtr remote,
const char *authScheme,
virDomainEventGraphicsSubjectPtr subject);
virObjectEventPtr virDomainEventControlErrorNewFromDom(virDomainPtr dom);
virObjectEventPtr virDomainEventControlErrorNewFromObj(virDomainObjPtr obj);
virObjectEventPtr
virDomainEventControlErrorNewFromDom(virDomainPtr dom);
virObjectEventPtr
virDomainEventControlErrorNewFromObj(virDomainObjPtr obj);
virObjectEventPtr virDomainEventBlockJobNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventBlockJobNewFromObj(virDomainObjPtr obj,
const char *path,
int type,
int status);
virObjectEventPtr virDomainEventBlockJobNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventBlockJobNewFromDom(virDomainPtr dom,
const char *path,
int type,
int status);
virObjectEventPtr virDomainEventDiskChangeNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventDiskChangeNewFromObj(virDomainObjPtr obj,
const char *oldSrcPath,
const char *newSrcPath,
const char *devAlias,
int reason);
virObjectEventPtr virDomainEventDiskChangeNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventDiskChangeNewFromDom(virDomainPtr dom,
const char *oldSrcPath,
const char *newSrcPath,
const char *devAlias,
int reason);
virObjectEventPtr virDomainEventTrayChangeNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventTrayChangeNewFromObj(virDomainObjPtr obj,
const char *devAlias,
int reason);
virObjectEventPtr virDomainEventTrayChangeNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventTrayChangeNewFromDom(virDomainPtr dom,
const char *devAlias,
int reason);
virObjectEventPtr virDomainEventPMWakeupNewFromObj(virDomainObjPtr obj);
virObjectEventPtr virDomainEventPMWakeupNewFromDom(virDomainPtr dom);
virObjectEventPtr virDomainEventPMSuspendNewFromObj(virDomainObjPtr obj);
virObjectEventPtr virDomainEventPMSuspendNewFromDom(virDomainPtr dom);
virObjectEventPtr
virDomainEventPMWakeupNewFromObj(virDomainObjPtr obj);
virObjectEventPtr
virDomainEventPMWakeupNewFromDom(virDomainPtr dom);
virObjectEventPtr
virDomainEventPMSuspendNewFromObj(virDomainObjPtr obj);
virObjectEventPtr
virDomainEventPMSuspendNewFromDom(virDomainPtr dom);
virObjectEventPtr virDomainEventBalloonChangeNewFromDom(virDomainPtr dom, unsigned long long actual);
virObjectEventPtr virDomainEventBalloonChangeNewFromObj(virDomainObjPtr obj, unsigned long long actual);
virObjectEventPtr
virDomainEventBalloonChangeNewFromDom(virDomainPtr dom,
unsigned long long actual);
virObjectEventPtr
virDomainEventBalloonChangeNewFromObj(virDomainObjPtr obj,
unsigned long long actual);
virObjectEventPtr virDomainEventPMSuspendDiskNewFromObj(virDomainObjPtr obj);
virObjectEventPtr virDomainEventPMSuspendDiskNewFromDom(virDomainPtr dom);
virObjectEventPtr
virDomainEventPMSuspendDiskNewFromObj(virDomainObjPtr obj);
virObjectEventPtr
virDomainEventPMSuspendDiskNewFromDom(virDomainPtr dom);
virObjectEventPtr virDomainEventDeviceRemovedNewFromObj(virDomainObjPtr obj,
virObjectEventPtr
virDomainEventDeviceRemovedNewFromObj(virDomainObjPtr obj,
const char *devAlias);
virObjectEventPtr virDomainEventDeviceRemovedNewFromDom(virDomainPtr dom,
virObjectEventPtr
virDomainEventDeviceRemovedNewFromDom(virDomainPtr dom,
const char *devAlias);
int virDomainEventStateRegister(virConnectPtr conn,
int
virDomainEventStateRegister(virConnectPtr conn,
virObjectEventStatePtr state,
virConnectDomainEventCallback callback,
void *opaque,
virFreeCallback freecb)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3);
int virDomainEventStateRegisterID(virConnectPtr conn,
int
virDomainEventStateRegisterID(virConnectPtr conn,
virObjectEventStatePtr state,
virDomainPtr dom,
int eventID,

View File

@ -46,7 +46,8 @@ static virClassPtr virObjectEventClass;
static virClassPtr virObjectEventClass;
static void virObjectEventDispose(void *obj);
static int virObjectEventOnceInit(void)
static int
virObjectEventOnceInit(void)
{
if (!(virObjectEventClass =
virClassNew(virClassForObject(),
@ -59,14 +60,16 @@ static int virObjectEventOnceInit(void)
VIR_ONCE_GLOBAL_INIT(virObjectEvent)
virClassPtr virClassForObjectEvent(void)
virClassPtr
virClassForObjectEvent(void)
{
if (virObjectEventInitialize() < 0)
return NULL;
return virObjectEventClass;
}
int virObjectEventGetEventID(void *anyobj)
int
virObjectEventGetEventID(void *anyobj)
{
virObjectEventPtr obj = anyobj;
@ -78,7 +81,8 @@ int virObjectEventGetEventID(void *anyobj)
return obj->eventID;
}
static void virObjectEventDispose(void *obj)
static void
virObjectEventDispose(void *obj)
{
virObjectEventPtr event = obj;
@ -460,7 +464,8 @@ error:
return NULL;
}
void *virObjectEventNew(virClassPtr klass,
void *
virObjectEventNew(virClassPtr klass,
int eventID,
int id,
const char *name,
@ -529,7 +534,8 @@ typedef void (*virObjectEventDispatchFunc)(virConnectPtr conn,
void *opaque);
static int virObjectEventDispatchMatchCallback(virObjectEventPtr event,
static int
virObjectEventDispatchMatchCallback(virObjectEventPtr event,
virObjectEventCallbackPtr cb)
{
if (!cb)
@ -631,8 +637,7 @@ virObjectEventStateDispatchFunc(virConnectPtr conn,
/* Drop the lock whle dispatching, for sake of re-entrancy */
virObjectEventStateUnlock(state);
switch (namespace)
{
switch (namespace) {
case VIR_EVENT_NAMESPACE_DOMAIN:
virDomainEventDispatchDefaultFunc(conn, event,
VIR_DOMAIN_EVENT_CALLBACK(cb), cbopaque, NULL);

View File

@ -75,9 +75,11 @@ struct _virObjectEvent {
virObjectMeta meta;
};
virClassPtr virClassForObjectEvent(void);
virClassPtr
virClassForObjectEvent(void);
int virObjectEventGetEventID(void *anyobj);
int
virObjectEventGetEventID(void *anyobj);
int
virObjectEventCallbackListAddID(virConnectPtr conn,
@ -101,9 +103,11 @@ void
virObjectEventStateUnlock(virObjectEventStatePtr state);
void
virObjectEventTimer(int timer, void *opaque);
virObjectEventTimer(int timer,
void *opaque);
void *virObjectEventNew(virClassPtr klass,
void *
virObjectEventNew(virClassPtr klass,
int eventID,
int id,
const char *name,