From: "Daniel P. Berrange" <berrange(a)redhat.com>
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
---
src/conf/domain_event.c | 23 +++++++++++++++++++++++
src/conf/domain_event.h | 20 --------------------
2 files changed, 23 insertions(+), 20 deletions(-)
diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
index c6adae4..bd86bde 100644
--- a/src/conf/domain_event.c
+++ b/src/conf/domain_event.c
@@ -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;
diff --git a/src/conf/domain_event.h b/src/conf/domain_event.h
index 7eefadb..1845679 100644
--- a/src/conf/domain_event.h
+++ b/src/conf/domain_event.h
@@ -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;
--
1.7.7.4