File indexing completed on 2025-09-18 09:37:05
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #ifndef _Xauth_h
0028 #define _Xauth_h
0029
0030
0031
0032
0033 #ifdef __clang__
0034 #pragma clang diagnostic push
0035 #pragma clang diagnostic ignored "-Wpadded"
0036 #endif
0037
0038 typedef struct xauth {
0039 unsigned short family;
0040 unsigned short address_length;
0041 char *address;
0042 unsigned short number_length;
0043 char *number;
0044 unsigned short name_length;
0045 char *name;
0046 unsigned short data_length;
0047 char *data;
0048 } Xauth;
0049
0050 #ifdef __clang__
0051 #pragma clang diagnostic pop
0052 #endif
0053
0054 #ifndef _XAUTH_STRUCT_ONLY
0055
0056 # include <X11/Xfuncproto.h>
0057 # include <X11/Xfuncs.h>
0058
0059 # include <stdio.h>
0060
0061 # define FamilyLocal (256)
0062 # define FamilyWild (65535)
0063 # define FamilyNetname (254)
0064 # define FamilyKrb5Principal (253)
0065 # define FamilyLocalHost (252)
0066
0067
0068 _XFUNCPROTOBEGIN
0069
0070 #ifndef __has_attribute
0071 # define __has_attribute(x) 0
0072 #endif
0073
0074 #if __has_attribute(access)
0075 # define XAU_ACCESS_ATTRIBUTE(X) __attribute__((access X))
0076 #else
0077 # define XAU_ACCESS_ATTRIBUTE(X)
0078 #endif
0079
0080 #if __has_attribute(malloc)
0081 # if defined(__clang__) || (defined(__GNUC__) && __GNUC__ < 11)
0082
0083 # define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc))
0084 # else
0085 # define XAU_MALLOC_ATTRIBUTE(X) __attribute__((malloc X))
0086 # endif
0087 #else
0088 # define XAU_MALLOC_ATTRIBUTE(X)
0089 #endif
0090
0091 char *XauFileName(void);
0092
0093 void XauDisposeAuth(
0094 Xauth*
0095 );
0096
0097 XAU_MALLOC_ATTRIBUTE((XauDisposeAuth, 1))
0098 Xauth *XauReadAuth(
0099 FILE*
0100 );
0101
0102 XAU_ACCESS_ATTRIBUTE((read_only, 1))
0103 int XauLockAuth(
0104 _Xconst char* ,
0105 int ,
0106 int ,
0107 long
0108 );
0109
0110 XAU_ACCESS_ATTRIBUTE((read_only, 1))
0111 int XauUnlockAuth(
0112 _Xconst char*
0113 );
0114
0115 XAU_ACCESS_ATTRIBUTE((read_only, 2))
0116 int XauWriteAuth(
0117 FILE* ,
0118 Xauth*
0119 );
0120
0121 XAU_ACCESS_ATTRIBUTE((read_only, 3, 2))
0122 XAU_ACCESS_ATTRIBUTE((read_only, 5, 4))
0123 XAU_ACCESS_ATTRIBUTE((read_only, 7, 6))
0124 Xauth *XauGetAuthByAddr(
0125 #if NeedWidePrototypes
0126 unsigned int ,
0127 unsigned int ,
0128 #else
0129 unsigned short ,
0130 unsigned short ,
0131 #endif
0132 _Xconst char* ,
0133 #if NeedWidePrototypes
0134 unsigned int ,
0135 #else
0136 unsigned short ,
0137 #endif
0138 _Xconst char* ,
0139 #if NeedWidePrototypes
0140 unsigned int ,
0141 #else
0142 unsigned short ,
0143 #endif
0144 _Xconst char*
0145 );
0146
0147 XAU_ACCESS_ATTRIBUTE((read_only, 3, 2))
0148 XAU_ACCESS_ATTRIBUTE((read_only, 5, 4))
0149 XAU_ACCESS_ATTRIBUTE((read_only, 7, 6))
0150 XAU_ACCESS_ATTRIBUTE((read_only, 8, 6))
0151 Xauth *XauGetBestAuthByAddr(
0152 #if NeedWidePrototypes
0153 unsigned int ,
0154 unsigned int ,
0155 #else
0156 unsigned short ,
0157 unsigned short ,
0158 #endif
0159 _Xconst char* ,
0160 #if NeedWidePrototypes
0161 unsigned int ,
0162 #else
0163 unsigned short ,
0164 #endif
0165 _Xconst char* ,
0166 int ,
0167 char** ,
0168 _Xconst int*
0169 );
0170
0171 _XFUNCPROTOEND
0172
0173
0174
0175 # define LOCK_SUCCESS 0
0176 # define LOCK_ERROR 1
0177 # define LOCK_TIMEOUT 2
0178
0179 #endif
0180
0181 #endif