aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2012-03-23 22:43:14 +0800
committerOsier Yang <jyang@redhat.com>2012-03-23 23:12:14 +0800
commit57ddcc235ac7f80d87f46c8b8cc5ce17e86b8b9b (patch)
tree66deb20b7e63f83ff0073b13e134a7c2c64dacf3 /include
parentqemu: Update tray status while tray moved event is emitted (diff)
downloadlibvirt-57ddcc235ac7f80d87f46c8b8cc5ce17e86b8b9b.tar.gz
libvirt-57ddcc235ac7f80d87f46c8b8cc5ce17e86b8b9b.tar.bz2
libvirt-57ddcc235ac7f80d87f46c8b8cc5ce17e86b8b9b.zip
Add support for the wakeup event
This patch introduces a new event type for the QMP event WAKEUP: VIR_DOMAIN_EVENT_ID_PMWAKEUP The event doesn't take any data, but considering there might be reason for wakeup in future, the callback definition is: typedef void (*virConnectDomainEventWakeupCallback)(virConnectPtr conn, virDomainPtr dom, int reason, void *opaque); "reason" is unused currently, always passes "0".
Diffstat (limited to 'include')
-rw-r--r--include/libvirt/libvirt.h.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 7bf1004cf..a9a15e1f7 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -3700,6 +3700,23 @@ typedef void (*virConnectDomainEventTrayChangeCallback)(virConnectPtr conn,
int reason,
void *opaque);
+/**
+ * virConnectDomainEventPMWakeupCallback:
+ * @conn: connection object
+ * @dom: domain on which the event occurred
+ * @reason: reason why the callback was called, unused currently,
+ * always passes 0
+ * @opaque: application specified data
+ *
+ * This callback occurs when the guest is waken up.
+ *
+ * The callback signature to use when registering for an event of type
+ * VIR_DOMAIN_EVENT_ID_PMWAKEUP with virConnectDomainEventRegisterAny()
+ */
+typedef void (*virConnectDomainEventPMWakeupCallback)(virConnectPtr conn,
+ virDomainPtr dom,
+ int reason,
+ void *opaque);
/**
* VIR_DOMAIN_EVENT_CALLBACK:
@@ -3722,6 +3739,7 @@ typedef enum {
VIR_DOMAIN_EVENT_ID_BLOCK_JOB = 8, /* virConnectDomainEventBlockJobCallback */
VIR_DOMAIN_EVENT_ID_DISK_CHANGE = 9, /* virConnectDomainEventDiskChangeCallback */
VIR_DOMAIN_EVENT_ID_TRAY_CHANGE = 10, /* virConnectDomainEventTrayChangeCallback */
+ VIR_DOMAIN_EVENT_ID_PMWAKEUP = 11, /* virConnectDomainEventPMWakeupCallback */
#ifdef VIR_ENUM_SENTINELS
/*