summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOsier Yang <jyang@redhat.com>2012-03-14 23:26:53 +0800
committerOsier Yang <jyang@redhat.com>2012-03-23 23:12:22 +0800
commit54d9026a2ca1338970c310e4faa7c671b511e1f9 (patch)
treeeb96604afa7ae186dda1c198f0dc53e6357ac757 /include
parentAdd support for the suspend event (diff)
downloadlibvirt-54d9026a2ca1338970c310e4faa7c671b511e1f9.tar.gz
libvirt-54d9026a2ca1338970c310e4faa7c671b511e1f9.tar.bz2
libvirt-54d9026a2ca1338970c310e4faa7c671b511e1f9.zip
New domain state pmsuspended
This introduces a new domain state pmsuspended to represent the domain which has been suspended by guest power management, e.g. (entered itno s3 state). Because a "running" state could be confused in this case, one will see the guest is paused actually while playing. And state "paused" is for the domain which was paused by virDomainSuspend.
Diffstat (limited to 'include')
-rw-r--r--include/libvirt/libvirt.h.in23
1 files changed, 16 insertions, 7 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index caf5085b9..12ba63f2d 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -86,13 +86,15 @@ typedef virDomain *virDomainPtr;
* A domain may be in different states at a given point in time
*/
typedef enum {
- VIR_DOMAIN_NOSTATE = 0, /* no state */
- VIR_DOMAIN_RUNNING = 1, /* the domain is running */
- VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
- VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
- VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
- VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
- VIR_DOMAIN_CRASHED = 6, /* the domain is crashed */
+ VIR_DOMAIN_NOSTATE = 0, /* no state */
+ VIR_DOMAIN_RUNNING = 1, /* the domain is running */
+ VIR_DOMAIN_BLOCKED = 2, /* the domain is blocked on resource */
+ VIR_DOMAIN_PAUSED = 3, /* the domain is paused by user */
+ VIR_DOMAIN_SHUTDOWN= 4, /* the domain is being shut down */
+ VIR_DOMAIN_SHUTOFF = 5, /* the domain is shut off */
+ VIR_DOMAIN_CRASHED = 6, /* the domain is crashed */
+ VIR_DOMAIN_PMSUSPENDED = 7, /* the domain is suspended by guest
+ power management */
#ifdef VIR_ENUM_SENTINELS
/*
@@ -183,6 +185,13 @@ typedef enum {
#endif
} virDomainCrashedReason;
+typedef enum {
+ VIR_DOMAIN_PMSUSPENDED_UNKNOWN = 0,
+
+#ifdef VIR_ENUM_SENTINELS
+ VIR_DOMAIN_PMSUSPENDED_LAST
+#endif
+} virDomainPMSuspendedReason;
/**
* virDomainControlState: