aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2011-06-07 17:11:12 +0800
committerEric Blake <eblake@redhat.com>2011-06-14 13:00:21 -0600
commit973564094f29d63d610a92909252bdf21e27d2fb (patch)
tree34dd25e987fb8f28ae5b3c49c02319cddc625651
parentremote generator: Handle (unsigned) int arrays (diff)
downloadlibvirt-973564094f29d63d610a92909252bdf21e27d2fb.tar.gz
libvirt-973564094f29d63d610a92909252bdf21e27d2fb.tar.bz2
libvirt-973564094f29d63d610a92909252bdf21e27d2fb.zip
send-key: Defining the public API
Add public virDomainSendKey() and enum libvirt_keycode_set for the @codeset. Python version of virDomainSendKey() has not been implemented yet, it will be done soon. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
-rw-r--r--include/libvirt/libvirt.h.in27
-rwxr-xr-xpython/generator.py1
-rw-r--r--src/libvirt_public.syms3
3 files changed, 30 insertions, 1 deletions
diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index 75c6f603c..8b63ba218 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -1566,6 +1566,33 @@ char * virStorageVolGetXMLDesc (virStorageVolPtr pool,
char * virStorageVolGetPath (virStorageVolPtr vol);
+/**
+ * virKeycodeSet:
+ *
+ * Enum to specify which keycode mapping is in use for virDomainSendKey().
+ */
+typedef enum {
+ VIR_KEYCODE_SET_LINUX = 0,
+ VIR_KEYCODE_SET_XT = 1,
+ VIR_KEYCODE_SET_ATSET1 = 2,
+ VIR_KEYCODE_SET_ATSET2 = 3,
+ VIR_KEYCODE_SET_ATSET3 = 4,
+} virKeycodeSet;
+
+/**
+ * VIR_DOMAIN_SEND_KEY_MAX_KEYS:
+ *
+ * Maximum number of keycodes that can be sent in one virDomainSendKey() call.
+ */
+#define VIR_DOMAIN_SEND_KEY_MAX_KEYS 16
+
+int virDomainSendKey(virDomainPtr domain,
+ unsigned int codeset,
+ unsigned int holdtime,
+ unsigned int *keycodes,
+ unsigned int nkeycodes,
+ unsigned int flags);
+
/*
* Deprecated calls
*/
diff --git a/python/generator.py b/python/generator.py
index 2cbe16812..634b78877 100755
--- a/python/generator.py
+++ b/python/generator.py
@@ -362,6 +362,7 @@ skip_impl = (
'virNodeDeviceListCaps',
'virConnectBaselineCPU',
'virDomainRevertToSnapshot',
+ 'virDomainSendKey',
)
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
index ff58e9d58..a7be36bb7 100644
--- a/src/libvirt_public.syms
+++ b/src/libvirt_public.syms
@@ -452,7 +452,8 @@ LIBVIRT_0.9.2 {
LIBVIRT_0.9.3 {
global:
- virDomainPinVcpuFlags;
+ virDomainPinVcpuFlags;
+ virDomainSendKey;
} LIBVIRT_0.9.2;
# .... define new API here using predicted next version number ....