dcop
ICEproto.h
Go to the documentation of this file.00001 /* $Xorg: ICEproto.h,v 1.4 2000/08/17 19:44:11 cpqbld Exp $ */ 00002 /****************************************************************************** 00003 00004 00005 Copyright 1993, 1998 The Open Group 00006 00007 All Rights Reserved. 00008 00009 The above copyright notice and this permission notice shall be included in 00010 all copies or substantial portions of the Software. 00011 00012 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00013 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00014 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00015 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00016 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00017 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00018 00019 Except as contained in this notice, the name of The Open Group shall not be 00020 used in advertising or otherwise to promote the sale, use or other dealings 00021 in this Software without prior written authorization from The Open Group. 00022 00023 Author: Ralph Mor, X Consortium 00024 ******************************************************************************/ 00025 00026 #ifndef _ICEPROTO_H_ 00027 #define _ICEPROTO_H_ 00028 00029 #include "config.h" 00030 #if defined Q_WS_X11 && ! defined K_WS_QTONLY 00031 #include <X11/Xmd.h> 00032 #else 00033 #if defined(__alpha__) || defined(__ia64__) || defined(__s390x__) 00034 typedef unsigned int CARD32; 00035 #else 00036 typedef unsigned long CARD32; 00037 #endif 00038 typedef unsigned short CARD16; 00039 typedef unsigned char CARD8; 00040 #define B32 :32 00041 #define B16 :16 00042 #include <unistd.h> 00043 #endif 00044 00045 typedef struct { 00046 CARD8 majorOpcode; 00047 CARD8 minorOpcode; 00048 CARD8 data[2]; 00049 CARD32 length B32; 00050 } iceMsg; 00051 00052 typedef struct { 00053 CARD8 majorOpcode; 00054 CARD8 minorOpcode; 00055 CARD16 errorClass B16; 00056 CARD32 length B32; 00057 CARD8 offendingMinorOpcode; 00058 CARD8 severity; 00059 CARD16 unused B16; 00060 CARD32 offendingSequenceNum B32; 00061 /* n varying values */ 00062 /* p p = pad (n, 8) */ 00063 } iceErrorMsg; 00064 00065 typedef struct { 00066 CARD8 majorOpcode; 00067 CARD8 minorOpcode; 00068 CARD8 byteOrder; 00069 CARD8 unused; 00070 CARD32 length B32; 00071 } iceByteOrderMsg; 00072 00073 typedef struct { 00074 CARD8 majorOpcode; 00075 CARD8 minorOpcode; 00076 CARD8 versionCount; 00077 CARD8 authCount; 00078 CARD32 length B32; 00079 CARD8 mustAuthenticate; 00080 CARD8 unused[7]; 00081 /* i STRING vendor */ 00082 /* j STRING release */ 00083 /* k LIST of STRING authentication-protocol-names */ 00084 /* m LIST of VERSION version-list */ 00085 /* p p = pad (i+j+k+m, 8) */ 00086 } iceConnectionSetupMsg; 00087 00088 typedef struct { 00089 CARD8 majorOpcode; 00090 CARD8 minorOpcode; 00091 CARD8 authIndex; 00092 CARD8 unused1; 00093 CARD32 length B32; 00094 CARD16 authDataLength B16; 00095 CARD8 unused2[6]; 00096 /* n varying data */ 00097 /* p p = pad (n, 8) */ 00098 } iceAuthRequiredMsg; 00099 00100 typedef struct { 00101 CARD8 majorOpcode; 00102 CARD8 minorOpcode; 00103 CARD8 unused1[2]; 00104 CARD32 length B32; 00105 CARD16 authDataLength B16; 00106 CARD8 unused2[6]; 00107 /* n varying data */ 00108 /* p p = pad (n, 8) */ 00109 } iceAuthReplyMsg; 00110 00111 typedef struct { 00112 CARD8 majorOpcode; 00113 CARD8 minorOpcode; 00114 CARD8 unused1[2]; 00115 CARD32 length B32; 00116 CARD16 authDataLength B16; 00117 CARD8 unused2[6]; 00118 /* n varying data */ 00119 /* p p = pad (n, 8) */ 00120 } iceAuthNextPhaseMsg; 00121 00122 typedef struct { 00123 CARD8 majorOpcode; 00124 CARD8 minorOpcode; 00125 CARD8 versionIndex; 00126 CARD8 unused; 00127 CARD32 length B32; 00128 /* i STRING vendor */ 00129 /* j STRING release */ 00130 /* p p = pad (i+j, 8) */ 00131 } iceConnectionReplyMsg; 00132 00133 typedef struct { 00134 CARD8 majorOpcode; 00135 CARD8 minorOpcode; 00136 CARD8 protocolOpcode; 00137 CARD8 mustAuthenticate; 00138 CARD32 length B32; 00139 CARD8 versionCount; 00140 CARD8 authCount; 00141 CARD8 unused[6]; 00142 /* i STRING protocol-name */ 00143 /* j STRING vendor */ 00144 /* k STRING release */ 00145 /* m LIST of STRING authentication-protocol-names */ 00146 /* n LIST of VERSION version-list */ 00147 /* p p = pad (i+j+k+m+n, 8) */ 00148 } iceProtocolSetupMsg; 00149 00150 typedef struct { 00151 CARD8 majorOpcode; 00152 CARD8 minorOpcode; 00153 CARD8 versionIndex; 00154 CARD8 protocolOpcode; 00155 CARD32 length B32; 00156 /* i STRING vendor */ 00157 /* j STRING release */ 00158 /* p p = pad (i+j, 8) */ 00159 } iceProtocolReplyMsg; 00160 00161 typedef iceMsg icePingMsg; 00162 typedef iceMsg icePingReplyMsg; 00163 typedef iceMsg iceWantToCloseMsg; 00164 typedef iceMsg iceNoCloseMsg; 00165 00166 00167 /* 00168 * SIZEOF values. These better be multiples of 8. 00169 */ 00170 00171 #define sz_iceMsg 8 00172 #define sz_iceErrorMsg 16 00173 #define sz_iceByteOrderMsg 8 00174 #define sz_iceConnectionSetupMsg 16 00175 #define sz_iceAuthRequiredMsg 16 00176 #define sz_iceAuthReplyMsg 16 00177 #define sz_iceAuthNextPhaseMsg 16 00178 #define sz_iceConnectionReplyMsg 8 00179 #define sz_iceProtocolSetupMsg 16 00180 #define sz_iceProtocolReplyMsg 8 00181 #define sz_icePingMsg 8 00182 #define sz_icePingReplyMsg 8 00183 #define sz_iceWantToCloseMsg 8 00184 #define sz_iceNoCloseMsg 8 00185 00186 #endif /* _ICEPROTO_H_ */