Debian Codegraph @

nx-X11/include/Xauth.h

raw
1
2 /*
3
4 Copyright 1988, 1998 The Open Group
5
6 Permission to use, copy, modify, distribute, and sell this software and its
7 documentation for any purpose is hereby granted without fee, provided that
8 the above copyright notice appear in all copies and that both that
9 copyright notice and this permission notice appear in supporting
10 documentation.
11
12 The above copyright notice and this permission notice shall be included in
13 all copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22 Except as contained in this notice, the name of The Open Group shall not be
23 used in advertising or otherwise to promote the sale, use or other dealings
24 in this Software without prior written authorization from The Open Group.
25
26 */
27
28
29 #ifndef _Xauth_h
30 #define _Xauth_h
31
32 typedef struct xauth {
33 unsigned short family;
34 unsigned short address_length;
35 char *address;
36 unsigned short number_length;
37 char *number;
38 unsigned short name_length;
39 char *name;
40 unsigned short data_length;
41 char *data;
42 } Xauth;
43
44 #ifndef _XAUTH_STRUCT_ONLY
45
46 # include <nx-X11/Xfuncproto.h>
47 # include <nx-X11/Xfuncs.h>
48
49 # include <stdio.h>
50
51 # define FamilyLocal (256) /* not part of X standard (i.e. X.h) */
52 # define FamilyWild (65535)
53 # define FamilyNetname (254) /* not part of X standard */
54 # define FamilyLocalHost (252) /* for local non-net authentication */
55
56
57 _XFUNCPROTOBEGIN
58
59 char *XauFileName(void);
60
61 Xauth *XauReadAuth(
62 FILE* /* auth_file */
63 );
64
65 Xauth *XauGetAuthByName(
66 _Xconst char* /* display_name */
67 );
68
69 Xauth *XauGetAuthByAddr(
70 #if NeedWidePrototypes
71 unsigned int /* family */,
72 unsigned int /* address_length */,
73 #else
74 unsigned short /* family */,
75 unsigned short /* address_length */,
76 #endif
77 _Xconst char* /* address */,
78 #if NeedWidePrototypes
79 unsigned int /* number_length */,
80 #else
81 unsigned short /* number_length */,
82 #endif
83 _Xconst char* /* number */,
84 #if NeedWidePrototypes
85 unsigned int /* name_length */,
86 #else
87 unsigned short /* name_length */,
88 #endif
89 _Xconst char* /* name */
90 );
91
92 Xauth *XauGetBestAuthByAddr(
93 #if NeedWidePrototypes
94 unsigned int /* family */,
95 unsigned int /* address_length */,
96 #else
97 unsigned short /* family */,
98 unsigned short /* address_length */,
99 #endif
100 _Xconst char* /* address */,
101 #if NeedWidePrototypes
102 unsigned int /* number_length */,
103 #else
104 unsigned short /* number_length */,
105 #endif
106 _Xconst char* /* number */,
107 int /* types_length */,
108 char** /* type_names */,
109 _Xconst int* /* type_lengths */
110 );
111
112 void XauDisposeAuth(
113 Xauth* /* auth */
114 );
115
116 _XFUNCPROTOEND
117
118 #endif /* _XAUTH_STRUCT_ONLY */
119
120 #endif /* _Xauth_h */