ia64/xen-unstable

view tools/libxen/include/xen_console_protocol.h @ 14045:7819d9332fba

Split the VBD I/O statistics out into a VBD_metrics class. Document the
VBD.type field, and add it to the C bindings (this was already in Xend).

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Tue Feb 20 21:28:19 2007 +0000 (2007-02-20)
parents 5e9812e53300
children
line source
1 /*
2 * Copyright (c) 2006, XenSource Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
19 #ifndef XEN_CONSOLE_PROTOCOL_H
20 #define XEN_CONSOLE_PROTOCOL_H
23 #include "xen_common.h"
26 enum xen_console_protocol
27 {
28 /**
29 * VT100 terminal
30 */
31 XEN_CONSOLE_PROTOCOL_VT100,
33 /**
34 * Remote FrameBuffer protocol (as used in VNC)
35 */
36 XEN_CONSOLE_PROTOCOL_RFB,
38 /**
39 * Remote Desktop Protocol
40 */
41 XEN_CONSOLE_PROTOCOL_RDP
42 };
45 typedef struct xen_console_protocol_set
46 {
47 size_t size;
48 enum xen_console_protocol contents[];
49 } xen_console_protocol_set;
51 /**
52 * Allocate a xen_console_protocol_set of the given size.
53 */
54 extern xen_console_protocol_set *
55 xen_console_protocol_set_alloc(size_t size);
57 /**
58 * Free the given xen_console_protocol_set. The given set must have
59 * been allocated by this library.
60 */
61 extern void
62 xen_console_protocol_set_free(xen_console_protocol_set *set);
65 /**
66 * Return the name corresponding to the given code. This string must
67 * not be modified or freed.
68 */
69 extern const char *
70 xen_console_protocol_to_string(enum xen_console_protocol val);
73 /**
74 * Return the correct code for the given string, or set the session
75 * object to failure and return an undefined value if the given string does
76 * not match a known code.
77 */
78 extern enum xen_console_protocol
79 xen_console_protocol_from_string(xen_session *session, const char *str);
82 #endif