aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2011-10-05 18:31:55 +0100
committerMichal Privoznik <mprivozn@redhat.com>2012-01-24 12:19:51 +0100
commit0b7ddf9e7788958f0ced0de03572af25754324c8 (patch)
tree3795ace282753d5a4fd1a11cf12ceec11b438dcc /include
parentQEMU guest agent support (diff)
downloadlibvirt-0b7ddf9e7788958f0ced0de03572af25754324c8.tar.gz
libvirt-0b7ddf9e7788958f0ced0de03572af25754324c8.tar.bz2
libvirt-0b7ddf9e7788958f0ced0de03572af25754324c8.zip
Add new virDomainShutdownFlags API
Add a new API virDomainShutdownFlags and define: VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = (1 << 1), Also define some flags for the reboot API VIR_DOMAIN_REBOOT_DEFAULT = 0, VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0), VIR_DOMAIN_REBOOT_GUEST_AGENT = (1 << 1), Although these two APIs currently have the same flags, using separate enums allows them to expand separately in the future. Add stub impls of the new API for all existing drivers
Diffstat (limited to 'include')
-rw-r--r--include/libvirt/libvirt.h.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 958e5a6b7..5e6e488bc 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1200,7 +1200,22 @@ virDomainPtr virDomainLookupByUUID (virConnectPtr conn,
virDomainPtr virDomainLookupByUUIDString (virConnectPtr conn,
const char *uuid);
+typedef enum {
+ VIR_DOMAIN_SHUTDOWN_DEFAULT = 0, /* hypervisor choice */
+ VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event */
+ VIR_DOMAIN_SHUTDOWN_GUEST_AGENT = (1 << 1), /* Use guest agent */
+} virDomainShutdownFlagValues;
+
int virDomainShutdown (virDomainPtr domain);
+int virDomainShutdownFlags (virDomainPtr domain,
+ unsigned int flags);
+
+typedef enum {
+ VIR_DOMAIN_REBOOT_DEFAULT = 0, /* hypervisor choice */
+ VIR_DOMAIN_REBOOT_ACPI_POWER_BTN = (1 << 0), /* Send ACPI event */
+ VIR_DOMAIN_REBOOT_GUEST_AGENT = (1 << 1), /* Use guest agent */
+} virDomainRebootFlagValues;
+
int virDomainReboot (virDomainPtr domain,
unsigned int flags);
int virDomainReset (virDomainPtr domain,