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>
This commit is contained in:
Lai Jiangshan 2011-06-07 17:11:12 +08:00 committed by Eric Blake
parent a8f12a16c8
commit 973564094f
3 changed files with 30 additions and 1 deletions

View File

@ -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
*/

View File

@ -362,6 +362,7 @@ skip_impl = (
'virNodeDeviceListCaps',
'virConnectBaselineCPU',
'virDomainRevertToSnapshot',
'virDomainSendKey',
)

View File

@ -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 ....