#include "uuid.h"
#include "remote_driver.h"
#include "conf.h"
-#include "event.h"
#include "event_poll.h"
#include "memory.h"
#include "stream.h"
#include "libvirtd.h"
#include "mdns.h"
-#include "event.h"
#include "event_poll.h"
#include "memory.h"
int virEventRegisterDefaultImpl(void);
int virEventRunDefaultImpl(void);
+int virEventAddHandle(int fd, int events,
+ virEventHandleCallback cb,
+ void *opaque,
+ virFreeCallback ff);
+void virEventUpdateHandle(int watch, int events);
+int virEventRemoveHandle(int watch);
+
+int virEventAddTimeout(int frequency,
+ virEventTimeoutCallback cb,
+ void *opaque,
+ virFreeCallback ff);
+void virEventUpdateTimeout(int timer, int frequency);
+int virEventRemoveTimeout(int timer);
+
/*
* Secret manipulation API
*/
'virStreamRecv', # overridden in libvirt-override-virStream.py
'virStreamSend', # overridden in libvirt-override-virStream.py
+ # XXX: Skip for now, some work needed to handle Timeout/Handle callbacks
+ 'virEventAddHandle',
+ 'virEventRemoveHandle',
+ 'virEventUpdateHandle',
+ 'virEventAddTimeout',
+ 'virEventRemoveTimeout',
+ 'virEventUpdateTimeout',
+
# 'Ref' functions have no use for bindings users.
"virConnectRef",
"virDomainRef",
#include <config.h>
#include "domain_event.h"
-#include "event.h"
#include "logging.h"
#include "datatypes.h"
#include "memory.h"
#ifndef __DOMAIN_EVENT_H__
# define __DOMAIN_EVENT_H__
-# include "event.h"
# include "domain_conf.h"
typedef struct _virDomainEventCallback virDomainEventCallback;
#include "datatypes.h"
#include "logging.h"
#include "memory.h"
-#include "event.h"
#include "util.h"
#include "files.h"
#include "configmake.h"
ebtablesRemoveForwardAllowIn;
-# event.h
-virEventAddHandle;
-virEventAddTimeout;
-virEventRemoveHandle;
-virEventRemoveTimeout;
-virEventUpdateHandle;
-virEventUpdateTimeout;
-
-
# event_poll.h
virEventPollToNativeEvents;
virEventPollFromNativeEvents;
virDomainGetControlInfo;
virDomainPinVcpuFlags;
virDomainSendKey;
+ virEventAddHandle;
+ virEventAddTimeout;
+ virEventRemoveHandle;
+ virEventRemoveTimeout;
+ virEventUpdateHandle;
+ virEventUpdateTimeout;
virNodeGetCPUStats;
virNodeGetMemoryStats;
} LIBVIRT_0.9.2;
#include "datatypes.h"
#include "files.h"
#include "memory.h"
-#include "event.h"
#include "uuid.h"
#include "command.h"
#include "libxl_driver.h"
#include "util.h"
#include "bridge.h"
#include "veth.h"
-#include "event.h"
#include "nodeinfo.h"
#include "uuid.h"
#include "stats_linux.h"
#include "bridge_driver.h"
#include "network_conf.h"
#include "driver.h"
-#include "event.h"
#include "buf.h"
#include "util.h"
#include "command.h"
#include "virterror_internal.h"
#include "driver.h"
#include "datatypes.h"
-#include "event.h"
#include "memory.h"
#include "uuid.h"
#include "logging.h"
#include "uuid.h"
#include "util.h"
#include "buf.h"
-#include "event.h"
#define VIR_FROM_THIS VIR_FROM_NODEDEV
#include "virterror_internal.h"
#include "datatypes.h"
#include "openvz_driver.h"
-#include "event.h"
#include "buf.h"
#include "util.h"
#include "openvz_conf.h"
#include "logging.h"
#include "virterror_internal.h"
#include "c-ctype.h"
-#include "event.h"
#include "cpu/cpu.h"
#include "ignore-value.h"
#include "uuid.h"
#include "virterror_internal.h"
#include "logging.h"
#include "datatypes.h"
-#include "event.h"
#include "buf.h"
#include "util.h"
#include "nodeinfo.h"
#include "qemu_monitor_text.h"
#include "qemu_monitor_json.h"
#include "qemu_conf.h"
-#include "event.h"
#include "virterror_internal.h"
#include "memory.h"
#include "logging.h"
#include "qemu_protocol.h"
#include "memory.h"
#include "util.h"
-#include "event.h"
#include "ignore-value.h"
#include "files.h"
#include "command.h"
#include "interface_conf.h"
#include "domain_conf.h"
#include "domain_event.h"
-#include "event.h"
#include "storage_conf.h"
#include "node_device_conf.h"
#include "xml.h"
#include "uml_driver.h"
#include "uml_conf.h"
-#include "event.h"
#include "buf.h"
#include "util.h"
#include "nodeinfo.h"
static virEventUpdateTimeoutFunc updateTimeoutImpl = NULL;
static virEventRemoveTimeoutFunc removeTimeoutImpl = NULL;
+/**
+ * virEventAddHandle: register a callback for monitoring file handle events
+ *
+ * @fd: file handle to monitor for events
+ * @events: bitset of events to watch from virEventHandleType constants
+ * @cb: callback to invoke when an event occurs
+ * @opaque: user data to pass to callback
+ *
+ * returns -1 if the file handle cannot be registered, 0 upon success
+ */
int virEventAddHandle(int fd,
int events,
virEventHandleCallback cb,
return addHandleImpl(fd, events, cb, opaque, ff);
}
+/**
+ * virEventUpdateHandle: change event set for a monitored file handle
+ *
+ * @watch: watch whose file handle to update
+ * @events: bitset of events to watch from virEventHandleType constants
+ *
+ * Will not fail if fd exists
+ */
void virEventUpdateHandle(int watch, int events) {
updateHandleImpl(watch, events);
}
+/**
+ * virEventRemoveHandle: unregister a callback from a file handle
+ *
+ * @watch: watch whose file handle to remove
+ *
+ * returns -1 if the file handle was not registered, 0 upon success
+ */
int virEventRemoveHandle(int watch) {
if (!removeHandleImpl)
return -1;
return removeHandleImpl(watch);
}
+/**
+ * virEventAddTimeout: register a callback for a timer event
+ *
+ * @frequency: time between events in milliseconds
+ * @cb: callback to invoke when an event occurs
+ * @opaque: user data to pass to callback
+ *
+ * Setting frequency to -1 will disable the timer. Setting the frequency
+ * to zero will cause it to fire on every event loop iteration.
+ *
+ * returns -1 if the timer cannot be registered, a positive
+ * integer timer id upon success
+ */
int virEventAddTimeout(int timeout,
virEventTimeoutCallback cb,
void *opaque,
return addTimeoutImpl(timeout, cb, opaque, ff);
}
+/**
+ * virEventUpdateTimeoutImpl: change frequency for a timer
+ *
+ * @timer: timer id to change
+ * @frequency: time between events in milliseconds
+ *
+ * Setting frequency to -1 will disable the timer. Setting the frequency
+ * to zero will cause it to fire on every event loop iteration.
+ *
+ * Will not fail if timer exists
+ */
void virEventUpdateTimeout(int timer, int timeout) {
updateTimeoutImpl(timer, timeout);
}
+/**
+ * virEventRemoveTimeout: unregister a callback for a timer
+ *
+ * @timer: the timer id to remove
+ *
+ * returns -1 if the timer was not registered, 0 upon success
+ */
int virEventRemoveTimeout(int timer) {
if (!removeTimeoutImpl)
return -1;
#ifndef __VIR_EVENT_H__
# define __VIR_EVENT_H__
# include "internal.h"
-/**
- * virEventAddHandle: register a callback for monitoring file handle events
- *
- * @fd: file handle to monitor for events
- * @events: bitset of events to watch from virEventHandleType constants
- * @cb: callback to invoke when an event occurs
- * @opaque: user data to pass to callback
- *
- * returns -1 if the file handle cannot be registered, 0 upon success
- */
-int virEventAddHandle(int fd, int events,
- virEventHandleCallback cb,
- void *opaque,
- virFreeCallback ff);
-
-/**
- * virEventUpdateHandle: change event set for a monitored file handle
- *
- * @watch: watch whose file handle to update
- * @events: bitset of events to watch from virEventHandleType constants
- *
- * Will not fail if fd exists
- */
-void virEventUpdateHandle(int watch, int events);
-
-/**
- * virEventRemoveHandle: unregister a callback from a file handle
- *
- * @watch: watch whose file handle to remove
- *
- * returns -1 if the file handle was not registered, 0 upon success
- */
-int virEventRemoveHandle(int watch);
-
-/**
- * virEventAddTimeout: register a callback for a timer event
- *
- * @frequency: time between events in milliseconds
- * @cb: callback to invoke when an event occurs
- * @opaque: user data to pass to callback
- *
- * Setting frequency to -1 will disable the timer. Setting the frequency
- * to zero will cause it to fire on every event loop iteration.
- *
- * returns -1 if the timer cannot be registered, a positive
- * integer timer id upon success
- */
-int virEventAddTimeout(int frequency,
- virEventTimeoutCallback cb,
- void *opaque,
- virFreeCallback ff);
-
-/**
- * virEventUpdateTimeoutImpl: change frequency for a timer
- *
- * @timer: timer id to change
- * @frequency: time between events in milliseconds
- *
- * Setting frequency to -1 will disable the timer. Setting the frequency
- * to zero will cause it to fire on every event loop iteration.
- *
- * Will not fail if timer exists
- */
-void virEventUpdateTimeout(int timer, int frequency);
-
-/**
- * virEventRemoveTimeout: unregister a callback for a timer
- *
- * @timer: the timer id to remove
- *
- * returns -1 if the timer was not registered, 0 upon success
- */
-int virEventRemoveTimeout(int timer);
#endif /* __VIR_EVENT_H__ */
#include "dirname.h"
#include "virterror_internal.h"
#include "logging.h"
-#include "event.h"
#include "buf.h"
#include "util.h"
#include "memory.h"
#include "storage_conf.h"
#include "storage_file.h"
#include "uuid.h"
-#include "event.h"
#include "memory.h"
#include "nodeinfo.h"
#include "logging.h"
#include "datatypes.h"
#include "driver.h"
#include "memory.h"
-#include "event.h"
#include "xen_driver.h"
#include "conf.h"
#include "domain_conf.h"
#include "datatypes.h"
#include "driver.h"
#include "memory.h"
-#include "event.h"
#include "logging.h"
#include "uuid.h"
#include "xen_driver.h"
# include "memory.h"
# include "virterror_internal.h"
-# include "event.h"
/* ie Ctrl-] as per telnet */
# define CTRL_CLOSE_BRACKET '\35'