diff options
author | Osier Yang <jyang@redhat.com> | 2012-03-23 22:50:36 +0800 |
---|---|---|
committer | Osier Yang <jyang@redhat.com> | 2012-03-23 23:12:18 +0800 |
commit | 487c0633819b52590baa0084bf14769a3beebfaf (patch) | |
tree | 8f2bbfaceba6307def359c1932671d6595fca4ff /include | |
parent | Add support for the wakeup event (diff) | |
download | libvirt-487c0633819b52590baa0084bf14769a3beebfaf.tar.gz libvirt-487c0633819b52590baa0084bf14769a3beebfaf.tar.bz2 libvirt-487c0633819b52590baa0084bf14769a3beebfaf.zip |
Add support for the suspend event
This patch introduces a new event type for the QMP event
SUSPEND:
VIR_DOMAIN_EVENT_ID_PMSUSPEND
The event doesn't take any data, but considering there might
be reason for wakeup in future, the callback definition is:
typedef void
(*virConnectDomainEventSuspendCallback)(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.in | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index a9a15e1f7..caf5085b9 100644 --- a/include/libvirt/libvirt.h.in +++ b/include/libvirt/libvirt.h.in @@ -3719,6 +3719,24 @@ typedef void (*virConnectDomainEventPMWakeupCallback)(virConnectPtr conn, void *opaque); /** + * virConnectDomainEventPMSuspendCallback: + * @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_PMSuspend with virConnectDomainEventRegisterAny() + */ +typedef void (*virConnectDomainEventPMSuspendCallback)(virConnectPtr conn, + virDomainPtr dom, + int reason, + void *opaque); + +/** * VIR_DOMAIN_EVENT_CALLBACK: * * Used to cast the event specific callback into the generic one @@ -3740,6 +3758,7 @@ typedef enum { VIR_DOMAIN_EVENT_ID_DISK_CHANGE = 9, /* virConnectDomainEventDiskChangeCallback */ VIR_DOMAIN_EVENT_ID_TRAY_CHANGE = 10, /* virConnectDomainEventTrayChangeCallback */ VIR_DOMAIN_EVENT_ID_PMWAKEUP = 11, /* virConnectDomainEventPMWakeupCallback */ + VIR_DOMAIN_EVENT_ID_PMSUSPEND = 12, /* virConnectDomainEventPMSuspendCallback */ #ifdef VIR_ENUM_SENTINELS /* |