Debian Codegraph @

nx-X11/include/extensions/recordstr.h

raw
1 /*
2 #ifndef lint
3 $Xorg: recordstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $
4 static char sccsid[ ] = "@(#) recordstr.h 1.5 6/5/95 12:37:44";
5 #endif
6 */
7
8 /***************************************************************************
9 * Copyright 1995 Network Computing Devices
10 *
11 * Permission to use, copy, modify, distribute, and sell this software and
12 * its documentation for any purpose is hereby granted without fee, provided
13 * that the above copyright notice appear in all copies and that both that
14 * copyright notice and this permission notice appear in supporting
15 * documentation, and that the name of Network Computing Devices
16 * not be used in advertising or publicity pertaining to distribution
17 * of the software without specific, written prior permission.
18 *
19 * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO
20 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
21 * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE
22 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
23 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
24 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
25 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
26 **************************************************************************/
27 /* $XFree86$ */
28
29 #ifndef _RECORDSTR_H_
30 #define _RECORDSTR_H_
31
32 #include <nx-X11/extensions/record.h>
33
34 #define RECORD_NAME "RECORD"
35 #define RECORD_MAJOR_VERSION 1
36 #define RECORD_MINOR_VERSION 13
37 #define RECORD_LOWEST_MAJOR_VERSION 1
38 #define RECORD_LOWEST_MINOR_VERSION 12
39 /* only difference between 1.12 and 1.13 is byte order of device events,
40 which the library doesn't deal with. */
41
42 /*********************************************************
43 *
44 * Protocol request constants
45 *
46 */
47 #define X_RecordQueryVersion 0 /* First request from client */
48 #define X_RecordCreateContext 1 /* Create client RC */
49 #define X_RecordRegisterClients 2 /* Add to client RC */
50 #define X_RecordUnregisterClients 3 /* Delete from client RC */
51 #define X_RecordGetContext 4 /* Query client RC */
52 #define X_RecordEnableContext 5 /* Enable interception and reporting */
53 #define X_RecordDisableContext 6 /* Disable interception and reporting */
54 #define X_RecordFreeContext 7 /* Free client RC */
55
56 #define RecordNumErrors (XRecordBadContext + 1)
57 #define RecordNumEvents 0L
58
59 #define sz_XRecordRange 32
60 #define sz_XRecordClientInfo 12
61 #define sz_XRecordState 16
62 #define sz_XRecordDatum 32
63
64
65 #define XRecordGlobaldef
66 #define XRecordGlobalref extern
67
68 #define RecordMaxEvent (128L-1L)
69 #define RecordMinDeviceEvent (2L)
70 #define RecordMaxDeviceEvent (6L)
71 #define RecordMaxError (256L-1L)
72 #define RecordMaxCoreRequest (128L-1L)
73 #define RecordMaxExtRequest (256L-1L)
74 #define RecordMinExtRequest (129L-1L)
75
76 #define RECORD_RC CARD32
77 #define RECORD_XIDBASE CARD32
78 #define RECORD_CLIENTSPEC CARD32
79 #define RECORD_ELEMENT_HEADER CARD8
80
81 typedef RECORD_CLIENTSPEC RecordClientSpec, *RecordClientSpecPtr;
82
83 typedef struct
84 {
85 CARD8 first;
86 CARD8 last;
87 } RECORD_RANGE8;
88
89 typedef struct
90 {
91 CARD16 first B16;
92 CARD16 last B16;
93 } RECORD_RANGE16;
94
95 typedef struct
96 {
97 RECORD_RANGE8 majorCode;
98 RECORD_RANGE16 minorCode;
99 } RECORD_EXTRANGE;
100
101 typedef struct
102 {
103 RECORD_RANGE8 coreRequests;
104 RECORD_RANGE8 coreReplies;
105 RECORD_EXTRANGE extRequests;
106 RECORD_EXTRANGE extReplies;
107 RECORD_RANGE8 deliveredEvents;
108 RECORD_RANGE8 deviceEvents;
109 RECORD_RANGE8 errors;
110 BOOL clientStarted;
111 BOOL clientDied;
112 } RECORDRANGE;
113 #define sz_RECORDRANGE 24
114
115 /* typedef RECORDRANGE xRecordRange, *xRecordRangePtr;
116 #define sz_xRecordRange 24 */
117
118 /* Cannot have structures within structures going over the wire */
119 typedef struct
120 {
121 CARD8 coreRequestsFirst;
122 CARD8 coreRequestsLast;
123 CARD8 coreRepliesFirst;
124 CARD8 coreRepliesLast;
125 CARD8 extRequestsMajorFirst;
126 CARD8 extRequestsMajorLast;
127 CARD16 extRequestsMinorFirst B16;
128 CARD16 extRequestsMinorLast B16;
129 CARD8 extRepliesMajorFirst;
130 CARD8 extRepliesMajorLast;
131 CARD16 extRepliesMinorFirst B16;
132 CARD16 extRepliesMinorLast B16;
133 CARD8 deliveredEventsFirst;
134 CARD8 deliveredEventsLast;
135 CARD8 deviceEventsFirst;
136 CARD8 deviceEventsLast;
137 CARD8 errorsFirst;
138 CARD8 errorsLast;
139 BOOL clientStarted;
140 BOOL clientDied;
141 } xRecordRange;
142 #define sz_xRecordRange 24
143
144 typedef struct
145 {
146 RECORD_CLIENTSPEC clientResource B32;
147 CARD32 nRanges B32;
148 /* LISTofRECORDRANGE */
149 } RECORD_CLIENT_INFO;
150
151 typedef RECORD_CLIENT_INFO xRecordClientInfo;
152
153 /*
154 * Initialize
155 */
156 typedef struct {
157 CARD8 reqType;
158 CARD8 recordReqType;
159 CARD16 length B16;
160 CARD16 majorVersion B16;
161 CARD16 minorVersion B16;
162 } xRecordQueryVersionReq;
163 #define sz_xRecordQueryVersionReq 8
164
165 typedef struct
166 {
167 CARD8 type;
168 CARD8 pad0;
169 CARD16 sequenceNumber B16;
170 CARD32 length B32;
171 CARD16 majorVersion B16;
172 CARD16 minorVersion B16;
173 CARD32 pad1 B32;
174 CARD32 pad2 B32;
175 CARD32 pad3 B32;
176 CARD32 pad4 B32;
177 CARD32 pad5 B32;
178 } xRecordQueryVersionReply;
179 #define sz_xRecordQueryVersionReply 32
180
181 /*
182 * Create RC
183 */
184 typedef struct
185 {
186 CARD8 reqType;
187 CARD8 recordReqType;
188 CARD16 length B16;
189 RECORD_RC context B32;
190 RECORD_ELEMENT_HEADER elementHeader;
191 CARD8 pad;
192 CARD16 pad0 B16;
193 CARD32 nClients B32;
194 CARD32 nRanges B32;
195 /* LISTofRECORD_CLIENTSPEC */
196 /* LISTofRECORDRANGE */
197 } xRecordCreateContextReq;
198 #define sz_xRecordCreateContextReq 20
199
200 /*
201 * Add to RC
202 */
203 typedef struct
204 {
205 CARD8 reqType;
206 CARD8 recordReqType;
207 CARD16 length B16;
208 RECORD_RC context B32;
209 RECORD_ELEMENT_HEADER elementHeader;
210 CARD8 pad;
211 CARD16 pad0 B16;
212 CARD32 nClients B32;
213 CARD32 nRanges B32;
214 /* LISTofRECORD_CLIENTSPEC */
215 /* LISTofRECORDRANGE */
216 } xRecordRegisterClientsReq;
217 #define sz_xRecordRegisterClientsReq 20
218
219 /*
220 * Delete from RC
221 */
222 typedef struct
223 {
224 CARD8 reqType;
225 CARD8 recordReqType;
226 CARD16 length B16;
227 RECORD_RC context B32;
228 CARD32 nClients B32;
229 /* LISTofRECORD_CLIENTSPEC */
230 } xRecordUnregisterClientsReq;
231 #define sz_xRecordUnregisterClientsReq 12
232
233 /*
234 * Query RC
235 */
236 typedef struct
237 {
238 CARD8 reqType;
239 CARD8 recordReqType;
240 CARD16 length B16;
241 RECORD_RC context B32;
242 } xRecordGetContextReq;
243 #define sz_xRecordGetContextReq 8
244
245 typedef struct
246 {
247 CARD8 type;
248 BOOL enabled;
249 CARD16 sequenceNumber B16;
250 CARD32 length B32;
251 RECORD_ELEMENT_HEADER elementHeader;
252 CARD8 pad;
253 CARD16 pad0 B16;
254 CARD32 nClients B32;
255 CARD32 pad1 B32;
256 CARD32 pad2 B32;
257 CARD32 pad3 B32;
258 CARD32 pad4 B32;
259 /* LISTofCLIENT_INFO */ /* intercepted-clients */
260 } xRecordGetContextReply;
261 #define sz_xRecordGetContextReply 32
262
263 /*
264 * Enable data interception
265 */
266 typedef struct
267 {
268 CARD8 reqType;
269 CARD8 recordReqType;
270 CARD16 length B16;
271 RECORD_RC context B32;
272 } xRecordEnableContextReq;
273 #define sz_xRecordEnableContextReq 8
274
275 typedef struct
276 {
277 CARD8 type;
278 CARD8 category;
279 CARD16 sequenceNumber B16;
280 CARD32 length B32;
281 RECORD_ELEMENT_HEADER elementHeader;
282 BOOL clientSwapped;
283 CARD16 pad1 B16;
284 RECORD_XIDBASE idBase B32;
285 CARD32 serverTime B32;
286 CARD32 recordedSequenceNumber B32;
287 CARD32 pad3 B32;
288 CARD32 pad4 B32;
289 /* BYTE data; */
290 } xRecordEnableContextReply;
291 #define sz_xRecordEnableContextReply 32
292
293 /*
294 * Disable data interception
295 */
296 typedef struct
297 {
298 CARD8 reqType;
299 CARD8 recordReqType;
300 CARD16 length B16;
301 RECORD_RC context B32;
302 } xRecordDisableContextReq;
303 #define sz_xRecordDisableContextReq 8
304
305 /*
306 * Free RC
307 */
308 typedef struct
309 {
310 CARD8 reqType;
311 CARD8 recordReqType;
312 CARD16 length B16;
313 RECORD_RC context B32;
314 } xRecordFreeContextReq;
315 #define sz_xRecordFreeContextReq 8
316
317 #undef RECORD_RC
318 #undef RECORD_XIDBASE
319 #undef RECORD_ELEMENT_HEADER
320 #undef RECORD_CLIENTSPEC
321
322 #endif