2 $XConsortium: record.h /main/4 1996/01/31 20:28:22 dpw $
5 /***************************************************************************
6 * Copyright 1995 Network Computing Devices
8 * Permission to use, copy, modify, distribute, and sell this software and
9 * its documentation for any purpose is hereby granted without fee, provided
10 * that the above copyright notice appear in all copies and that both that
11 * copyright notice and this permission notice appear in supporting
12 * documentation, and that the name of Network Computing Devices
13 * not be used in advertising or publicity pertaining to distribution
14 * of the software without specific, written prior permission.
16 * NETWORK COMPUTING DEVICES DISCLAIMs ALL WARRANTIES WITH REGARD TO
17 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
18 * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE
19 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
20 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
21 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
22 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 **************************************************************************/
27 #define XRecordBadContext 0 /* Not a valid RC */
30 * Constants for arguments of various requests
32 #define XRecordFromServerTime 0x01
33 #define XRecordFromClientTime 0x02
34 #define XRecordFromClientSequence 0x04
36 #define XRecordCurrentClients 1
37 #define XRecordFutureClients 2
38 #define XRecordAllClients 3
40 #define XRecordFromServer 0
41 #define XRecordFromClient 1
42 #define XRecordClientStarted 2
43 #define XRecordClientDied 3
44 #define XRecordStartOfData 4
45 #define XRecordEndOfData 5
47 typedef unsigned long XRecordClientSpec;
49 #ifndef _XRECORD_SERVER_
51 typedef unsigned long XRecordContext;
67 XRecordRange8 ext_major;
68 XRecordRange16 ext_minor;
73 XRecordRange8 core_requests; /* core X requests */
74 XRecordRange8 core_replies; /* core X replies */
75 XRecordExtRange ext_requests; /* extension requests */
76 XRecordExtRange ext_replies; /* extension replies */
77 XRecordRange8 delivered_events; /* delivered core and ext events */
78 XRecordRange8 device_events; /* all core and ext device events */
79 XRecordRange8 errors; /* core X and ext errors */
80 Bool client_started; /* connection setup reply */
81 Bool client_died; /* notice of client disconnect */
86 XRecordClientSpec client;
87 unsigned long nranges;
88 XRecordRange **ranges;
95 unsigned long nclients;
96 XRecordClientInfo **client_info;
103 unsigned long client_seq;
107 unsigned long data_len; /* in 4-byte units */
108 } XRecordInterceptData;
112 /*********************************************************
118 XID XRecordIdBaseMask(
119 #if NeedFunctionPrototypes
124 extern Status XRecordQueryVersion(
125 #if NeedFunctionPrototypes
127 int* /* cmajor_return */,
128 int* /* cminor_return */
132 extern XRecordContext XRecordCreateContext(
133 #if NeedFunctionPrototypes
135 int /* datum_flags */,
136 XRecordClientSpec* /* clients */,
138 XRecordRange** /* ranges */,
143 extern XRecordRange *XRecordAllocRange(
144 #if NeedFunctionPrototypes
149 extern Status XRecordRegisterClients(
150 #if NeedFunctionPrototypes
152 XRecordContext /* context */,
153 int /* datum_flags */,
154 XRecordClientSpec* /* clients */,
156 XRecordRange** /* ranges */,
161 extern Status XRecordUnregisterClients(
162 #if NeedFunctionPrototypes
164 XRecordContext /* context */,
165 XRecordClientSpec* /* clients */,
170 extern Status XRecordGetContext(
171 #if NeedFunctionPrototypes
173 XRecordContext /* context */,
174 XRecordState** /* state_return */
178 extern void XRecordFreeState(
179 #if NeedFunctionPrototypes
180 XRecordState* /* state */
184 typedef void (*XRecordInterceptProc) (
185 #if NeedFunctionPrototypes
186 XPointer /* closure */,
187 XRecordInterceptData* /* recorded_data */
191 extern Status XRecordEnableContext(
192 #if NeedFunctionPrototypes
194 XRecordContext /* context */,
195 XRecordInterceptProc /* callback */,
196 XPointer /* closure */
200 extern Status XRecordEnableContextAsync(
201 #if NeedFunctionPrototypes
203 XRecordContext /* context */,
204 XRecordInterceptProc /* callback */,
205 XPointer /* closure */
209 extern void XRecordProcessReplies(
210 #if NeedFunctionPrototypes
215 extern void XRecordFreeData(
216 #if NeedFunctionPrototypes
217 XRecordInterceptData* /* data */
221 extern Status XRecordDisableContext(
222 #if NeedFunctionPrototypes
224 XRecordContext /* context */
228 extern Status XRecordFreeContext(
229 #if NeedFunctionPrototypes
231 XRecordContext /* context */
237 #endif /* _XRECORD_SERVER_ */
239 #endif /* _RECORD_H_ */