1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
namespace SpiceProtocol {
[CCode (cprefix = "Controller", cheader_filename = "spice/controller_prot.h")]
namespace Controller {
[CCode (cname = "CONTROLLER_MAGIC")]
public const uint32 MAGIC;
[CCode (cname = "CONTROLLER_VERSION")]
public const int VERSION;
[Compact]
public struct InitHeader {
uint32 magic;
uint32 version;
uint32 size;
}
[Compact]
public struct Init {
InitHeader base;
uint64 credentials;
uint32 flags;
}
[CCode (cprefix = "CONTROLLER_FLAG_")]
[Flags]
public enum Flag {
EXCLUSIVE,
}
[Compact]
public struct Msg {
uint32 id;
uint32 size;
}
[CCode (cprefix = "CONTROLLER_")]
public enum MsgId {
//extrenal app -> spice client
HOST,
PORT,
SPORT,
PASSWORD,
SECURE_CHANNELS,
DISABLE_CHANNELS,
TLS_CIPHERS,
CA_FILE,
HOST_SUBJECT,
FULL_SCREEN,
SET_TITLE,
CREATE_MENU,
DELETE_MENU,
HOTKEYS,
SEND_CAD,
CONNECT,
SHOW,
HIDE,
ENABLE_SMARTCARD,
//spice client -> extrenal app
MENU_ITEM_CLICK,
}
[CCode (cname = "unsigned int", cprefix = "CONTROLLER_", has_type_id = false)]
[Flags]
public enum Display {
SET_FULL_SCREEN,
AUTO_DISPLAY_RES,
}
[Compact]
[CCode (cname = "ControllerValue")]
public struct MsgValue: Msg {
Msg base;
uint32 value;
}
[Compact]
[CCode (cname = "ControllerData")]
public struct MsgData {
Msg base;
uint8 data[0];
}
[CCode (cname = "CONTROLLER_MENU_ITEM_DELIMITER")]
public static string MENU_ITEM_DELIMITER;
[CCode (cname = "CONTROLLER_MENU_PARAM_DELIMITER")]
public static string MENU_PARAM_DELIMITER;
[CCode (cname = "SPICE_MENU_INTERNAL_ID_BASE")]
public static int MENU_INTERNAL_ID_BASE;
[CCode (cname = "SPICE_MENU_INTERNAL_ID_SHIFT")]
public static int MENU_INTERNAL_ID_SHIFT;
[CCode (cprefix = "CONTROLLER_MENU_FLAGS_", cname = "unsigned int", has_type_id = false)]
[Flags]
public enum MenuFlags {
SEPARATOR,
DISABLED,
POPUP,
CHECKED,
GRAYED,
}
}
}
|