3 $XConsortium: recordstr.h /main/2 1996/01/09 18:15:19 gildea $
4 static char sccsid[ ] = "@(#) recordstr.h 1.5 6/5/95 12:37:44";
8 /***************************************************************************
9 * Copyright 1995 Network Computing Devices
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.
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 **************************************************************************/
30 #define RECORD_NAME "RECORD"
31 #define RECORD_MAJOR_VERSION 1
32 #define RECORD_MINOR_VERSION 13
33 #define RECORD_LOWEST_MAJOR_VERSION 1
34 #define RECORD_LOWEST_MINOR_VERSION 12
35 /* only difference between 1.12 and 1.13 is byte order of device events,
36 which the library doesn't deal with. */
38 /*********************************************************
40 * Protocol request constants
43 #define X_RecordQueryVersion 0 /* First request from client */
44 #define X_RecordCreateContext 1 /* Create client RC */
45 #define X_RecordRegisterClients 2 /* Add to client RC */
46 #define X_RecordUnregisterClients 3 /* Delete from client RC */
47 #define X_RecordGetContext 4 /* Query client RC */
48 #define X_RecordEnableContext 5 /* Enable interception and reporting */
49 #define X_RecordDisableContext 6 /* Disable interception and reporting */
50 #define X_RecordFreeContext 7 /* Free client RC */
52 #define RecordNumErrors (XRecordBadContext + 1)
53 #define RecordNumEvents 0L
55 #define sz_XRecordRange 32
56 #define sz_XRecordClientInfo 12
57 #define sz_XRecordState 16
58 #define sz_XRecordDatum 32
61 #define XRecordGlobaldef
62 #define XRecordGlobalref extern
64 #define RecordMaxEvent (128L-1L)
65 #define RecordMinDeviceEvent (2L)
66 #define RecordMaxDeviceEvent (6L)
67 #define RecordMaxError (256L-1L)
68 #define RecordMaxCoreRequest (128L-1L)
69 #define RecordMaxExtRequest (256L-1L)
70 #define RecordMinExtRequest (129L-1L)
72 #define RECORD_RC CARD32
73 #define RECORD_XIDBASE CARD32
74 #define RECORD_CLIENTSPEC CARD32
75 #define RECORD_ELEMENT_HEADER CARD8
77 typedef RECORD_CLIENTSPEC RecordClientSpec, *RecordClientSpecPtr;
93 RECORD_RANGE8 majorCode;
94 RECORD_RANGE16 minorCode;
99 RECORD_RANGE8 coreRequests;
100 RECORD_RANGE8 coreReplies;
101 RECORD_EXTRANGE extRequests;
102 RECORD_EXTRANGE extReplies;
103 RECORD_RANGE8 deliveredEvents;
104 RECORD_RANGE8 deviceEvents;
105 RECORD_RANGE8 errors;
109 #define sz_RECORDRANGE 24
111 /* typedef RECORDRANGE xRecordRange, *xRecordRangePtr;
112 #define sz_xRecordRange 24 */
114 /* Cannot have structures within structures going over the wire */
117 CARD8 coreRequestsFirst;
118 CARD8 coreRequestsLast;
119 CARD8 coreRepliesFirst;
120 CARD8 coreRepliesLast;
121 CARD8 extRequestsMajorFirst;
122 CARD8 extRequestsMajorLast;
123 CARD16 extRequestsMinorFirst B16;
124 CARD16 extRequestsMinorLast B16;
125 CARD8 extRepliesMajorFirst;
126 CARD8 extRepliesMajorLast;
127 CARD16 extRepliesMinorFirst B16;
128 CARD16 extRepliesMinorLast B16;
129 CARD8 deliveredEventsFirst;
130 CARD8 deliveredEventsLast;
131 CARD8 deviceEventsFirst;
132 CARD8 deviceEventsLast;
138 #define sz_xRecordRange 24
142 RECORD_CLIENTSPEC clientResource B32;
144 /* LISTofRECORDRANGE */
145 } RECORD_CLIENT_INFO;
147 typedef RECORD_CLIENT_INFO xRecordClientInfo;
156 CARD16 majorVersion B16;
157 CARD16 minorVersion B16;
158 } xRecordQueryVersionReq;
159 #define sz_xRecordQueryVersionReq 8
165 CARD16 sequenceNumber B16;
167 CARD16 majorVersion B16;
168 CARD16 minorVersion B16;
174 } xRecordQueryVersionReply;
175 #define sz_xRecordQueryVersionReply 32
185 RECORD_RC context B32;
186 RECORD_ELEMENT_HEADER elementHeader;
191 /* LISTofRECORD_CLIENTSPEC */
192 /* LISTofRECORDRANGE */
193 } xRecordCreateContextReq;
194 #define sz_xRecordCreateContextReq 20
204 RECORD_RC context B32;
205 RECORD_ELEMENT_HEADER elementHeader;
210 /* LISTofRECORD_CLIENTSPEC */
211 /* LISTofRECORDRANGE */
212 } xRecordRegisterClientsReq;
213 #define sz_xRecordRegisterClientsReq 20
223 RECORD_RC context B32;
225 /* LISTofRECORD_CLIENTSPEC */
226 } xRecordUnregisterClientsReq;
227 #define sz_xRecordUnregisterClientsReq 12
237 RECORD_RC context B32;
238 } xRecordGetContextReq;
239 #define sz_xRecordGetContextReq 8
245 CARD16 sequenceNumber B16;
247 RECORD_ELEMENT_HEADER elementHeader;
255 /* LISTofCLIENT_INFO */ /* intercepted-clients */
256 } xRecordGetContextReply;
257 #define sz_xRecordGetContextReply 32
260 * Enable data interception
267 RECORD_RC context B32;
268 } xRecordEnableContextReq;
269 #define sz_xRecordEnableContextReq 8
275 CARD16 sequenceNumber B16;
277 RECORD_ELEMENT_HEADER elementHeader;
280 RECORD_XIDBASE idBase B32;
281 CARD32 serverTime B32;
282 CARD32 recordedSequenceNumber B32;
286 } xRecordEnableContextReply;
287 #define sz_xRecordEnableContextReply 32
290 * Disable data interception
297 RECORD_RC context B32;
298 } xRecordDisableContextReq;
299 #define sz_xRecordDisableContextReq 8
309 RECORD_RC context B32;
310 } xRecordFreeContextReq;
311 #define sz_xRecordFreeContextReq 8
314 #undef RECORD_XIDBASE
315 #undef RECORD_ELEMENT_HEADER
316 #undef RECORD_CLIENTSPEC