| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | #ifndef _ICECONN_H_ |
| 30 | #define _ICECONN_H_ |
| 31 | |
| 32 | #include <X11/ICE/ICElib.h> |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | typedef struct _IceSavedReplyWait { |
| 39 | IceReplyWaitInfo *reply_wait; |
| 40 | Bool reply_ready; |
| 41 | struct _IceSavedReplyWait *next; |
| 42 | } _IceSavedReplyWait; |
| 43 | |
| 44 | typedef struct _IcePingWait { |
| 45 | IcePingReplyProc ping_reply_proc; |
| 46 | IcePointer client_data; |
| 47 | struct _IcePingWait *next; |
| 48 | } _IcePingWait; |
| 49 | |
| 50 | typedef struct { |
| 51 | char *vendor; |
| 52 | char *release; |
| 53 | int version_count; |
| 54 | IcePoVersionRec *version_recs; |
| 55 | int auth_count; |
| 56 | char **auth_names; |
| 57 | IcePoAuthProc *auth_procs; |
| 58 | IceIOErrorProc io_error_proc; |
| 59 | } _IcePoProtocol; |
| 60 | |
| 61 | typedef struct { |
| 62 | char *vendor; |
| 63 | char *release; |
| 64 | int version_count; |
| 65 | IcePaVersionRec *version_recs; |
| 66 | IceProtocolSetupProc protocol_setup_proc; |
| 67 | IceProtocolActivateProc protocol_activate_proc; |
| 68 | int auth_count; |
| 69 | char **auth_names; |
| 70 | IcePaAuthProc *auth_procs; |
| 71 | IceHostBasedAuthProc host_based_auth_proc; |
| 72 | IceIOErrorProc io_error_proc; |
| 73 | } _IcePaProtocol; |
| 74 | |
| 75 | typedef struct { |
| 76 | char *protocol_name; |
| 77 | _IcePoProtocol *orig_client; |
| 78 | _IcePaProtocol *accept_client; |
| 79 | } _IceProtocol; |
| 80 | |
| 81 | typedef struct { |
| 82 | Bool in_use; |
| 83 | int my_opcode; |
| 84 | _IceProtocol *protocol; |
| 85 | IcePointer client_data; |
| 86 | Bool accept_flag; |
| 87 | union { |
| 88 | IcePaProcessMsgProc accept_client; |
| 89 | IcePoProcessMsgProc orig_client; |
| 90 | } process_msg_proc; |
| 91 | } _IceProcessMsgInfo; |
| 92 | |
| 93 | typedef struct { |
| 94 | int his_version_index; |
| 95 | int my_version_index; |
| 96 | char *his_vendor; |
| 97 | char *his_release; |
| 98 | char my_auth_index; |
| 99 | IcePointer my_auth_state; |
| 100 | Bool must_authenticate; |
| 101 | } _IceConnectToMeInfo; |
| 102 | |
| 103 | typedef struct { |
| 104 | int his_opcode; |
| 105 | int my_opcode; |
| 106 | int his_version_index; |
| 107 | int my_version_index; |
| 108 | char *his_vendor; |
| 109 | char *his_release; |
| 110 | char my_auth_index; |
| 111 | IcePointer my_auth_state; |
| 112 | Bool must_authenticate; |
| 113 | } _IceProtoSetupToMeInfo; |
| 114 | |
| 115 | typedef struct { |
| 116 | Bool auth_active; |
| 117 | char my_auth_index; |
| 118 | IcePointer my_auth_state; |
| 119 | } _IceConnectToYouInfo; |
| 120 | |
| 121 | typedef struct { |
| 122 | int my_opcode; |
| 123 | int my_auth_count; |
| 124 | int *my_auth_indices; |
| 125 | Bool auth_active; |
| 126 | char my_auth_index; |
| 127 | IcePointer my_auth_state; |
| 128 | } _IceProtoSetupToYouInfo; |
| 129 | |
| 130 | |
| 131 | struct _IceConn { |
| 132 | |
| 133 | unsigned int io_ok : 1; |
| 134 | unsigned int swap : 1; |
| 135 | unsigned int waiting_for_byteorder : 1; |
| 136 | unsigned int skip_want_to_close : 1; |
| 137 | unsigned int want_to_close : 1; |
| 138 | unsigned int free_asap : 1; |
| 139 | unsigned int unused1 : 2; |
| 140 | unsigned int unused2 : 8; |
| 141 | |
| 142 | IceConnectStatus connection_status; |
| 143 | |
| 144 | unsigned char my_ice_version_index; |
| 145 | |
| 146 | struct _XtransConnInfo *trans_conn; |
| 147 | unsigned long send_sequence; |
| 148 | unsigned long receive_sequence; |
| 149 | |
| 150 | char *connection_string; |
| 151 | char *vendor; |
| 152 | char *release; |
| 153 | |
| 154 | char *inbuf; |
| 155 | char *inbufptr; |
| 156 | char *inbufmax; |
| 157 | |
| 158 | char *outbuf; |
| 159 | char *outbufptr; |
| 160 | char *outbufmax; |
| 161 | |
| 162 | char *scratch; |
| 163 | unsigned long scratch_size; |
| 164 | |
| 165 | int dispatch_level; |
| 166 | |
| 167 | IcePointer context; |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | _IceProcessMsgInfo *process_msg_info; |
| 187 | char his_min_opcode; |
| 188 | char his_max_opcode; |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | unsigned char open_ref_count; |
| 197 | |
| 198 | |
| 199 | |
| 200 | |
| 201 | |
| 202 | |
| 203 | unsigned char proto_ref_count; |
| 204 | |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | IceListenObj listen_obj; |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | _IceSavedReplyWait *saved_reply_waits; |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | _IcePingWait *ping_waits; |
| 231 | |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | _IceConnectToYouInfo *connect_to_you; |
| 238 | _IceProtoSetupToYouInfo *protosetup_to_you; |
| 239 | |
| 240 | |
| 241 | |
| 242 | |
| 243 | |
| 244 | |
| 245 | _IceConnectToMeInfo *connect_to_me; |
| 246 | _IceProtoSetupToMeInfo *protosetup_to_me; |
| 247 | |
| 248 | }; |
| 249 | |
| 250 | #endif |