Remove all domain event structs from header

No caller of the domain events APIs should need to poke at the
struct internals. Thus they should all be removed from the
header file

* src/conf/domain_event.h: Remove struct definitions
* src/conf/domain_event.c: Add struct definitions
This commit is contained in:
Daniel P. Berrange 2011-12-13 11:35:00 +00:00
parent 7b87a30f15
commit 06eb22df01
2 changed files with 23 additions and 20 deletions

View File

@ -43,6 +43,29 @@ struct _virDomainMeta {
typedef struct _virDomainMeta virDomainMeta;
typedef virDomainMeta *virDomainMetaPtr;
struct _virDomainEventCallbackList {
unsigned int nextID;
unsigned int count;
virDomainEventCallbackPtr *callbacks;
};
struct _virDomainEventQueue {
unsigned int count;
virDomainEventPtr *events;
};
struct _virDomainEventState {
/* The list of domain event callbacks */
virDomainEventCallbackListPtr callbacks;
/* The queue of domain events */
virDomainEventQueuePtr queue;
/* Timer for flushing events queue */
int timer;
/* Flag if we're in process of dispatching */
bool isDispatching;
virMutex lock;
};
struct _virDomainEventCallback {
int callbackID;
int eventID;

View File

@ -30,11 +30,6 @@
typedef struct _virDomainEventCallback virDomainEventCallback;
typedef virDomainEventCallback *virDomainEventCallbackPtr;
struct _virDomainEventCallbackList {
unsigned int nextID;
unsigned int count;
virDomainEventCallbackPtr *callbacks;
};
typedef struct _virDomainEventCallbackList virDomainEventCallbackList;
typedef virDomainEventCallbackList *virDomainEventCallbackListPtr;
@ -45,24 +40,9 @@ typedef virDomainEventCallbackList *virDomainEventCallbackListPtr;
typedef struct _virDomainEvent virDomainEvent;
typedef virDomainEvent *virDomainEventPtr;
struct _virDomainEventQueue {
unsigned int count;
virDomainEventPtr *events;
};
typedef struct _virDomainEventQueue virDomainEventQueue;
typedef virDomainEventQueue *virDomainEventQueuePtr;
struct _virDomainEventState {
/* The list of domain event callbacks */
virDomainEventCallbackListPtr callbacks;
/* The queue of domain events */
virDomainEventQueuePtr queue;
/* Timer for flushing events queue */
int timer;
/* Flag if we're in process of dispatching */
bool isDispatching;
virMutex lock;
};
typedef struct _virDomainEventState virDomainEventState;
typedef virDomainEventState *virDomainEventStatePtr;