libguac  0.9.9
protocol-types.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014 Glyptodon LLC
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22 
23 #ifndef _GUAC_PROTOCOL_TYPES_H
24 #define _GUAC_PROTOCOL_TYPES_H
25 
47 typedef enum guac_protocol_status {
48 
53 
58 
63 
68 
74 
80 
86 
92 
98 
104 
110 
115 
120 
125 
131 
133 
138 typedef enum guac_composite_mode {
139 
140  /*
141  * A: Source where destination transparent = S n D'
142  * B: Source where destination opaque = S n D
143  * C: Destination where source transparent = D n S'
144  * D: Destination where source opaque = D n S
145  *
146  * 0 = Active, 1 = Inactive
147  */
148  /* ABCD */
149  GUAC_COMP_ROUT = 0x2, /* 0010 - Clears destination where source opaque */
150  GUAC_COMP_ATOP = 0x6, /* 0110 - Fill where destination opaque only */
151  GUAC_COMP_XOR = 0xA, /* 1010 - XOR */
152  GUAC_COMP_ROVER = 0xB, /* 1011 - Fill where destination transparent only */
153  GUAC_COMP_OVER = 0xE, /* 1110 - Draw normally */
154  GUAC_COMP_PLUS = 0xF, /* 1111 - Add */
155 
156  /* Unimplemented in client: */
157  /* NOT IMPLEMENTED: 0000 - Clear */
158  /* NOT IMPLEMENTED: 0011 - No operation */
159  /* NOT IMPLEMENTED: 0101 - Additive IN */
160  /* NOT IMPLEMENTED: 0111 - Additive ATOP */
161  /* NOT IMPLEMENTED: 1101 - Additive RATOP */
162 
163  /* Buggy in webkit browsers, as they keep channel C on in all cases: */
164  GUAC_COMP_RIN = 0x1, /* 0001 */
165  GUAC_COMP_IN = 0x4, /* 0100 */
166  GUAC_COMP_OUT = 0x8, /* 1000 */
167  GUAC_COMP_RATOP = 0x9, /* 1001 */
168  GUAC_COMP_SRC = 0xC /* 1100 */
169 
170  /* Bitwise composite operations (binary) */
171 
172  /*
173  * A: S' & D'
174  * B: S' & D
175  * C: S & D'
176  * D: S & D
177  *
178  * 0 = Active, 1 = Inactive
179  */
180 
182 
188 
189  /* Constant functions */ /* ABCD */
190  GUAC_TRANSFER_BINARY_BLACK = 0x0, /* 0000 */
191  GUAC_TRANSFER_BINARY_WHITE = 0xF, /* 1111 */
192 
193  /* Copy functions */
194  GUAC_TRANSFER_BINARY_SRC = 0x3, /* 0011 */
195  GUAC_TRANSFER_BINARY_DEST = 0x5, /* 0101 */
196  GUAC_TRANSFER_BINARY_NSRC = 0xC, /* 1100 */
197  GUAC_TRANSFER_BINARY_NDEST = 0xA, /* 1010 */
198 
199  /* AND / NAND */
200  GUAC_TRANSFER_BINARY_AND = 0x1, /* 0001 */
201  GUAC_TRANSFER_BINARY_NAND = 0xE, /* 1110 */
202 
203  /* OR / NOR */
204  GUAC_TRANSFER_BINARY_OR = 0x7, /* 0111 */
205  GUAC_TRANSFER_BINARY_NOR = 0x8, /* 1000 */
206 
207  /* XOR / XNOR */
208  GUAC_TRANSFER_BINARY_XOR = 0x6, /* 0110 */
209  GUAC_TRANSFER_BINARY_XNOR = 0x9, /* 1001 */
210 
211  /* AND / NAND with inverted source */
212  GUAC_TRANSFER_BINARY_NSRC_AND = 0x4, /* 0100 */
213  GUAC_TRANSFER_BINARY_NSRC_NAND = 0xB, /* 1011 */
214 
215  /* OR / NOR with inverted source */
216  GUAC_TRANSFER_BINARY_NSRC_OR = 0xD, /* 1101 */
217  GUAC_TRANSFER_BINARY_NSRC_NOR = 0x2, /* 0010 */
218 
219  /* AND / NAND with inverted destination */
220  GUAC_TRANSFER_BINARY_NDEST_AND = 0x2, /* 0010 */
221  GUAC_TRANSFER_BINARY_NDEST_NAND = 0xD, /* 1101 */
222 
223  /* OR / NOR with inverted destination */
224  GUAC_TRANSFER_BINARY_NDEST_OR = 0xB, /* 1011 */
225  GUAC_TRANSFER_BINARY_NDEST_NOR = 0x4 /* 0100 */
226 
228 
232 typedef enum guac_line_cap_style {
233  GUAC_LINE_CAP_BUTT = 0x0,
234  GUAC_LINE_CAP_ROUND = 0x1,
235  GUAC_LINE_CAP_SQUARE = 0x2
237 
241 typedef enum guac_line_join_style {
242  GUAC_LINE_JOIN_BEVEL = 0x0,
243  GUAC_LINE_JOIN_MITER = 0x1,
244  GUAC_LINE_JOIN_ROUND = 0x2
246 
247 #endif
248 
The operation could not be performed due as the server is busy.
Definition: protocol-types.h:67
Permission was denied to perform the operation, and this permission will not be granted even if the u...
Definition: protocol-types.h:109
Permission was denied to perform the operation, as the user is not yet authorized (not yet logged in...
Definition: protocol-types.h:103
The operation could not be performed because bad parameters were given.
Definition: protocol-types.h:97
The operation failed because the current client is already using too many resources.
Definition: protocol-types.h:130
guac_line_join_style
Supported line join styles.
Definition: protocol-types.h:241
guac_transfer_function
Default transfer functions.
Definition: protocol-types.h:187
The requested operation is unsupported.
Definition: protocol-types.h:57
guac_line_cap_style
Supported line cap styles.
Definition: protocol-types.h:232
The client sent too much data.
Definition: protocol-types.h:119
The client took too long to respond.
Definition: protocol-types.h:114
The operation was unsuccessful due to an error or otherwise unexpected condition of the upstream serv...
Definition: protocol-types.h:79
The client sent data of an unsupported or unexpected type.
Definition: protocol-types.h:124
The operation could not be performed as the requested resource does not exist.
Definition: protocol-types.h:85
The operation could not be performed because the upstream server is not responding.
Definition: protocol-types.h:73
guac_composite_mode
Composite modes used by Guacamole draw instructions.
Definition: protocol-types.h:138
guac_protocol_status
Set of all possible status codes returned by protocol operations.
Definition: protocol-types.h:47
The operation could not be performed due to an internal failure.
Definition: protocol-types.h:62
The operation could not be performed as the requested resource is already in use. ...
Definition: protocol-types.h:91
The operation succeeded.
Definition: protocol-types.h:52