2 * This file generated automatically from xselinux.xml by c_client.py.
12 #include <stddef.h> /* for offsetof() */
16 #define ALIGNOF(type) offsetof(struct { char dummy; type member; }, member)
19 xcb_extension_t xcb_selinux_id
= { "SELinux", 0 };
21 xcb_selinux_query_version_cookie_t
22 xcb_selinux_query_version (xcb_connection_t
*c
/**< */,
23 uint8_t client_major
/**< */,
24 uint8_t client_minor
/**< */)
26 static const xcb_protocol_request_t xcb_req
= {
28 /* ext */ &xcb_selinux_id
,
29 /* opcode */ XCB_SELINUX_QUERY_VERSION
,
33 struct iovec xcb_parts
[4];
34 xcb_selinux_query_version_cookie_t xcb_ret
;
35 xcb_selinux_query_version_request_t xcb_out
;
37 xcb_out
.client_major
= client_major
;
38 xcb_out
.client_minor
= client_minor
;
40 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
41 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
42 xcb_parts
[3].iov_base
= 0;
43 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
45 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
49 xcb_selinux_query_version_cookie_t
50 xcb_selinux_query_version_unchecked (xcb_connection_t
*c
/**< */,
51 uint8_t client_major
/**< */,
52 uint8_t client_minor
/**< */)
54 static const xcb_protocol_request_t xcb_req
= {
56 /* ext */ &xcb_selinux_id
,
57 /* opcode */ XCB_SELINUX_QUERY_VERSION
,
61 struct iovec xcb_parts
[4];
62 xcb_selinux_query_version_cookie_t xcb_ret
;
63 xcb_selinux_query_version_request_t xcb_out
;
65 xcb_out
.client_major
= client_major
;
66 xcb_out
.client_minor
= client_minor
;
68 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
69 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
70 xcb_parts
[3].iov_base
= 0;
71 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
73 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
77 xcb_selinux_query_version_reply_t
*
78 xcb_selinux_query_version_reply (xcb_connection_t
*c
/**< */,
79 xcb_selinux_query_version_cookie_t cookie
/**< */,
80 xcb_generic_error_t
**e
/**< */)
82 return (xcb_selinux_query_version_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
86 xcb_selinux_set_device_create_context_sizeof (const void *_buffer
/**< */)
88 char *xcb_tmp
= (char *)_buffer
;
89 const xcb_selinux_set_device_create_context_request_t
*_aux
= (xcb_selinux_set_device_create_context_request_t
*)_buffer
;
90 unsigned int xcb_buffer_len
= 0;
91 unsigned int xcb_block_len
= 0;
92 unsigned int xcb_pad
= 0;
93 unsigned int xcb_align_to
= 0;
96 xcb_block_len
+= sizeof(xcb_selinux_set_device_create_context_request_t
);
97 xcb_tmp
+= xcb_block_len
;
98 xcb_buffer_len
+= xcb_block_len
;
101 xcb_block_len
+= _aux
->context_len
* sizeof(char);
102 xcb_tmp
+= xcb_block_len
;
103 xcb_align_to
= ALIGNOF(char);
105 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
106 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
113 return xcb_buffer_len
;
117 xcb_selinux_set_device_create_context_checked (xcb_connection_t
*c
/**< */,
118 uint32_t context_len
/**< */,
119 const char *context
/**< */)
121 static const xcb_protocol_request_t xcb_req
= {
123 /* ext */ &xcb_selinux_id
,
124 /* opcode */ XCB_SELINUX_SET_DEVICE_CREATE_CONTEXT
,
128 struct iovec xcb_parts
[6];
129 xcb_void_cookie_t xcb_ret
;
130 xcb_selinux_set_device_create_context_request_t xcb_out
;
132 xcb_out
.context_len
= context_len
;
134 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
135 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
136 xcb_parts
[3].iov_base
= 0;
137 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
139 xcb_parts
[4].iov_base
= (char *) context
;
140 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
141 xcb_parts
[5].iov_base
= 0;
142 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
144 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
149 xcb_selinux_set_device_create_context (xcb_connection_t
*c
/**< */,
150 uint32_t context_len
/**< */,
151 const char *context
/**< */)
153 static const xcb_protocol_request_t xcb_req
= {
155 /* ext */ &xcb_selinux_id
,
156 /* opcode */ XCB_SELINUX_SET_DEVICE_CREATE_CONTEXT
,
160 struct iovec xcb_parts
[6];
161 xcb_void_cookie_t xcb_ret
;
162 xcb_selinux_set_device_create_context_request_t xcb_out
;
164 xcb_out
.context_len
= context_len
;
166 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
167 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
168 xcb_parts
[3].iov_base
= 0;
169 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
171 xcb_parts
[4].iov_base
= (char *) context
;
172 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
173 xcb_parts
[5].iov_base
= 0;
174 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
176 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
181 xcb_selinux_get_device_create_context_sizeof (const void *_buffer
/**< */)
183 char *xcb_tmp
= (char *)_buffer
;
184 const xcb_selinux_get_device_create_context_reply_t
*_aux
= (xcb_selinux_get_device_create_context_reply_t
*)_buffer
;
185 unsigned int xcb_buffer_len
= 0;
186 unsigned int xcb_block_len
= 0;
187 unsigned int xcb_pad
= 0;
188 unsigned int xcb_align_to
= 0;
191 xcb_block_len
+= sizeof(xcb_selinux_get_device_create_context_reply_t
);
192 xcb_tmp
+= xcb_block_len
;
193 xcb_buffer_len
+= xcb_block_len
;
196 xcb_block_len
+= _aux
->context_len
* sizeof(char);
197 xcb_tmp
+= xcb_block_len
;
198 xcb_align_to
= ALIGNOF(char);
200 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
201 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
208 return xcb_buffer_len
;
211 xcb_selinux_get_device_create_context_cookie_t
212 xcb_selinux_get_device_create_context (xcb_connection_t
*c
/**< */)
214 static const xcb_protocol_request_t xcb_req
= {
216 /* ext */ &xcb_selinux_id
,
217 /* opcode */ XCB_SELINUX_GET_DEVICE_CREATE_CONTEXT
,
221 struct iovec xcb_parts
[4];
222 xcb_selinux_get_device_create_context_cookie_t xcb_ret
;
223 xcb_selinux_get_device_create_context_request_t xcb_out
;
226 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
227 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
228 xcb_parts
[3].iov_base
= 0;
229 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
231 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
235 xcb_selinux_get_device_create_context_cookie_t
236 xcb_selinux_get_device_create_context_unchecked (xcb_connection_t
*c
/**< */)
238 static const xcb_protocol_request_t xcb_req
= {
240 /* ext */ &xcb_selinux_id
,
241 /* opcode */ XCB_SELINUX_GET_DEVICE_CREATE_CONTEXT
,
245 struct iovec xcb_parts
[4];
246 xcb_selinux_get_device_create_context_cookie_t xcb_ret
;
247 xcb_selinux_get_device_create_context_request_t xcb_out
;
250 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
251 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
252 xcb_parts
[3].iov_base
= 0;
253 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
255 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
260 xcb_selinux_get_device_create_context_context (const xcb_selinux_get_device_create_context_reply_t
*R
/**< */)
262 return (char *) (R
+ 1);
266 xcb_selinux_get_device_create_context_context_length (const xcb_selinux_get_device_create_context_reply_t
*R
/**< */)
268 return R
->context_len
;
271 xcb_generic_iterator_t
272 xcb_selinux_get_device_create_context_context_end (const xcb_selinux_get_device_create_context_reply_t
*R
/**< */)
274 xcb_generic_iterator_t i
;
275 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
277 i
.index
= (char *) i
.data
- (char *) R
;
281 xcb_selinux_get_device_create_context_reply_t
*
282 xcb_selinux_get_device_create_context_reply (xcb_connection_t
*c
/**< */,
283 xcb_selinux_get_device_create_context_cookie_t cookie
/**< */,
284 xcb_generic_error_t
**e
/**< */)
286 return (xcb_selinux_get_device_create_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
290 xcb_selinux_set_device_context_sizeof (const void *_buffer
/**< */)
292 char *xcb_tmp
= (char *)_buffer
;
293 const xcb_selinux_set_device_context_request_t
*_aux
= (xcb_selinux_set_device_context_request_t
*)_buffer
;
294 unsigned int xcb_buffer_len
= 0;
295 unsigned int xcb_block_len
= 0;
296 unsigned int xcb_pad
= 0;
297 unsigned int xcb_align_to
= 0;
300 xcb_block_len
+= sizeof(xcb_selinux_set_device_context_request_t
);
301 xcb_tmp
+= xcb_block_len
;
302 xcb_buffer_len
+= xcb_block_len
;
305 xcb_block_len
+= _aux
->context_len
* sizeof(char);
306 xcb_tmp
+= xcb_block_len
;
307 xcb_align_to
= ALIGNOF(char);
309 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
310 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
317 return xcb_buffer_len
;
321 xcb_selinux_set_device_context_checked (xcb_connection_t
*c
/**< */,
322 uint32_t device
/**< */,
323 uint32_t context_len
/**< */,
324 const char *context
/**< */)
326 static const xcb_protocol_request_t xcb_req
= {
328 /* ext */ &xcb_selinux_id
,
329 /* opcode */ XCB_SELINUX_SET_DEVICE_CONTEXT
,
333 struct iovec xcb_parts
[6];
334 xcb_void_cookie_t xcb_ret
;
335 xcb_selinux_set_device_context_request_t xcb_out
;
337 xcb_out
.device
= device
;
338 xcb_out
.context_len
= context_len
;
340 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
341 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
342 xcb_parts
[3].iov_base
= 0;
343 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
345 xcb_parts
[4].iov_base
= (char *) context
;
346 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
347 xcb_parts
[5].iov_base
= 0;
348 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
350 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
355 xcb_selinux_set_device_context (xcb_connection_t
*c
/**< */,
356 uint32_t device
/**< */,
357 uint32_t context_len
/**< */,
358 const char *context
/**< */)
360 static const xcb_protocol_request_t xcb_req
= {
362 /* ext */ &xcb_selinux_id
,
363 /* opcode */ XCB_SELINUX_SET_DEVICE_CONTEXT
,
367 struct iovec xcb_parts
[6];
368 xcb_void_cookie_t xcb_ret
;
369 xcb_selinux_set_device_context_request_t xcb_out
;
371 xcb_out
.device
= device
;
372 xcb_out
.context_len
= context_len
;
374 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
375 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
376 xcb_parts
[3].iov_base
= 0;
377 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
379 xcb_parts
[4].iov_base
= (char *) context
;
380 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
381 xcb_parts
[5].iov_base
= 0;
382 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
384 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
389 xcb_selinux_get_device_context_sizeof (const void *_buffer
/**< */)
391 char *xcb_tmp
= (char *)_buffer
;
392 const xcb_selinux_get_device_context_reply_t
*_aux
= (xcb_selinux_get_device_context_reply_t
*)_buffer
;
393 unsigned int xcb_buffer_len
= 0;
394 unsigned int xcb_block_len
= 0;
395 unsigned int xcb_pad
= 0;
396 unsigned int xcb_align_to
= 0;
399 xcb_block_len
+= sizeof(xcb_selinux_get_device_context_reply_t
);
400 xcb_tmp
+= xcb_block_len
;
401 xcb_buffer_len
+= xcb_block_len
;
404 xcb_block_len
+= _aux
->context_len
* sizeof(char);
405 xcb_tmp
+= xcb_block_len
;
406 xcb_align_to
= ALIGNOF(char);
408 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
409 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
416 return xcb_buffer_len
;
419 xcb_selinux_get_device_context_cookie_t
420 xcb_selinux_get_device_context (xcb_connection_t
*c
/**< */,
421 uint32_t device
/**< */)
423 static const xcb_protocol_request_t xcb_req
= {
425 /* ext */ &xcb_selinux_id
,
426 /* opcode */ XCB_SELINUX_GET_DEVICE_CONTEXT
,
430 struct iovec xcb_parts
[4];
431 xcb_selinux_get_device_context_cookie_t xcb_ret
;
432 xcb_selinux_get_device_context_request_t xcb_out
;
434 xcb_out
.device
= device
;
436 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
437 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
438 xcb_parts
[3].iov_base
= 0;
439 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
441 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
445 xcb_selinux_get_device_context_cookie_t
446 xcb_selinux_get_device_context_unchecked (xcb_connection_t
*c
/**< */,
447 uint32_t device
/**< */)
449 static const xcb_protocol_request_t xcb_req
= {
451 /* ext */ &xcb_selinux_id
,
452 /* opcode */ XCB_SELINUX_GET_DEVICE_CONTEXT
,
456 struct iovec xcb_parts
[4];
457 xcb_selinux_get_device_context_cookie_t xcb_ret
;
458 xcb_selinux_get_device_context_request_t xcb_out
;
460 xcb_out
.device
= device
;
462 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
463 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
464 xcb_parts
[3].iov_base
= 0;
465 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
467 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
472 xcb_selinux_get_device_context_context (const xcb_selinux_get_device_context_reply_t
*R
/**< */)
474 return (char *) (R
+ 1);
478 xcb_selinux_get_device_context_context_length (const xcb_selinux_get_device_context_reply_t
*R
/**< */)
480 return R
->context_len
;
483 xcb_generic_iterator_t
484 xcb_selinux_get_device_context_context_end (const xcb_selinux_get_device_context_reply_t
*R
/**< */)
486 xcb_generic_iterator_t i
;
487 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
489 i
.index
= (char *) i
.data
- (char *) R
;
493 xcb_selinux_get_device_context_reply_t
*
494 xcb_selinux_get_device_context_reply (xcb_connection_t
*c
/**< */,
495 xcb_selinux_get_device_context_cookie_t cookie
/**< */,
496 xcb_generic_error_t
**e
/**< */)
498 return (xcb_selinux_get_device_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
502 xcb_selinux_set_window_create_context_sizeof (const void *_buffer
/**< */)
504 char *xcb_tmp
= (char *)_buffer
;
505 const xcb_selinux_set_window_create_context_request_t
*_aux
= (xcb_selinux_set_window_create_context_request_t
*)_buffer
;
506 unsigned int xcb_buffer_len
= 0;
507 unsigned int xcb_block_len
= 0;
508 unsigned int xcb_pad
= 0;
509 unsigned int xcb_align_to
= 0;
512 xcb_block_len
+= sizeof(xcb_selinux_set_window_create_context_request_t
);
513 xcb_tmp
+= xcb_block_len
;
514 xcb_buffer_len
+= xcb_block_len
;
517 xcb_block_len
+= _aux
->context_len
* sizeof(char);
518 xcb_tmp
+= xcb_block_len
;
519 xcb_align_to
= ALIGNOF(char);
521 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
522 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
529 return xcb_buffer_len
;
533 xcb_selinux_set_window_create_context_checked (xcb_connection_t
*c
/**< */,
534 uint32_t context_len
/**< */,
535 const char *context
/**< */)
537 static const xcb_protocol_request_t xcb_req
= {
539 /* ext */ &xcb_selinux_id
,
540 /* opcode */ XCB_SELINUX_SET_WINDOW_CREATE_CONTEXT
,
544 struct iovec xcb_parts
[6];
545 xcb_void_cookie_t xcb_ret
;
546 xcb_selinux_set_window_create_context_request_t xcb_out
;
548 xcb_out
.context_len
= context_len
;
550 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
551 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
552 xcb_parts
[3].iov_base
= 0;
553 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
555 xcb_parts
[4].iov_base
= (char *) context
;
556 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
557 xcb_parts
[5].iov_base
= 0;
558 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
560 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
565 xcb_selinux_set_window_create_context (xcb_connection_t
*c
/**< */,
566 uint32_t context_len
/**< */,
567 const char *context
/**< */)
569 static const xcb_protocol_request_t xcb_req
= {
571 /* ext */ &xcb_selinux_id
,
572 /* opcode */ XCB_SELINUX_SET_WINDOW_CREATE_CONTEXT
,
576 struct iovec xcb_parts
[6];
577 xcb_void_cookie_t xcb_ret
;
578 xcb_selinux_set_window_create_context_request_t xcb_out
;
580 xcb_out
.context_len
= context_len
;
582 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
583 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
584 xcb_parts
[3].iov_base
= 0;
585 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
587 xcb_parts
[4].iov_base
= (char *) context
;
588 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
589 xcb_parts
[5].iov_base
= 0;
590 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
592 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
597 xcb_selinux_get_window_create_context_sizeof (const void *_buffer
/**< */)
599 char *xcb_tmp
= (char *)_buffer
;
600 const xcb_selinux_get_window_create_context_reply_t
*_aux
= (xcb_selinux_get_window_create_context_reply_t
*)_buffer
;
601 unsigned int xcb_buffer_len
= 0;
602 unsigned int xcb_block_len
= 0;
603 unsigned int xcb_pad
= 0;
604 unsigned int xcb_align_to
= 0;
607 xcb_block_len
+= sizeof(xcb_selinux_get_window_create_context_reply_t
);
608 xcb_tmp
+= xcb_block_len
;
609 xcb_buffer_len
+= xcb_block_len
;
612 xcb_block_len
+= _aux
->context_len
* sizeof(char);
613 xcb_tmp
+= xcb_block_len
;
614 xcb_align_to
= ALIGNOF(char);
616 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
617 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
624 return xcb_buffer_len
;
627 xcb_selinux_get_window_create_context_cookie_t
628 xcb_selinux_get_window_create_context (xcb_connection_t
*c
/**< */)
630 static const xcb_protocol_request_t xcb_req
= {
632 /* ext */ &xcb_selinux_id
,
633 /* opcode */ XCB_SELINUX_GET_WINDOW_CREATE_CONTEXT
,
637 struct iovec xcb_parts
[4];
638 xcb_selinux_get_window_create_context_cookie_t xcb_ret
;
639 xcb_selinux_get_window_create_context_request_t xcb_out
;
642 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
643 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
644 xcb_parts
[3].iov_base
= 0;
645 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
647 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
651 xcb_selinux_get_window_create_context_cookie_t
652 xcb_selinux_get_window_create_context_unchecked (xcb_connection_t
*c
/**< */)
654 static const xcb_protocol_request_t xcb_req
= {
656 /* ext */ &xcb_selinux_id
,
657 /* opcode */ XCB_SELINUX_GET_WINDOW_CREATE_CONTEXT
,
661 struct iovec xcb_parts
[4];
662 xcb_selinux_get_window_create_context_cookie_t xcb_ret
;
663 xcb_selinux_get_window_create_context_request_t xcb_out
;
666 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
667 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
668 xcb_parts
[3].iov_base
= 0;
669 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
671 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
676 xcb_selinux_get_window_create_context_context (const xcb_selinux_get_window_create_context_reply_t
*R
/**< */)
678 return (char *) (R
+ 1);
682 xcb_selinux_get_window_create_context_context_length (const xcb_selinux_get_window_create_context_reply_t
*R
/**< */)
684 return R
->context_len
;
687 xcb_generic_iterator_t
688 xcb_selinux_get_window_create_context_context_end (const xcb_selinux_get_window_create_context_reply_t
*R
/**< */)
690 xcb_generic_iterator_t i
;
691 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
693 i
.index
= (char *) i
.data
- (char *) R
;
697 xcb_selinux_get_window_create_context_reply_t
*
698 xcb_selinux_get_window_create_context_reply (xcb_connection_t
*c
/**< */,
699 xcb_selinux_get_window_create_context_cookie_t cookie
/**< */,
700 xcb_generic_error_t
**e
/**< */)
702 return (xcb_selinux_get_window_create_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
706 xcb_selinux_get_window_context_sizeof (const void *_buffer
/**< */)
708 char *xcb_tmp
= (char *)_buffer
;
709 const xcb_selinux_get_window_context_reply_t
*_aux
= (xcb_selinux_get_window_context_reply_t
*)_buffer
;
710 unsigned int xcb_buffer_len
= 0;
711 unsigned int xcb_block_len
= 0;
712 unsigned int xcb_pad
= 0;
713 unsigned int xcb_align_to
= 0;
716 xcb_block_len
+= sizeof(xcb_selinux_get_window_context_reply_t
);
717 xcb_tmp
+= xcb_block_len
;
718 xcb_buffer_len
+= xcb_block_len
;
721 xcb_block_len
+= _aux
->context_len
* sizeof(char);
722 xcb_tmp
+= xcb_block_len
;
723 xcb_align_to
= ALIGNOF(char);
725 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
726 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
733 return xcb_buffer_len
;
736 xcb_selinux_get_window_context_cookie_t
737 xcb_selinux_get_window_context (xcb_connection_t
*c
/**< */,
738 xcb_window_t window
/**< */)
740 static const xcb_protocol_request_t xcb_req
= {
742 /* ext */ &xcb_selinux_id
,
743 /* opcode */ XCB_SELINUX_GET_WINDOW_CONTEXT
,
747 struct iovec xcb_parts
[4];
748 xcb_selinux_get_window_context_cookie_t xcb_ret
;
749 xcb_selinux_get_window_context_request_t xcb_out
;
751 xcb_out
.window
= window
;
753 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
754 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
755 xcb_parts
[3].iov_base
= 0;
756 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
758 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
762 xcb_selinux_get_window_context_cookie_t
763 xcb_selinux_get_window_context_unchecked (xcb_connection_t
*c
/**< */,
764 xcb_window_t window
/**< */)
766 static const xcb_protocol_request_t xcb_req
= {
768 /* ext */ &xcb_selinux_id
,
769 /* opcode */ XCB_SELINUX_GET_WINDOW_CONTEXT
,
773 struct iovec xcb_parts
[4];
774 xcb_selinux_get_window_context_cookie_t xcb_ret
;
775 xcb_selinux_get_window_context_request_t xcb_out
;
777 xcb_out
.window
= window
;
779 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
780 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
781 xcb_parts
[3].iov_base
= 0;
782 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
784 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
789 xcb_selinux_get_window_context_context (const xcb_selinux_get_window_context_reply_t
*R
/**< */)
791 return (char *) (R
+ 1);
795 xcb_selinux_get_window_context_context_length (const xcb_selinux_get_window_context_reply_t
*R
/**< */)
797 return R
->context_len
;
800 xcb_generic_iterator_t
801 xcb_selinux_get_window_context_context_end (const xcb_selinux_get_window_context_reply_t
*R
/**< */)
803 xcb_generic_iterator_t i
;
804 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
806 i
.index
= (char *) i
.data
- (char *) R
;
810 xcb_selinux_get_window_context_reply_t
*
811 xcb_selinux_get_window_context_reply (xcb_connection_t
*c
/**< */,
812 xcb_selinux_get_window_context_cookie_t cookie
/**< */,
813 xcb_generic_error_t
**e
/**< */)
815 return (xcb_selinux_get_window_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
819 xcb_selinux_list_item_sizeof (const void *_buffer
/**< */)
821 char *xcb_tmp
= (char *)_buffer
;
822 const xcb_selinux_list_item_t
*_aux
= (xcb_selinux_list_item_t
*)_buffer
;
823 unsigned int xcb_buffer_len
= 0;
824 unsigned int xcb_block_len
= 0;
825 unsigned int xcb_pad
= 0;
826 unsigned int xcb_align_to
= 0;
829 xcb_block_len
+= sizeof(xcb_selinux_list_item_t
);
830 xcb_tmp
+= xcb_block_len
;
831 xcb_buffer_len
+= xcb_block_len
;
834 xcb_block_len
+= _aux
->object_context_len
* sizeof(char);
835 xcb_tmp
+= xcb_block_len
;
836 xcb_align_to
= ALIGNOF(char);
838 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
839 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
846 xcb_block_len
+= _aux
->data_context_len
* sizeof(char);
847 xcb_tmp
+= xcb_block_len
;
848 xcb_align_to
= ALIGNOF(char);
850 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
851 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
858 return xcb_buffer_len
;
862 xcb_selinux_list_item_object_context (const xcb_selinux_list_item_t
*R
/**< */)
864 return (char *) (R
+ 1);
868 xcb_selinux_list_item_object_context_length (const xcb_selinux_list_item_t
*R
/**< */)
870 return R
->object_context_len
;
873 xcb_generic_iterator_t
874 xcb_selinux_list_item_object_context_end (const xcb_selinux_list_item_t
*R
/**< */)
876 xcb_generic_iterator_t i
;
877 i
.data
= ((char *) (R
+ 1)) + (R
->object_context_len
);
879 i
.index
= (char *) i
.data
- (char *) R
;
884 xcb_selinux_list_item_data_context (const xcb_selinux_list_item_t
*R
/**< */)
886 xcb_generic_iterator_t prev
= xcb_selinux_list_item_object_context_end(R
);
887 return (char *) ((char *) prev
.data
+ XCB_TYPE_PAD(char, prev
.index
) + 0);
891 xcb_selinux_list_item_data_context_length (const xcb_selinux_list_item_t
*R
/**< */)
893 return R
->data_context_len
;
896 xcb_generic_iterator_t
897 xcb_selinux_list_item_data_context_end (const xcb_selinux_list_item_t
*R
/**< */)
899 xcb_generic_iterator_t i
;
900 xcb_generic_iterator_t child
= xcb_selinux_list_item_object_context_end(R
);
901 i
.data
= ((char *) child
.data
) + (R
->data_context_len
);
903 i
.index
= (char *) i
.data
- (char *) R
;
908 xcb_selinux_list_item_next (xcb_selinux_list_item_iterator_t
*i
/**< */)
910 xcb_selinux_list_item_t
*R
= i
->data
;
911 xcb_generic_iterator_t child
;
912 child
.data
= (xcb_selinux_list_item_t
*)(((char *)R
) + xcb_selinux_list_item_sizeof(R
));
913 i
->index
= (char *) child
.data
- (char *) i
->data
;
915 i
->data
= (xcb_selinux_list_item_t
*) child
.data
;
918 xcb_generic_iterator_t
919 xcb_selinux_list_item_end (xcb_selinux_list_item_iterator_t i
/**< */)
921 xcb_generic_iterator_t ret
;
923 xcb_selinux_list_item_next(&i
);
931 xcb_selinux_set_property_create_context_sizeof (const void *_buffer
/**< */)
933 char *xcb_tmp
= (char *)_buffer
;
934 const xcb_selinux_set_property_create_context_request_t
*_aux
= (xcb_selinux_set_property_create_context_request_t
*)_buffer
;
935 unsigned int xcb_buffer_len
= 0;
936 unsigned int xcb_block_len
= 0;
937 unsigned int xcb_pad
= 0;
938 unsigned int xcb_align_to
= 0;
941 xcb_block_len
+= sizeof(xcb_selinux_set_property_create_context_request_t
);
942 xcb_tmp
+= xcb_block_len
;
943 xcb_buffer_len
+= xcb_block_len
;
946 xcb_block_len
+= _aux
->context_len
* sizeof(char);
947 xcb_tmp
+= xcb_block_len
;
948 xcb_align_to
= ALIGNOF(char);
950 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
951 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
958 return xcb_buffer_len
;
962 xcb_selinux_set_property_create_context_checked (xcb_connection_t
*c
/**< */,
963 uint32_t context_len
/**< */,
964 const char *context
/**< */)
966 static const xcb_protocol_request_t xcb_req
= {
968 /* ext */ &xcb_selinux_id
,
969 /* opcode */ XCB_SELINUX_SET_PROPERTY_CREATE_CONTEXT
,
973 struct iovec xcb_parts
[6];
974 xcb_void_cookie_t xcb_ret
;
975 xcb_selinux_set_property_create_context_request_t xcb_out
;
977 xcb_out
.context_len
= context_len
;
979 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
980 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
981 xcb_parts
[3].iov_base
= 0;
982 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
984 xcb_parts
[4].iov_base
= (char *) context
;
985 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
986 xcb_parts
[5].iov_base
= 0;
987 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
989 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
994 xcb_selinux_set_property_create_context (xcb_connection_t
*c
/**< */,
995 uint32_t context_len
/**< */,
996 const char *context
/**< */)
998 static const xcb_protocol_request_t xcb_req
= {
1000 /* ext */ &xcb_selinux_id
,
1001 /* opcode */ XCB_SELINUX_SET_PROPERTY_CREATE_CONTEXT
,
1005 struct iovec xcb_parts
[6];
1006 xcb_void_cookie_t xcb_ret
;
1007 xcb_selinux_set_property_create_context_request_t xcb_out
;
1009 xcb_out
.context_len
= context_len
;
1011 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1012 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1013 xcb_parts
[3].iov_base
= 0;
1014 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1016 xcb_parts
[4].iov_base
= (char *) context
;
1017 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
1018 xcb_parts
[5].iov_base
= 0;
1019 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1021 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1026 xcb_selinux_get_property_create_context_sizeof (const void *_buffer
/**< */)
1028 char *xcb_tmp
= (char *)_buffer
;
1029 const xcb_selinux_get_property_create_context_reply_t
*_aux
= (xcb_selinux_get_property_create_context_reply_t
*)_buffer
;
1030 unsigned int xcb_buffer_len
= 0;
1031 unsigned int xcb_block_len
= 0;
1032 unsigned int xcb_pad
= 0;
1033 unsigned int xcb_align_to
= 0;
1036 xcb_block_len
+= sizeof(xcb_selinux_get_property_create_context_reply_t
);
1037 xcb_tmp
+= xcb_block_len
;
1038 xcb_buffer_len
+= xcb_block_len
;
1041 xcb_block_len
+= _aux
->context_len
* sizeof(char);
1042 xcb_tmp
+= xcb_block_len
;
1043 xcb_align_to
= ALIGNOF(char);
1044 /* insert padding */
1045 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1046 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1053 return xcb_buffer_len
;
1056 xcb_selinux_get_property_create_context_cookie_t
1057 xcb_selinux_get_property_create_context (xcb_connection_t
*c
/**< */)
1059 static const xcb_protocol_request_t xcb_req
= {
1061 /* ext */ &xcb_selinux_id
,
1062 /* opcode */ XCB_SELINUX_GET_PROPERTY_CREATE_CONTEXT
,
1066 struct iovec xcb_parts
[4];
1067 xcb_selinux_get_property_create_context_cookie_t xcb_ret
;
1068 xcb_selinux_get_property_create_context_request_t xcb_out
;
1071 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1072 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1073 xcb_parts
[3].iov_base
= 0;
1074 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1076 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1080 xcb_selinux_get_property_create_context_cookie_t
1081 xcb_selinux_get_property_create_context_unchecked (xcb_connection_t
*c
/**< */)
1083 static const xcb_protocol_request_t xcb_req
= {
1085 /* ext */ &xcb_selinux_id
,
1086 /* opcode */ XCB_SELINUX_GET_PROPERTY_CREATE_CONTEXT
,
1090 struct iovec xcb_parts
[4];
1091 xcb_selinux_get_property_create_context_cookie_t xcb_ret
;
1092 xcb_selinux_get_property_create_context_request_t xcb_out
;
1095 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1096 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1097 xcb_parts
[3].iov_base
= 0;
1098 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1100 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1105 xcb_selinux_get_property_create_context_context (const xcb_selinux_get_property_create_context_reply_t
*R
/**< */)
1107 return (char *) (R
+ 1);
1111 xcb_selinux_get_property_create_context_context_length (const xcb_selinux_get_property_create_context_reply_t
*R
/**< */)
1113 return R
->context_len
;
1116 xcb_generic_iterator_t
1117 xcb_selinux_get_property_create_context_context_end (const xcb_selinux_get_property_create_context_reply_t
*R
/**< */)
1119 xcb_generic_iterator_t i
;
1120 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
1122 i
.index
= (char *) i
.data
- (char *) R
;
1126 xcb_selinux_get_property_create_context_reply_t
*
1127 xcb_selinux_get_property_create_context_reply (xcb_connection_t
*c
/**< */,
1128 xcb_selinux_get_property_create_context_cookie_t cookie
/**< */,
1129 xcb_generic_error_t
**e
/**< */)
1131 return (xcb_selinux_get_property_create_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1135 xcb_selinux_set_property_use_context_sizeof (const void *_buffer
/**< */)
1137 char *xcb_tmp
= (char *)_buffer
;
1138 const xcb_selinux_set_property_use_context_request_t
*_aux
= (xcb_selinux_set_property_use_context_request_t
*)_buffer
;
1139 unsigned int xcb_buffer_len
= 0;
1140 unsigned int xcb_block_len
= 0;
1141 unsigned int xcb_pad
= 0;
1142 unsigned int xcb_align_to
= 0;
1145 xcb_block_len
+= sizeof(xcb_selinux_set_property_use_context_request_t
);
1146 xcb_tmp
+= xcb_block_len
;
1147 xcb_buffer_len
+= xcb_block_len
;
1150 xcb_block_len
+= _aux
->context_len
* sizeof(char);
1151 xcb_tmp
+= xcb_block_len
;
1152 xcb_align_to
= ALIGNOF(char);
1153 /* insert padding */
1154 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1155 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1162 return xcb_buffer_len
;
1166 xcb_selinux_set_property_use_context_checked (xcb_connection_t
*c
/**< */,
1167 uint32_t context_len
/**< */,
1168 const char *context
/**< */)
1170 static const xcb_protocol_request_t xcb_req
= {
1172 /* ext */ &xcb_selinux_id
,
1173 /* opcode */ XCB_SELINUX_SET_PROPERTY_USE_CONTEXT
,
1177 struct iovec xcb_parts
[6];
1178 xcb_void_cookie_t xcb_ret
;
1179 xcb_selinux_set_property_use_context_request_t xcb_out
;
1181 xcb_out
.context_len
= context_len
;
1183 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1184 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1185 xcb_parts
[3].iov_base
= 0;
1186 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1188 xcb_parts
[4].iov_base
= (char *) context
;
1189 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
1190 xcb_parts
[5].iov_base
= 0;
1191 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1193 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1198 xcb_selinux_set_property_use_context (xcb_connection_t
*c
/**< */,
1199 uint32_t context_len
/**< */,
1200 const char *context
/**< */)
1202 static const xcb_protocol_request_t xcb_req
= {
1204 /* ext */ &xcb_selinux_id
,
1205 /* opcode */ XCB_SELINUX_SET_PROPERTY_USE_CONTEXT
,
1209 struct iovec xcb_parts
[6];
1210 xcb_void_cookie_t xcb_ret
;
1211 xcb_selinux_set_property_use_context_request_t xcb_out
;
1213 xcb_out
.context_len
= context_len
;
1215 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1216 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1217 xcb_parts
[3].iov_base
= 0;
1218 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1220 xcb_parts
[4].iov_base
= (char *) context
;
1221 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
1222 xcb_parts
[5].iov_base
= 0;
1223 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1225 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1230 xcb_selinux_get_property_use_context_sizeof (const void *_buffer
/**< */)
1232 char *xcb_tmp
= (char *)_buffer
;
1233 const xcb_selinux_get_property_use_context_reply_t
*_aux
= (xcb_selinux_get_property_use_context_reply_t
*)_buffer
;
1234 unsigned int xcb_buffer_len
= 0;
1235 unsigned int xcb_block_len
= 0;
1236 unsigned int xcb_pad
= 0;
1237 unsigned int xcb_align_to
= 0;
1240 xcb_block_len
+= sizeof(xcb_selinux_get_property_use_context_reply_t
);
1241 xcb_tmp
+= xcb_block_len
;
1242 xcb_buffer_len
+= xcb_block_len
;
1245 xcb_block_len
+= _aux
->context_len
* sizeof(char);
1246 xcb_tmp
+= xcb_block_len
;
1247 xcb_align_to
= ALIGNOF(char);
1248 /* insert padding */
1249 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1250 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1257 return xcb_buffer_len
;
1260 xcb_selinux_get_property_use_context_cookie_t
1261 xcb_selinux_get_property_use_context (xcb_connection_t
*c
/**< */)
1263 static const xcb_protocol_request_t xcb_req
= {
1265 /* ext */ &xcb_selinux_id
,
1266 /* opcode */ XCB_SELINUX_GET_PROPERTY_USE_CONTEXT
,
1270 struct iovec xcb_parts
[4];
1271 xcb_selinux_get_property_use_context_cookie_t xcb_ret
;
1272 xcb_selinux_get_property_use_context_request_t xcb_out
;
1275 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1276 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1277 xcb_parts
[3].iov_base
= 0;
1278 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1280 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1284 xcb_selinux_get_property_use_context_cookie_t
1285 xcb_selinux_get_property_use_context_unchecked (xcb_connection_t
*c
/**< */)
1287 static const xcb_protocol_request_t xcb_req
= {
1289 /* ext */ &xcb_selinux_id
,
1290 /* opcode */ XCB_SELINUX_GET_PROPERTY_USE_CONTEXT
,
1294 struct iovec xcb_parts
[4];
1295 xcb_selinux_get_property_use_context_cookie_t xcb_ret
;
1296 xcb_selinux_get_property_use_context_request_t xcb_out
;
1299 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1300 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1301 xcb_parts
[3].iov_base
= 0;
1302 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1304 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1309 xcb_selinux_get_property_use_context_context (const xcb_selinux_get_property_use_context_reply_t
*R
/**< */)
1311 return (char *) (R
+ 1);
1315 xcb_selinux_get_property_use_context_context_length (const xcb_selinux_get_property_use_context_reply_t
*R
/**< */)
1317 return R
->context_len
;
1320 xcb_generic_iterator_t
1321 xcb_selinux_get_property_use_context_context_end (const xcb_selinux_get_property_use_context_reply_t
*R
/**< */)
1323 xcb_generic_iterator_t i
;
1324 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
1326 i
.index
= (char *) i
.data
- (char *) R
;
1330 xcb_selinux_get_property_use_context_reply_t
*
1331 xcb_selinux_get_property_use_context_reply (xcb_connection_t
*c
/**< */,
1332 xcb_selinux_get_property_use_context_cookie_t cookie
/**< */,
1333 xcb_generic_error_t
**e
/**< */)
1335 return (xcb_selinux_get_property_use_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1339 xcb_selinux_get_property_context_sizeof (const void *_buffer
/**< */)
1341 char *xcb_tmp
= (char *)_buffer
;
1342 const xcb_selinux_get_property_context_reply_t
*_aux
= (xcb_selinux_get_property_context_reply_t
*)_buffer
;
1343 unsigned int xcb_buffer_len
= 0;
1344 unsigned int xcb_block_len
= 0;
1345 unsigned int xcb_pad
= 0;
1346 unsigned int xcb_align_to
= 0;
1349 xcb_block_len
+= sizeof(xcb_selinux_get_property_context_reply_t
);
1350 xcb_tmp
+= xcb_block_len
;
1351 xcb_buffer_len
+= xcb_block_len
;
1354 xcb_block_len
+= _aux
->context_len
* sizeof(char);
1355 xcb_tmp
+= xcb_block_len
;
1356 xcb_align_to
= ALIGNOF(char);
1357 /* insert padding */
1358 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1359 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1366 return xcb_buffer_len
;
1369 xcb_selinux_get_property_context_cookie_t
1370 xcb_selinux_get_property_context (xcb_connection_t
*c
/**< */,
1371 xcb_window_t window
/**< */,
1372 xcb_atom_t property
/**< */)
1374 static const xcb_protocol_request_t xcb_req
= {
1376 /* ext */ &xcb_selinux_id
,
1377 /* opcode */ XCB_SELINUX_GET_PROPERTY_CONTEXT
,
1381 struct iovec xcb_parts
[4];
1382 xcb_selinux_get_property_context_cookie_t xcb_ret
;
1383 xcb_selinux_get_property_context_request_t xcb_out
;
1385 xcb_out
.window
= window
;
1386 xcb_out
.property
= property
;
1388 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1389 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1390 xcb_parts
[3].iov_base
= 0;
1391 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1393 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1397 xcb_selinux_get_property_context_cookie_t
1398 xcb_selinux_get_property_context_unchecked (xcb_connection_t
*c
/**< */,
1399 xcb_window_t window
/**< */,
1400 xcb_atom_t property
/**< */)
1402 static const xcb_protocol_request_t xcb_req
= {
1404 /* ext */ &xcb_selinux_id
,
1405 /* opcode */ XCB_SELINUX_GET_PROPERTY_CONTEXT
,
1409 struct iovec xcb_parts
[4];
1410 xcb_selinux_get_property_context_cookie_t xcb_ret
;
1411 xcb_selinux_get_property_context_request_t xcb_out
;
1413 xcb_out
.window
= window
;
1414 xcb_out
.property
= property
;
1416 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1417 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1418 xcb_parts
[3].iov_base
= 0;
1419 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1421 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1426 xcb_selinux_get_property_context_context (const xcb_selinux_get_property_context_reply_t
*R
/**< */)
1428 return (char *) (R
+ 1);
1432 xcb_selinux_get_property_context_context_length (const xcb_selinux_get_property_context_reply_t
*R
/**< */)
1434 return R
->context_len
;
1437 xcb_generic_iterator_t
1438 xcb_selinux_get_property_context_context_end (const xcb_selinux_get_property_context_reply_t
*R
/**< */)
1440 xcb_generic_iterator_t i
;
1441 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
1443 i
.index
= (char *) i
.data
- (char *) R
;
1447 xcb_selinux_get_property_context_reply_t
*
1448 xcb_selinux_get_property_context_reply (xcb_connection_t
*c
/**< */,
1449 xcb_selinux_get_property_context_cookie_t cookie
/**< */,
1450 xcb_generic_error_t
**e
/**< */)
1452 return (xcb_selinux_get_property_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1456 xcb_selinux_get_property_data_context_sizeof (const void *_buffer
/**< */)
1458 char *xcb_tmp
= (char *)_buffer
;
1459 const xcb_selinux_get_property_data_context_reply_t
*_aux
= (xcb_selinux_get_property_data_context_reply_t
*)_buffer
;
1460 unsigned int xcb_buffer_len
= 0;
1461 unsigned int xcb_block_len
= 0;
1462 unsigned int xcb_pad
= 0;
1463 unsigned int xcb_align_to
= 0;
1466 xcb_block_len
+= sizeof(xcb_selinux_get_property_data_context_reply_t
);
1467 xcb_tmp
+= xcb_block_len
;
1468 xcb_buffer_len
+= xcb_block_len
;
1471 xcb_block_len
+= _aux
->context_len
* sizeof(char);
1472 xcb_tmp
+= xcb_block_len
;
1473 xcb_align_to
= ALIGNOF(char);
1474 /* insert padding */
1475 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1476 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1483 return xcb_buffer_len
;
1486 xcb_selinux_get_property_data_context_cookie_t
1487 xcb_selinux_get_property_data_context (xcb_connection_t
*c
/**< */,
1488 xcb_window_t window
/**< */,
1489 xcb_atom_t property
/**< */)
1491 static const xcb_protocol_request_t xcb_req
= {
1493 /* ext */ &xcb_selinux_id
,
1494 /* opcode */ XCB_SELINUX_GET_PROPERTY_DATA_CONTEXT
,
1498 struct iovec xcb_parts
[4];
1499 xcb_selinux_get_property_data_context_cookie_t xcb_ret
;
1500 xcb_selinux_get_property_data_context_request_t xcb_out
;
1502 xcb_out
.window
= window
;
1503 xcb_out
.property
= property
;
1505 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1506 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1507 xcb_parts
[3].iov_base
= 0;
1508 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1510 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1514 xcb_selinux_get_property_data_context_cookie_t
1515 xcb_selinux_get_property_data_context_unchecked (xcb_connection_t
*c
/**< */,
1516 xcb_window_t window
/**< */,
1517 xcb_atom_t property
/**< */)
1519 static const xcb_protocol_request_t xcb_req
= {
1521 /* ext */ &xcb_selinux_id
,
1522 /* opcode */ XCB_SELINUX_GET_PROPERTY_DATA_CONTEXT
,
1526 struct iovec xcb_parts
[4];
1527 xcb_selinux_get_property_data_context_cookie_t xcb_ret
;
1528 xcb_selinux_get_property_data_context_request_t xcb_out
;
1530 xcb_out
.window
= window
;
1531 xcb_out
.property
= property
;
1533 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1534 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1535 xcb_parts
[3].iov_base
= 0;
1536 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1538 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1543 xcb_selinux_get_property_data_context_context (const xcb_selinux_get_property_data_context_reply_t
*R
/**< */)
1545 return (char *) (R
+ 1);
1549 xcb_selinux_get_property_data_context_context_length (const xcb_selinux_get_property_data_context_reply_t
*R
/**< */)
1551 return R
->context_len
;
1554 xcb_generic_iterator_t
1555 xcb_selinux_get_property_data_context_context_end (const xcb_selinux_get_property_data_context_reply_t
*R
/**< */)
1557 xcb_generic_iterator_t i
;
1558 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
1560 i
.index
= (char *) i
.data
- (char *) R
;
1564 xcb_selinux_get_property_data_context_reply_t
*
1565 xcb_selinux_get_property_data_context_reply (xcb_connection_t
*c
/**< */,
1566 xcb_selinux_get_property_data_context_cookie_t cookie
/**< */,
1567 xcb_generic_error_t
**e
/**< */)
1569 return (xcb_selinux_get_property_data_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1573 xcb_selinux_list_properties_sizeof (const void *_buffer
/**< */)
1575 char *xcb_tmp
= (char *)_buffer
;
1576 const xcb_selinux_list_properties_reply_t
*_aux
= (xcb_selinux_list_properties_reply_t
*)_buffer
;
1577 unsigned int xcb_buffer_len
= 0;
1578 unsigned int xcb_block_len
= 0;
1579 unsigned int xcb_pad
= 0;
1580 unsigned int xcb_align_to
= 0;
1583 unsigned int xcb_tmp_len
;
1585 xcb_block_len
+= sizeof(xcb_selinux_list_properties_reply_t
);
1586 xcb_tmp
+= xcb_block_len
;
1587 xcb_buffer_len
+= xcb_block_len
;
1590 for(i
=0; i
<_aux
->properties_len
; i
++) {
1591 xcb_tmp_len
= xcb_selinux_list_item_sizeof(xcb_tmp
);
1592 xcb_block_len
+= xcb_tmp_len
;
1593 xcb_tmp
+= xcb_tmp_len
;
1595 xcb_align_to
= ALIGNOF(xcb_selinux_list_item_t
);
1596 /* insert padding */
1597 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1598 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1605 return xcb_buffer_len
;
1608 xcb_selinux_list_properties_cookie_t
1609 xcb_selinux_list_properties (xcb_connection_t
*c
/**< */,
1610 xcb_window_t window
/**< */)
1612 static const xcb_protocol_request_t xcb_req
= {
1614 /* ext */ &xcb_selinux_id
,
1615 /* opcode */ XCB_SELINUX_LIST_PROPERTIES
,
1619 struct iovec xcb_parts
[4];
1620 xcb_selinux_list_properties_cookie_t xcb_ret
;
1621 xcb_selinux_list_properties_request_t xcb_out
;
1623 xcb_out
.window
= window
;
1625 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1626 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1627 xcb_parts
[3].iov_base
= 0;
1628 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1630 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1634 xcb_selinux_list_properties_cookie_t
1635 xcb_selinux_list_properties_unchecked (xcb_connection_t
*c
/**< */,
1636 xcb_window_t window
/**< */)
1638 static const xcb_protocol_request_t xcb_req
= {
1640 /* ext */ &xcb_selinux_id
,
1641 /* opcode */ XCB_SELINUX_LIST_PROPERTIES
,
1645 struct iovec xcb_parts
[4];
1646 xcb_selinux_list_properties_cookie_t xcb_ret
;
1647 xcb_selinux_list_properties_request_t xcb_out
;
1649 xcb_out
.window
= window
;
1651 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1652 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1653 xcb_parts
[3].iov_base
= 0;
1654 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1656 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1661 xcb_selinux_list_properties_properties_length (const xcb_selinux_list_properties_reply_t
*R
/**< */)
1663 return R
->properties_len
;
1666 xcb_selinux_list_item_iterator_t
1667 xcb_selinux_list_properties_properties_iterator (const xcb_selinux_list_properties_reply_t
*R
/**< */)
1669 xcb_selinux_list_item_iterator_t i
;
1670 i
.data
= (xcb_selinux_list_item_t
*) (R
+ 1);
1671 i
.rem
= R
->properties_len
;
1672 i
.index
= (char *) i
.data
- (char *) R
;
1676 xcb_selinux_list_properties_reply_t
*
1677 xcb_selinux_list_properties_reply (xcb_connection_t
*c
/**< */,
1678 xcb_selinux_list_properties_cookie_t cookie
/**< */,
1679 xcb_generic_error_t
**e
/**< */)
1681 return (xcb_selinux_list_properties_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1685 xcb_selinux_set_selection_create_context_sizeof (const void *_buffer
/**< */)
1687 char *xcb_tmp
= (char *)_buffer
;
1688 const xcb_selinux_set_selection_create_context_request_t
*_aux
= (xcb_selinux_set_selection_create_context_request_t
*)_buffer
;
1689 unsigned int xcb_buffer_len
= 0;
1690 unsigned int xcb_block_len
= 0;
1691 unsigned int xcb_pad
= 0;
1692 unsigned int xcb_align_to
= 0;
1695 xcb_block_len
+= sizeof(xcb_selinux_set_selection_create_context_request_t
);
1696 xcb_tmp
+= xcb_block_len
;
1697 xcb_buffer_len
+= xcb_block_len
;
1700 xcb_block_len
+= _aux
->context_len
* sizeof(char);
1701 xcb_tmp
+= xcb_block_len
;
1702 xcb_align_to
= ALIGNOF(char);
1703 /* insert padding */
1704 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1705 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1712 return xcb_buffer_len
;
1716 xcb_selinux_set_selection_create_context_checked (xcb_connection_t
*c
/**< */,
1717 uint32_t context_len
/**< */,
1718 const char *context
/**< */)
1720 static const xcb_protocol_request_t xcb_req
= {
1722 /* ext */ &xcb_selinux_id
,
1723 /* opcode */ XCB_SELINUX_SET_SELECTION_CREATE_CONTEXT
,
1727 struct iovec xcb_parts
[6];
1728 xcb_void_cookie_t xcb_ret
;
1729 xcb_selinux_set_selection_create_context_request_t xcb_out
;
1731 xcb_out
.context_len
= context_len
;
1733 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1734 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1735 xcb_parts
[3].iov_base
= 0;
1736 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1738 xcb_parts
[4].iov_base
= (char *) context
;
1739 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
1740 xcb_parts
[5].iov_base
= 0;
1741 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1743 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1748 xcb_selinux_set_selection_create_context (xcb_connection_t
*c
/**< */,
1749 uint32_t context_len
/**< */,
1750 const char *context
/**< */)
1752 static const xcb_protocol_request_t xcb_req
= {
1754 /* ext */ &xcb_selinux_id
,
1755 /* opcode */ XCB_SELINUX_SET_SELECTION_CREATE_CONTEXT
,
1759 struct iovec xcb_parts
[6];
1760 xcb_void_cookie_t xcb_ret
;
1761 xcb_selinux_set_selection_create_context_request_t xcb_out
;
1763 xcb_out
.context_len
= context_len
;
1765 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1766 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1767 xcb_parts
[3].iov_base
= 0;
1768 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1770 xcb_parts
[4].iov_base
= (char *) context
;
1771 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
1772 xcb_parts
[5].iov_base
= 0;
1773 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1775 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1780 xcb_selinux_get_selection_create_context_sizeof (const void *_buffer
/**< */)
1782 char *xcb_tmp
= (char *)_buffer
;
1783 const xcb_selinux_get_selection_create_context_reply_t
*_aux
= (xcb_selinux_get_selection_create_context_reply_t
*)_buffer
;
1784 unsigned int xcb_buffer_len
= 0;
1785 unsigned int xcb_block_len
= 0;
1786 unsigned int xcb_pad
= 0;
1787 unsigned int xcb_align_to
= 0;
1790 xcb_block_len
+= sizeof(xcb_selinux_get_selection_create_context_reply_t
);
1791 xcb_tmp
+= xcb_block_len
;
1792 xcb_buffer_len
+= xcb_block_len
;
1795 xcb_block_len
+= _aux
->context_len
* sizeof(char);
1796 xcb_tmp
+= xcb_block_len
;
1797 xcb_align_to
= ALIGNOF(char);
1798 /* insert padding */
1799 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1800 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1807 return xcb_buffer_len
;
1810 xcb_selinux_get_selection_create_context_cookie_t
1811 xcb_selinux_get_selection_create_context (xcb_connection_t
*c
/**< */)
1813 static const xcb_protocol_request_t xcb_req
= {
1815 /* ext */ &xcb_selinux_id
,
1816 /* opcode */ XCB_SELINUX_GET_SELECTION_CREATE_CONTEXT
,
1820 struct iovec xcb_parts
[4];
1821 xcb_selinux_get_selection_create_context_cookie_t xcb_ret
;
1822 xcb_selinux_get_selection_create_context_request_t xcb_out
;
1825 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1826 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1827 xcb_parts
[3].iov_base
= 0;
1828 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1830 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1834 xcb_selinux_get_selection_create_context_cookie_t
1835 xcb_selinux_get_selection_create_context_unchecked (xcb_connection_t
*c
/**< */)
1837 static const xcb_protocol_request_t xcb_req
= {
1839 /* ext */ &xcb_selinux_id
,
1840 /* opcode */ XCB_SELINUX_GET_SELECTION_CREATE_CONTEXT
,
1844 struct iovec xcb_parts
[4];
1845 xcb_selinux_get_selection_create_context_cookie_t xcb_ret
;
1846 xcb_selinux_get_selection_create_context_request_t xcb_out
;
1849 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1850 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1851 xcb_parts
[3].iov_base
= 0;
1852 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1854 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1859 xcb_selinux_get_selection_create_context_context (const xcb_selinux_get_selection_create_context_reply_t
*R
/**< */)
1861 return (char *) (R
+ 1);
1865 xcb_selinux_get_selection_create_context_context_length (const xcb_selinux_get_selection_create_context_reply_t
*R
/**< */)
1867 return R
->context_len
;
1870 xcb_generic_iterator_t
1871 xcb_selinux_get_selection_create_context_context_end (const xcb_selinux_get_selection_create_context_reply_t
*R
/**< */)
1873 xcb_generic_iterator_t i
;
1874 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
1876 i
.index
= (char *) i
.data
- (char *) R
;
1880 xcb_selinux_get_selection_create_context_reply_t
*
1881 xcb_selinux_get_selection_create_context_reply (xcb_connection_t
*c
/**< */,
1882 xcb_selinux_get_selection_create_context_cookie_t cookie
/**< */,
1883 xcb_generic_error_t
**e
/**< */)
1885 return (xcb_selinux_get_selection_create_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
1889 xcb_selinux_set_selection_use_context_sizeof (const void *_buffer
/**< */)
1891 char *xcb_tmp
= (char *)_buffer
;
1892 const xcb_selinux_set_selection_use_context_request_t
*_aux
= (xcb_selinux_set_selection_use_context_request_t
*)_buffer
;
1893 unsigned int xcb_buffer_len
= 0;
1894 unsigned int xcb_block_len
= 0;
1895 unsigned int xcb_pad
= 0;
1896 unsigned int xcb_align_to
= 0;
1899 xcb_block_len
+= sizeof(xcb_selinux_set_selection_use_context_request_t
);
1900 xcb_tmp
+= xcb_block_len
;
1901 xcb_buffer_len
+= xcb_block_len
;
1904 xcb_block_len
+= _aux
->context_len
* sizeof(char);
1905 xcb_tmp
+= xcb_block_len
;
1906 xcb_align_to
= ALIGNOF(char);
1907 /* insert padding */
1908 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
1909 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
1916 return xcb_buffer_len
;
1920 xcb_selinux_set_selection_use_context_checked (xcb_connection_t
*c
/**< */,
1921 uint32_t context_len
/**< */,
1922 const char *context
/**< */)
1924 static const xcb_protocol_request_t xcb_req
= {
1926 /* ext */ &xcb_selinux_id
,
1927 /* opcode */ XCB_SELINUX_SET_SELECTION_USE_CONTEXT
,
1931 struct iovec xcb_parts
[6];
1932 xcb_void_cookie_t xcb_ret
;
1933 xcb_selinux_set_selection_use_context_request_t xcb_out
;
1935 xcb_out
.context_len
= context_len
;
1937 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1938 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1939 xcb_parts
[3].iov_base
= 0;
1940 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1942 xcb_parts
[4].iov_base
= (char *) context
;
1943 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
1944 xcb_parts
[5].iov_base
= 0;
1945 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1947 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
1952 xcb_selinux_set_selection_use_context (xcb_connection_t
*c
/**< */,
1953 uint32_t context_len
/**< */,
1954 const char *context
/**< */)
1956 static const xcb_protocol_request_t xcb_req
= {
1958 /* ext */ &xcb_selinux_id
,
1959 /* opcode */ XCB_SELINUX_SET_SELECTION_USE_CONTEXT
,
1963 struct iovec xcb_parts
[6];
1964 xcb_void_cookie_t xcb_ret
;
1965 xcb_selinux_set_selection_use_context_request_t xcb_out
;
1967 xcb_out
.context_len
= context_len
;
1969 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
1970 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
1971 xcb_parts
[3].iov_base
= 0;
1972 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
1974 xcb_parts
[4].iov_base
= (char *) context
;
1975 xcb_parts
[4].iov_len
= context_len
* sizeof(char);
1976 xcb_parts
[5].iov_base
= 0;
1977 xcb_parts
[5].iov_len
= -xcb_parts
[4].iov_len
& 3;
1979 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
1984 xcb_selinux_get_selection_use_context_sizeof (const void *_buffer
/**< */)
1986 char *xcb_tmp
= (char *)_buffer
;
1987 const xcb_selinux_get_selection_use_context_reply_t
*_aux
= (xcb_selinux_get_selection_use_context_reply_t
*)_buffer
;
1988 unsigned int xcb_buffer_len
= 0;
1989 unsigned int xcb_block_len
= 0;
1990 unsigned int xcb_pad
= 0;
1991 unsigned int xcb_align_to
= 0;
1994 xcb_block_len
+= sizeof(xcb_selinux_get_selection_use_context_reply_t
);
1995 xcb_tmp
+= xcb_block_len
;
1996 xcb_buffer_len
+= xcb_block_len
;
1999 xcb_block_len
+= _aux
->context_len
* sizeof(char);
2000 xcb_tmp
+= xcb_block_len
;
2001 xcb_align_to
= ALIGNOF(char);
2002 /* insert padding */
2003 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2004 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2011 return xcb_buffer_len
;
2014 xcb_selinux_get_selection_use_context_cookie_t
2015 xcb_selinux_get_selection_use_context (xcb_connection_t
*c
/**< */)
2017 static const xcb_protocol_request_t xcb_req
= {
2019 /* ext */ &xcb_selinux_id
,
2020 /* opcode */ XCB_SELINUX_GET_SELECTION_USE_CONTEXT
,
2024 struct iovec xcb_parts
[4];
2025 xcb_selinux_get_selection_use_context_cookie_t xcb_ret
;
2026 xcb_selinux_get_selection_use_context_request_t xcb_out
;
2029 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2030 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2031 xcb_parts
[3].iov_base
= 0;
2032 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2034 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2038 xcb_selinux_get_selection_use_context_cookie_t
2039 xcb_selinux_get_selection_use_context_unchecked (xcb_connection_t
*c
/**< */)
2041 static const xcb_protocol_request_t xcb_req
= {
2043 /* ext */ &xcb_selinux_id
,
2044 /* opcode */ XCB_SELINUX_GET_SELECTION_USE_CONTEXT
,
2048 struct iovec xcb_parts
[4];
2049 xcb_selinux_get_selection_use_context_cookie_t xcb_ret
;
2050 xcb_selinux_get_selection_use_context_request_t xcb_out
;
2053 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2054 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2055 xcb_parts
[3].iov_base
= 0;
2056 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2058 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2063 xcb_selinux_get_selection_use_context_context (const xcb_selinux_get_selection_use_context_reply_t
*R
/**< */)
2065 return (char *) (R
+ 1);
2069 xcb_selinux_get_selection_use_context_context_length (const xcb_selinux_get_selection_use_context_reply_t
*R
/**< */)
2071 return R
->context_len
;
2074 xcb_generic_iterator_t
2075 xcb_selinux_get_selection_use_context_context_end (const xcb_selinux_get_selection_use_context_reply_t
*R
/**< */)
2077 xcb_generic_iterator_t i
;
2078 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
2080 i
.index
= (char *) i
.data
- (char *) R
;
2084 xcb_selinux_get_selection_use_context_reply_t
*
2085 xcb_selinux_get_selection_use_context_reply (xcb_connection_t
*c
/**< */,
2086 xcb_selinux_get_selection_use_context_cookie_t cookie
/**< */,
2087 xcb_generic_error_t
**e
/**< */)
2089 return (xcb_selinux_get_selection_use_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2093 xcb_selinux_get_selection_context_sizeof (const void *_buffer
/**< */)
2095 char *xcb_tmp
= (char *)_buffer
;
2096 const xcb_selinux_get_selection_context_reply_t
*_aux
= (xcb_selinux_get_selection_context_reply_t
*)_buffer
;
2097 unsigned int xcb_buffer_len
= 0;
2098 unsigned int xcb_block_len
= 0;
2099 unsigned int xcb_pad
= 0;
2100 unsigned int xcb_align_to
= 0;
2103 xcb_block_len
+= sizeof(xcb_selinux_get_selection_context_reply_t
);
2104 xcb_tmp
+= xcb_block_len
;
2105 xcb_buffer_len
+= xcb_block_len
;
2108 xcb_block_len
+= _aux
->context_len
* sizeof(char);
2109 xcb_tmp
+= xcb_block_len
;
2110 xcb_align_to
= ALIGNOF(char);
2111 /* insert padding */
2112 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2113 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2120 return xcb_buffer_len
;
2123 xcb_selinux_get_selection_context_cookie_t
2124 xcb_selinux_get_selection_context (xcb_connection_t
*c
/**< */,
2125 xcb_atom_t selection
/**< */)
2127 static const xcb_protocol_request_t xcb_req
= {
2129 /* ext */ &xcb_selinux_id
,
2130 /* opcode */ XCB_SELINUX_GET_SELECTION_CONTEXT
,
2134 struct iovec xcb_parts
[4];
2135 xcb_selinux_get_selection_context_cookie_t xcb_ret
;
2136 xcb_selinux_get_selection_context_request_t xcb_out
;
2138 xcb_out
.selection
= selection
;
2140 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2141 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2142 xcb_parts
[3].iov_base
= 0;
2143 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2145 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2149 xcb_selinux_get_selection_context_cookie_t
2150 xcb_selinux_get_selection_context_unchecked (xcb_connection_t
*c
/**< */,
2151 xcb_atom_t selection
/**< */)
2153 static const xcb_protocol_request_t xcb_req
= {
2155 /* ext */ &xcb_selinux_id
,
2156 /* opcode */ XCB_SELINUX_GET_SELECTION_CONTEXT
,
2160 struct iovec xcb_parts
[4];
2161 xcb_selinux_get_selection_context_cookie_t xcb_ret
;
2162 xcb_selinux_get_selection_context_request_t xcb_out
;
2164 xcb_out
.selection
= selection
;
2166 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2167 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2168 xcb_parts
[3].iov_base
= 0;
2169 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2171 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2176 xcb_selinux_get_selection_context_context (const xcb_selinux_get_selection_context_reply_t
*R
/**< */)
2178 return (char *) (R
+ 1);
2182 xcb_selinux_get_selection_context_context_length (const xcb_selinux_get_selection_context_reply_t
*R
/**< */)
2184 return R
->context_len
;
2187 xcb_generic_iterator_t
2188 xcb_selinux_get_selection_context_context_end (const xcb_selinux_get_selection_context_reply_t
*R
/**< */)
2190 xcb_generic_iterator_t i
;
2191 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
2193 i
.index
= (char *) i
.data
- (char *) R
;
2197 xcb_selinux_get_selection_context_reply_t
*
2198 xcb_selinux_get_selection_context_reply (xcb_connection_t
*c
/**< */,
2199 xcb_selinux_get_selection_context_cookie_t cookie
/**< */,
2200 xcb_generic_error_t
**e
/**< */)
2202 return (xcb_selinux_get_selection_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2206 xcb_selinux_get_selection_data_context_sizeof (const void *_buffer
/**< */)
2208 char *xcb_tmp
= (char *)_buffer
;
2209 const xcb_selinux_get_selection_data_context_reply_t
*_aux
= (xcb_selinux_get_selection_data_context_reply_t
*)_buffer
;
2210 unsigned int xcb_buffer_len
= 0;
2211 unsigned int xcb_block_len
= 0;
2212 unsigned int xcb_pad
= 0;
2213 unsigned int xcb_align_to
= 0;
2216 xcb_block_len
+= sizeof(xcb_selinux_get_selection_data_context_reply_t
);
2217 xcb_tmp
+= xcb_block_len
;
2218 xcb_buffer_len
+= xcb_block_len
;
2221 xcb_block_len
+= _aux
->context_len
* sizeof(char);
2222 xcb_tmp
+= xcb_block_len
;
2223 xcb_align_to
= ALIGNOF(char);
2224 /* insert padding */
2225 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2226 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2233 return xcb_buffer_len
;
2236 xcb_selinux_get_selection_data_context_cookie_t
2237 xcb_selinux_get_selection_data_context (xcb_connection_t
*c
/**< */,
2238 xcb_atom_t selection
/**< */)
2240 static const xcb_protocol_request_t xcb_req
= {
2242 /* ext */ &xcb_selinux_id
,
2243 /* opcode */ XCB_SELINUX_GET_SELECTION_DATA_CONTEXT
,
2247 struct iovec xcb_parts
[4];
2248 xcb_selinux_get_selection_data_context_cookie_t xcb_ret
;
2249 xcb_selinux_get_selection_data_context_request_t xcb_out
;
2251 xcb_out
.selection
= selection
;
2253 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2254 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2255 xcb_parts
[3].iov_base
= 0;
2256 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2258 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2262 xcb_selinux_get_selection_data_context_cookie_t
2263 xcb_selinux_get_selection_data_context_unchecked (xcb_connection_t
*c
/**< */,
2264 xcb_atom_t selection
/**< */)
2266 static const xcb_protocol_request_t xcb_req
= {
2268 /* ext */ &xcb_selinux_id
,
2269 /* opcode */ XCB_SELINUX_GET_SELECTION_DATA_CONTEXT
,
2273 struct iovec xcb_parts
[4];
2274 xcb_selinux_get_selection_data_context_cookie_t xcb_ret
;
2275 xcb_selinux_get_selection_data_context_request_t xcb_out
;
2277 xcb_out
.selection
= selection
;
2279 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2280 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2281 xcb_parts
[3].iov_base
= 0;
2282 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2284 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2289 xcb_selinux_get_selection_data_context_context (const xcb_selinux_get_selection_data_context_reply_t
*R
/**< */)
2291 return (char *) (R
+ 1);
2295 xcb_selinux_get_selection_data_context_context_length (const xcb_selinux_get_selection_data_context_reply_t
*R
/**< */)
2297 return R
->context_len
;
2300 xcb_generic_iterator_t
2301 xcb_selinux_get_selection_data_context_context_end (const xcb_selinux_get_selection_data_context_reply_t
*R
/**< */)
2303 xcb_generic_iterator_t i
;
2304 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
2306 i
.index
= (char *) i
.data
- (char *) R
;
2310 xcb_selinux_get_selection_data_context_reply_t
*
2311 xcb_selinux_get_selection_data_context_reply (xcb_connection_t
*c
/**< */,
2312 xcb_selinux_get_selection_data_context_cookie_t cookie
/**< */,
2313 xcb_generic_error_t
**e
/**< */)
2315 return (xcb_selinux_get_selection_data_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2319 xcb_selinux_list_selections_sizeof (const void *_buffer
/**< */)
2321 char *xcb_tmp
= (char *)_buffer
;
2322 const xcb_selinux_list_selections_reply_t
*_aux
= (xcb_selinux_list_selections_reply_t
*)_buffer
;
2323 unsigned int xcb_buffer_len
= 0;
2324 unsigned int xcb_block_len
= 0;
2325 unsigned int xcb_pad
= 0;
2326 unsigned int xcb_align_to
= 0;
2329 unsigned int xcb_tmp_len
;
2331 xcb_block_len
+= sizeof(xcb_selinux_list_selections_reply_t
);
2332 xcb_tmp
+= xcb_block_len
;
2333 xcb_buffer_len
+= xcb_block_len
;
2336 for(i
=0; i
<_aux
->selections_len
; i
++) {
2337 xcb_tmp_len
= xcb_selinux_list_item_sizeof(xcb_tmp
);
2338 xcb_block_len
+= xcb_tmp_len
;
2339 xcb_tmp
+= xcb_tmp_len
;
2341 xcb_align_to
= ALIGNOF(xcb_selinux_list_item_t
);
2342 /* insert padding */
2343 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2344 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2351 return xcb_buffer_len
;
2354 xcb_selinux_list_selections_cookie_t
2355 xcb_selinux_list_selections (xcb_connection_t
*c
/**< */)
2357 static const xcb_protocol_request_t xcb_req
= {
2359 /* ext */ &xcb_selinux_id
,
2360 /* opcode */ XCB_SELINUX_LIST_SELECTIONS
,
2364 struct iovec xcb_parts
[4];
2365 xcb_selinux_list_selections_cookie_t xcb_ret
;
2366 xcb_selinux_list_selections_request_t xcb_out
;
2369 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2370 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2371 xcb_parts
[3].iov_base
= 0;
2372 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2374 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2378 xcb_selinux_list_selections_cookie_t
2379 xcb_selinux_list_selections_unchecked (xcb_connection_t
*c
/**< */)
2381 static const xcb_protocol_request_t xcb_req
= {
2383 /* ext */ &xcb_selinux_id
,
2384 /* opcode */ XCB_SELINUX_LIST_SELECTIONS
,
2388 struct iovec xcb_parts
[4];
2389 xcb_selinux_list_selections_cookie_t xcb_ret
;
2390 xcb_selinux_list_selections_request_t xcb_out
;
2393 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2394 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2395 xcb_parts
[3].iov_base
= 0;
2396 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2398 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2403 xcb_selinux_list_selections_selections_length (const xcb_selinux_list_selections_reply_t
*R
/**< */)
2405 return R
->selections_len
;
2408 xcb_selinux_list_item_iterator_t
2409 xcb_selinux_list_selections_selections_iterator (const xcb_selinux_list_selections_reply_t
*R
/**< */)
2411 xcb_selinux_list_item_iterator_t i
;
2412 i
.data
= (xcb_selinux_list_item_t
*) (R
+ 1);
2413 i
.rem
= R
->selections_len
;
2414 i
.index
= (char *) i
.data
- (char *) R
;
2418 xcb_selinux_list_selections_reply_t
*
2419 xcb_selinux_list_selections_reply (xcb_connection_t
*c
/**< */,
2420 xcb_selinux_list_selections_cookie_t cookie
/**< */,
2421 xcb_generic_error_t
**e
/**< */)
2423 return (xcb_selinux_list_selections_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);
2427 xcb_selinux_get_client_context_sizeof (const void *_buffer
/**< */)
2429 char *xcb_tmp
= (char *)_buffer
;
2430 const xcb_selinux_get_client_context_reply_t
*_aux
= (xcb_selinux_get_client_context_reply_t
*)_buffer
;
2431 unsigned int xcb_buffer_len
= 0;
2432 unsigned int xcb_block_len
= 0;
2433 unsigned int xcb_pad
= 0;
2434 unsigned int xcb_align_to
= 0;
2437 xcb_block_len
+= sizeof(xcb_selinux_get_client_context_reply_t
);
2438 xcb_tmp
+= xcb_block_len
;
2439 xcb_buffer_len
+= xcb_block_len
;
2442 xcb_block_len
+= _aux
->context_len
* sizeof(char);
2443 xcb_tmp
+= xcb_block_len
;
2444 xcb_align_to
= ALIGNOF(char);
2445 /* insert padding */
2446 xcb_pad
= -xcb_block_len
& (xcb_align_to
- 1);
2447 xcb_buffer_len
+= xcb_block_len
+ xcb_pad
;
2454 return xcb_buffer_len
;
2457 xcb_selinux_get_client_context_cookie_t
2458 xcb_selinux_get_client_context (xcb_connection_t
*c
/**< */,
2459 uint32_t resource
/**< */)
2461 static const xcb_protocol_request_t xcb_req
= {
2463 /* ext */ &xcb_selinux_id
,
2464 /* opcode */ XCB_SELINUX_GET_CLIENT_CONTEXT
,
2468 struct iovec xcb_parts
[4];
2469 xcb_selinux_get_client_context_cookie_t xcb_ret
;
2470 xcb_selinux_get_client_context_request_t xcb_out
;
2472 xcb_out
.resource
= resource
;
2474 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2475 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2476 xcb_parts
[3].iov_base
= 0;
2477 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2479 xcb_ret
.sequence
= xcb_send_request(c
, XCB_REQUEST_CHECKED
, xcb_parts
+ 2, &xcb_req
);
2483 xcb_selinux_get_client_context_cookie_t
2484 xcb_selinux_get_client_context_unchecked (xcb_connection_t
*c
/**< */,
2485 uint32_t resource
/**< */)
2487 static const xcb_protocol_request_t xcb_req
= {
2489 /* ext */ &xcb_selinux_id
,
2490 /* opcode */ XCB_SELINUX_GET_CLIENT_CONTEXT
,
2494 struct iovec xcb_parts
[4];
2495 xcb_selinux_get_client_context_cookie_t xcb_ret
;
2496 xcb_selinux_get_client_context_request_t xcb_out
;
2498 xcb_out
.resource
= resource
;
2500 xcb_parts
[2].iov_base
= (char *) &xcb_out
;
2501 xcb_parts
[2].iov_len
= sizeof(xcb_out
);
2502 xcb_parts
[3].iov_base
= 0;
2503 xcb_parts
[3].iov_len
= -xcb_parts
[2].iov_len
& 3;
2505 xcb_ret
.sequence
= xcb_send_request(c
, 0, xcb_parts
+ 2, &xcb_req
);
2510 xcb_selinux_get_client_context_context (const xcb_selinux_get_client_context_reply_t
*R
/**< */)
2512 return (char *) (R
+ 1);
2516 xcb_selinux_get_client_context_context_length (const xcb_selinux_get_client_context_reply_t
*R
/**< */)
2518 return R
->context_len
;
2521 xcb_generic_iterator_t
2522 xcb_selinux_get_client_context_context_end (const xcb_selinux_get_client_context_reply_t
*R
/**< */)
2524 xcb_generic_iterator_t i
;
2525 i
.data
= ((char *) (R
+ 1)) + (R
->context_len
);
2527 i
.index
= (char *) i
.data
- (char *) R
;
2531 xcb_selinux_get_client_context_reply_t
*
2532 xcb_selinux_get_client_context_reply (xcb_connection_t
*c
/**< */,
2533 xcb_selinux_get_client_context_cookie_t cookie
/**< */,
2534 xcb_generic_error_t
**e
/**< */)
2536 return (xcb_selinux_get_client_context_reply_t
*) xcb_wait_for_reply(c
, cookie
.sequence
, e
);