home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / include / x11 / sm / smproto.h < prev   
Encoding:
C/C++ Source or Header  |  1996-10-17  |  4.9 KB  |  208 lines

  1. /* $XConsortium: SMproto.h,v 1.9 94/04/17 20:16:52 mor Exp $ */
  2.  
  3. /*
  4.  
  5. Copyright (c) 1993  X Consortium
  6.  
  7. Permission is hereby granted, free of charge, to any person obtaining a copy
  8. of this software and associated documentation files (the "Software"), to deal
  9. in the Software without restriction, including without limitation the rights
  10. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  11. copies of the Software, and to permit persons to whom the Software is
  12. furnished to do so, subject to the following conditions:
  13.  
  14. The above copyright notice and this permission notice shall be included in
  15. all copies or substantial portions of the Software.
  16.  
  17. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
  20. X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  21. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  22. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  23.  
  24. Except as contained in this notice, the name of the X Consortium shall not be
  25. used in advertising or otherwise to promote the sale, use or other dealings
  26. in this Software without prior written authorization from the X Consortium.
  27.  
  28. */
  29.  
  30. /*
  31.  * Author: Ralph Mor, X Consortium
  32.  */
  33.  
  34. #ifndef _SMPROTO_H_
  35. #define _SMPROTO_H_
  36.  
  37. typedef struct {
  38.     CARD8    majorOpcode;
  39.     CARD8    minorOpcode;
  40.     CARD8    unused[2];
  41.     CARD32    length B32;
  42.     /* n    ARRAY8        previousId */
  43. } smRegisterClientMsg;
  44.  
  45. typedef struct {
  46.     CARD8    majorOpcode;
  47.     CARD8    minorOpcode;
  48.     CARD8    unused[2];
  49.     CARD32    length B32;
  50.     /* n    ARRAY8        clientId */
  51. } smRegisterClientReplyMsg;
  52.  
  53. typedef struct {
  54.     CARD8    majorOpcode;
  55.     CARD8    minorOpcode;
  56.     CARD8    unused1[2];
  57.     CARD32    length B32;
  58.     CARD8    saveType;
  59.     CARD8    shutdown;
  60.     CARD8    interactStyle;
  61.     CARD8    fast;
  62.     CARD8    unused2[4];
  63. } smSaveYourselfMsg;
  64.  
  65. typedef struct {
  66.     CARD8    majorOpcode;
  67.     CARD8    minorOpcode;
  68.     CARD8    unused1[2];
  69.     CARD32    length B32;
  70.     CARD8    saveType;
  71.     CARD8    shutdown;
  72.     CARD8    interactStyle;
  73.     CARD8    fast;
  74.     CARD8    global;
  75.     CARD8    unused2[3];
  76. } smSaveYourselfRequestMsg;
  77.  
  78. typedef struct {
  79.     CARD8    majorOpcode;
  80.     CARD8    minorOpcode;
  81.     CARD8    dialogType;
  82.     CARD8    unused;
  83.     CARD32    length B32;
  84. } smInteractRequestMsg;
  85.  
  86. typedef struct {
  87.     CARD8    majorOpcode;
  88.     CARD8    minorOpcode;
  89.     CARD8    unused[2];
  90.     CARD32    length B32;
  91. } smInteractMsg;
  92.  
  93. typedef struct {
  94.     CARD8    majorOpcode;
  95.     CARD8    minorOpcode;
  96.     CARD8    cancelShutdown;
  97.     CARD8    unused;
  98.     CARD32    length B32;
  99. } smInteractDoneMsg;
  100.  
  101. typedef struct {
  102.     CARD8    majorOpcode;
  103.     CARD8    minorOpcode;
  104.     CARD8       success;
  105.     CARD8    unused;
  106.     CARD32    length B32;
  107. } smSaveYourselfDoneMsg;
  108.  
  109. typedef struct {
  110.     CARD8    majorOpcode;
  111.     CARD8    minorOpcode;
  112.     CARD8    unused[2];
  113.     CARD32    length B32;
  114. } smDieMsg;
  115.  
  116. typedef struct {
  117.     CARD8    majorOpcode;
  118.     CARD8    minorOpcode;
  119.     CARD8    unused[2];
  120.     CARD32    length B32;
  121. } smShutdownCancelledMsg;
  122.  
  123. typedef struct {
  124.     CARD8    majorOpcode;
  125.     CARD8    minorOpcode;
  126.     CARD8    unused[2];
  127.     CARD32    length B32;
  128.     /* b    LISTofARRAY8    reasons */
  129. } smCloseConnectionMsg;
  130.  
  131. typedef struct {
  132.     CARD8    majorOpcode;
  133.     CARD8    minorOpcode;
  134.     CARD8    unused[2];
  135.     CARD32    length B32;
  136.     /* a    LISTofPROPERTY    properties */
  137. } smSetPropertiesMsg;
  138.  
  139. typedef struct {
  140.     CARD8    majorOpcode;
  141.     CARD8    minorOpcode;
  142.     CARD8    unused[2];
  143.     CARD32    length B32;
  144.     /* a    LISTofARRAY8    property names */
  145. } smDeletePropertiesMsg;
  146.  
  147. typedef struct {
  148.     CARD8    majorOpcode;
  149.     CARD8    minorOpcode;
  150.     CARD8    unused[2];
  151.     CARD32    length B32;
  152. } smGetPropertiesMsg;
  153.  
  154. typedef struct {
  155.     CARD8    majorOpcode;
  156.     CARD8    minorOpcode;
  157.     CARD8    unused[2];
  158.     CARD32    length B32;
  159.     /* a    LISTofPROPERTY    properties */
  160. } smPropertiesReplyMsg;
  161.  
  162. typedef struct {
  163.     CARD8    majorOpcode;
  164.     CARD8    minorOpcode;
  165.     CARD8    unused[2];
  166.     CARD32    length B32;
  167. } smSaveYourselfPhase2RequestMsg;
  168.  
  169. typedef struct {
  170.     CARD8    majorOpcode;
  171.     CARD8    minorOpcode;
  172.     CARD8    unused[2];
  173.     CARD32    length B32;
  174. } smSaveYourselfPhase2Msg;
  175.  
  176. typedef struct {
  177.     CARD8    majorOpcode;
  178.     CARD8    minorOpcode;
  179.     CARD8    unused[2];
  180.     CARD32    length B32;
  181. } smSaveCompleteMsg;
  182.  
  183.  
  184. /*
  185.  * SIZEOF values.  These better be multiples of 8.
  186.  */
  187.  
  188. #define sz_smRegisterClientMsg             8
  189. #define sz_smRegisterClientReplyMsg         8
  190. #define sz_smSaveYourselfMsg             16
  191. #define sz_smSaveYourselfRequestMsg        16
  192. #define sz_smInteractRequestMsg         8
  193. #define sz_smInteractMsg             8
  194. #define sz_smInteractDoneMsg             8
  195. #define sz_smSaveYourselfDoneMsg         8
  196. #define sz_smDieMsg                 8
  197. #define sz_smShutdownCancelledMsg         8
  198. #define sz_smCloseConnectionMsg         8
  199. #define sz_smSetPropertiesMsg             8
  200. #define sz_smDeletePropertiesMsg         8
  201. #define sz_smGetPropertiesMsg             8
  202. #define sz_smPropertiesReplyMsg         8
  203. #define sz_smSaveYourselfPhase2RequestMsg    8
  204. #define sz_smSaveYourselfPhase2Msg         8
  205. #define sz_smSaveCompleteMsg             8
  206.  
  207. #endif /* _SMPROTO_H_ */
  208.