Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

ICEproto.h

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 #ifndef QWS
00030 #include <X11/Xmd.h>
00031 #else
00032 #if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
00033 typedef unsigned int CARD32;
00034 #else
00035 typedef unsigned long CARD32;
00036 #endif
00037 typedef unsigned short CARD16;
00038 typedef unsigned char CARD8;
00039 #define B32 :32
00040 #define B16 :16
00041 #include <unistd.h>
00042 #endif
00043 
00044 typedef struct {
00045     CARD8       majorOpcode;
00046     CARD8       minorOpcode;
00047     CARD8       data[2];
00048     CARD32      length B32;
00049 } iceMsg;
00050 
00051 typedef struct {
00052     CARD8       majorOpcode;
00053     CARD8       minorOpcode;
00054     CARD16      errorClass B16;
00055     CARD32      length B32;
00056     CARD8       offendingMinorOpcode;
00057     CARD8       severity;
00058     CARD16      unused B16;
00059     CARD32      offendingSequenceNum B32;
00060     /* n        varying values */
00061     /* p        p = pad (n, 8) */
00062 } iceErrorMsg;
00063 
00064 typedef struct {
00065     CARD8       majorOpcode;
00066     CARD8       minorOpcode;
00067     CARD8       byteOrder;
00068     CARD8       unused;
00069     CARD32      length B32;
00070 } iceByteOrderMsg;
00071 
00072 typedef struct {
00073     CARD8       majorOpcode;
00074     CARD8       minorOpcode;
00075     CARD8       versionCount;
00076     CARD8       authCount;
00077     CARD32      length B32;
00078     CARD8       mustAuthenticate;
00079     CARD8       unused[7];
00080     /* i        STRING          vendor */
00081     /* j        STRING          release */
00082     /* k        LIST of STRING  authentication-protocol-names */
00083     /* m        LIST of VERSION version-list */
00084     /* p        p = pad (i+j+k+m, 8) */
00085 } iceConnectionSetupMsg;
00086 
00087 typedef struct {
00088     CARD8       majorOpcode;
00089     CARD8       minorOpcode;
00090     CARD8       authIndex;
00091     CARD8       unused1;
00092     CARD32      length B32;
00093     CARD16      authDataLength B16;
00094     CARD8       unused2[6];
00095     /* n        varying data */
00096     /* p        p = pad (n, 8) */
00097 } iceAuthRequiredMsg;
00098 
00099 typedef struct {
00100     CARD8       majorOpcode;
00101     CARD8       minorOpcode;
00102     CARD8       unused1[2];
00103     CARD32      length B32;
00104     CARD16      authDataLength B16;
00105     CARD8       unused2[6];
00106     /* n        varying data */
00107     /* p        p = pad (n, 8) */
00108 } iceAuthReplyMsg;
00109 
00110 typedef struct {
00111     CARD8       majorOpcode;
00112     CARD8       minorOpcode;
00113     CARD8       unused1[2];
00114     CARD32      length B32;
00115     CARD16      authDataLength B16;
00116     CARD8       unused2[6];
00117     /* n        varying data */
00118     /* p        p = pad (n, 8) */
00119 } iceAuthNextPhaseMsg;
00120 
00121 typedef struct {
00122     CARD8       majorOpcode;
00123     CARD8       minorOpcode;
00124     CARD8       versionIndex;
00125     CARD8       unused;
00126     CARD32      length B32;
00127     /* i        STRING          vendor */
00128     /* j        STRING          release */
00129     /* p        p = pad (i+j, 8) */
00130 } iceConnectionReplyMsg;
00131 
00132 typedef struct {
00133     CARD8       majorOpcode;
00134     CARD8       minorOpcode;
00135     CARD8       protocolOpcode;
00136     CARD8       mustAuthenticate;
00137     CARD32      length B32;
00138     CARD8       versionCount;
00139     CARD8       authCount;
00140     CARD8       unused[6];
00141     /* i        STRING          protocol-name */
00142     /* j        STRING          vendor */
00143     /* k        STRING          release */
00144     /* m        LIST of STRING  authentication-protocol-names */
00145     /* n        LIST of VERSION version-list */
00146     /* p        p = pad (i+j+k+m+n, 8) */
00147 } iceProtocolSetupMsg;
00148 
00149 typedef struct {
00150     CARD8       majorOpcode;
00151     CARD8       minorOpcode;
00152     CARD8       versionIndex;
00153     CARD8       protocolOpcode;
00154     CARD32      length B32;
00155     /* i        STRING          vendor */
00156     /* j        STRING          release */
00157     /* p        p = pad (i+j, 8) */
00158 } iceProtocolReplyMsg;
00159 
00160 typedef iceMsg  icePingMsg;
00161 typedef iceMsg  icePingReplyMsg;
00162 typedef iceMsg  iceWantToCloseMsg;
00163 typedef iceMsg  iceNoCloseMsg;
00164 
00165 
00166 /*
00167  * SIZEOF values.  These better be multiples of 8.
00168  */
00169 
00170 #define sz_iceMsg                       8
00171 #define sz_iceErrorMsg                  16
00172 #define sz_iceByteOrderMsg              8
00173 #define sz_iceConnectionSetupMsg        16
00174 #define sz_iceAuthRequiredMsg           16
00175 #define sz_iceAuthReplyMsg              16
00176 #define sz_iceAuthNextPhaseMsg          16
00177 #define sz_iceConnectionReplyMsg        8
00178 #define sz_iceProtocolSetupMsg          16
00179 #define sz_iceProtocolReplyMsg          8
00180 #define sz_icePingMsg                   8
00181 #define sz_icePingReplyMsg              8
00182 #define sz_iceWantToCloseMsg            8
00183 #define sz_iceNoCloseMsg                8
00184 
00185 #endif /* _ICEPROTO_H_ */

Generated on Wed Aug 13 23:29:45 2003 for kdelibs by doxygen1.2.18