clientstr.h revision bbe1b32b
1/* $Xorg: clientstr.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */
2/*
3Copyright 1987, 1998  The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21Except as contained in this notice, the name of The Open Group shall not be
22used in advertising or otherwise to promote the sale, use or other dealings
23in this Software without prior written authorization from The Open Group.
24 * Copyright 1990, 1991 Network Computing Devices;
25 * Portions Copyright 1987 by Digital Equipment Corporation
26 *
27 * Permission to use, copy, modify, distribute, and sell this software and its
28 * documentation for any purpose is hereby granted without fee, provided that
29 * the above copyright notice appear in all copies and that both that
30 * copyright notice and this permission notice appear in supporting
31 * documentation, and that the names of Network Computing Devices,
32 * or Digital not be used in advertising or
33 * publicity pertaining to distribution of the software without specific,
34 * written prior permission.  Network Computing Devices, or Digital
35 * make no representations about the
36 * suitability of this software for any purpose.  It is provided "as is"
37 * without express or implied warranty.
38 *
39 * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH
40 * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41 * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR DIGITAL BE
42 * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
43 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
44 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
45 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
46 */
47/* $XFree86: xc/programs/xfs/include/clientstr.h,v 1.6 2001/08/28 23:44:53 paulo Exp $ */
48
49#ifndef _CLIENTSTR_H_
50#define	_CLIENTSTR_H_
51
52#include	<X11/fonts/FS.h>
53#include	"client.h"
54#include	"auth.h"
55#include	"misc.h"
56
57typedef struct _Client {
58    int         index;
59    pointer     osPrivate;
60    int         noClientException;
61    int         (**requestVector) (ClientPtr);
62    pointer     requestBuffer;
63    int         clientGone;
64    int         sequence;
65    Bool        swapped;
66    long        last_request_time;
67    void        (*pSwapReplyFunc) (ClientPtr, int, short *);
68    AuthContextPtr auth;
69    int		auth_generation;
70    AuthContextPtr default_auth;
71    char       *catalogues;
72    int         num_catalogues;
73    Mask        eventmask;
74    fsResolution *resolutions;
75    int         num_resolutions;
76    int		major_version;	/* client-major-protocol-version */
77    int		minor_version;
78}           ClientRec;
79
80typedef struct _WorkQueue {
81    struct _WorkQueue *next;
82    Bool        (*function) (ClientPtr, pointer);
83    ClientPtr   client;
84    pointer     closure;
85}           WorkQueueRec;
86
87#ifndef CloseDownClient
88#ifdef DEBUG
89#define CloseDownClient(client)	\
90	fprintf(stderr, "CloseDownClient %s %d\n", __FILE__, __LINE__),\
91	DoCloseDownClient(client)
92#else
93#define CloseDownClient DoCloseDownClient
94#endif
95extern void DoCloseDownClient(ClientPtr client);
96#endif
97
98#endif				/* _CLIENTSTR_H_ */
99