1126a8a12Smrg/*
2126a8a12Smrg
3126a8a12SmrgCopyright 1993, 1998  The Open Group
4126a8a12Smrg
5126a8a12SmrgPermission to use, copy, modify, distribute, and sell this software and its
6126a8a12Smrgdocumentation for any purpose is hereby granted without fee, provided that
7126a8a12Smrgthe above copyright notice appear in all copies and that both that
8126a8a12Smrgcopyright notice and this permission notice appear in supporting
9126a8a12Smrgdocumentation.
10126a8a12Smrg
11126a8a12SmrgThe above copyright notice and this permission notice shall be included in
12126a8a12Smrgall copies or substantial portions of the Software.
13126a8a12Smrg
14126a8a12SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15126a8a12SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16126a8a12SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17126a8a12SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18126a8a12SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19126a8a12SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20126a8a12Smrg
21126a8a12SmrgExcept as contained in this notice, the name of The Open Group shall not be
22126a8a12Smrgused in advertising or otherwise to promote the sale, use or other dealings
23126a8a12Smrgin this Software without prior written authorization from The Open Group.
24126a8a12Smrg
25126a8a12Smrg*/
26126a8a12Smrg
27126a8a12Smrg/*
28126a8a12Smrg * Author: Ralph Mor, X Consortium
29126a8a12Smrg */
30126a8a12Smrg
31126a8a12Smrg#ifndef _SMPROTO_H_
32126a8a12Smrg#define _SMPROTO_H_
33126a8a12Smrg
34126a8a12Smrg#include <X11/Xmd.h>
35126a8a12Smrg
36126a8a12Smrgtypedef struct {
37126a8a12Smrg    CARD8	majorOpcode;
38126a8a12Smrg    CARD8	minorOpcode;
39126a8a12Smrg    CARD8	unused[2];
403fb97780Smrg    CARD32	length;
41126a8a12Smrg    /* n	ARRAY8		previousId */
42126a8a12Smrg} smRegisterClientMsg;
43126a8a12Smrg
44126a8a12Smrgtypedef struct {
45126a8a12Smrg    CARD8	majorOpcode;
46126a8a12Smrg    CARD8	minorOpcode;
47126a8a12Smrg    CARD8	unused[2];
483fb97780Smrg    CARD32	length;
49126a8a12Smrg    /* n	ARRAY8		clientId */
50126a8a12Smrg} smRegisterClientReplyMsg;
51126a8a12Smrg
52126a8a12Smrgtypedef struct {
53126a8a12Smrg    CARD8	majorOpcode;
54126a8a12Smrg    CARD8	minorOpcode;
55126a8a12Smrg    CARD8	unused1[2];
563fb97780Smrg    CARD32	length;
57126a8a12Smrg    CARD8	saveType;
58126a8a12Smrg    CARD8	shutdown;
59126a8a12Smrg    CARD8	interactStyle;
60126a8a12Smrg    CARD8	fast;
61126a8a12Smrg    CARD8	unused2[4];
62126a8a12Smrg} smSaveYourselfMsg;
63126a8a12Smrg
64126a8a12Smrgtypedef struct {
65126a8a12Smrg    CARD8	majorOpcode;
66126a8a12Smrg    CARD8	minorOpcode;
67126a8a12Smrg    CARD8	unused1[2];
683fb97780Smrg    CARD32	length;
69126a8a12Smrg    CARD8	saveType;
70126a8a12Smrg    CARD8	shutdown;
71126a8a12Smrg    CARD8	interactStyle;
72126a8a12Smrg    CARD8	fast;
73126a8a12Smrg    CARD8	global;
74126a8a12Smrg    CARD8	unused2[3];
75126a8a12Smrg} smSaveYourselfRequestMsg;
76126a8a12Smrg
77126a8a12Smrgtypedef struct {
78126a8a12Smrg    CARD8	majorOpcode;
79126a8a12Smrg    CARD8	minorOpcode;
80126a8a12Smrg    CARD8	dialogType;
81126a8a12Smrg    CARD8	unused;
823fb97780Smrg    CARD32	length;
83126a8a12Smrg} smInteractRequestMsg;
84126a8a12Smrg
85126a8a12Smrgtypedef struct {
86126a8a12Smrg    CARD8	majorOpcode;
87126a8a12Smrg    CARD8	minorOpcode;
88126a8a12Smrg    CARD8	unused[2];
893fb97780Smrg    CARD32	length;
90126a8a12Smrg} smInteractMsg;
91126a8a12Smrg
92126a8a12Smrgtypedef struct {
93126a8a12Smrg    CARD8	majorOpcode;
94126a8a12Smrg    CARD8	minorOpcode;
95126a8a12Smrg    CARD8	cancelShutdown;
96126a8a12Smrg    CARD8	unused;
973fb97780Smrg    CARD32	length;
98126a8a12Smrg} smInteractDoneMsg;
99126a8a12Smrg
100126a8a12Smrgtypedef struct {
101126a8a12Smrg    CARD8	majorOpcode;
102126a8a12Smrg    CARD8	minorOpcode;
103126a8a12Smrg    CARD8       success;
104126a8a12Smrg    CARD8	unused;
1053fb97780Smrg    CARD32	length;
106126a8a12Smrg} smSaveYourselfDoneMsg;
107126a8a12Smrg
108126a8a12Smrgtypedef struct {
109126a8a12Smrg    CARD8	majorOpcode;
110126a8a12Smrg    CARD8	minorOpcode;
111126a8a12Smrg    CARD8	unused[2];
1123fb97780Smrg    CARD32	length;
113126a8a12Smrg} smDieMsg;
114126a8a12Smrg
115126a8a12Smrgtypedef struct {
116126a8a12Smrg    CARD8	majorOpcode;
117126a8a12Smrg    CARD8	minorOpcode;
118126a8a12Smrg    CARD8	unused[2];
1193fb97780Smrg    CARD32	length;
120126a8a12Smrg} smShutdownCancelledMsg;
121126a8a12Smrg
122126a8a12Smrgtypedef struct {
123126a8a12Smrg    CARD8	majorOpcode;
124126a8a12Smrg    CARD8	minorOpcode;
125126a8a12Smrg    CARD8	unused[2];
1263fb97780Smrg    CARD32	length;
127126a8a12Smrg    /* b	LISTofARRAY8	reasons */
128126a8a12Smrg} smCloseConnectionMsg;
129126a8a12Smrg
130126a8a12Smrgtypedef struct {
131126a8a12Smrg    CARD8	majorOpcode;
132126a8a12Smrg    CARD8	minorOpcode;
133126a8a12Smrg    CARD8	unused[2];
1343fb97780Smrg    CARD32	length;
135126a8a12Smrg    /* a	LISTofPROPERTY	properties */
136126a8a12Smrg} smSetPropertiesMsg;
137126a8a12Smrg
138126a8a12Smrgtypedef struct {
139126a8a12Smrg    CARD8	majorOpcode;
140126a8a12Smrg    CARD8	minorOpcode;
141126a8a12Smrg    CARD8	unused[2];
1423fb97780Smrg    CARD32	length;
143126a8a12Smrg    /* a	LISTofARRAY8	property names */
144126a8a12Smrg} smDeletePropertiesMsg;
145126a8a12Smrg
146126a8a12Smrgtypedef struct {
147126a8a12Smrg    CARD8	majorOpcode;
148126a8a12Smrg    CARD8	minorOpcode;
149126a8a12Smrg    CARD8	unused[2];
1503fb97780Smrg    CARD32	length;
151126a8a12Smrg} smGetPropertiesMsg;
152126a8a12Smrg
153126a8a12Smrgtypedef struct {
154126a8a12Smrg    CARD8	majorOpcode;
155126a8a12Smrg    CARD8	minorOpcode;
156126a8a12Smrg    CARD8	unused[2];
1573fb97780Smrg    CARD32	length;
158126a8a12Smrg    /* a	LISTofPROPERTY	properties */
159126a8a12Smrg} smPropertiesReplyMsg;
160126a8a12Smrg
161126a8a12Smrgtypedef struct {
162126a8a12Smrg    CARD8	majorOpcode;
163126a8a12Smrg    CARD8	minorOpcode;
164126a8a12Smrg    CARD8	unused[2];
1653fb97780Smrg    CARD32	length;
166126a8a12Smrg} smSaveYourselfPhase2RequestMsg;
167126a8a12Smrg
168126a8a12Smrgtypedef struct {
169126a8a12Smrg    CARD8	majorOpcode;
170126a8a12Smrg    CARD8	minorOpcode;
171126a8a12Smrg    CARD8	unused[2];
1723fb97780Smrg    CARD32	length;
173126a8a12Smrg} smSaveYourselfPhase2Msg;
174126a8a12Smrg
175126a8a12Smrgtypedef struct {
176126a8a12Smrg    CARD8	majorOpcode;
177126a8a12Smrg    CARD8	minorOpcode;
178126a8a12Smrg    CARD8	unused[2];
1793fb97780Smrg    CARD32	length;
180126a8a12Smrg} smSaveCompleteMsg;
181126a8a12Smrg
182126a8a12Smrg
183126a8a12Smrg/*
184126a8a12Smrg * SIZEOF values.  These better be multiples of 8.
185126a8a12Smrg */
186126a8a12Smrg
187126a8a12Smrg#define sz_smRegisterClientMsg 			8
188126a8a12Smrg#define sz_smRegisterClientReplyMsg 		8
189126a8a12Smrg#define sz_smSaveYourselfMsg 			16
190126a8a12Smrg#define sz_smSaveYourselfRequestMsg		16
191126a8a12Smrg#define sz_smInteractRequestMsg 		8
192126a8a12Smrg#define sz_smInteractMsg 			8
193126a8a12Smrg#define sz_smInteractDoneMsg 			8
194126a8a12Smrg#define sz_smSaveYourselfDoneMsg 		8
195126a8a12Smrg#define sz_smDieMsg 				8
196126a8a12Smrg#define sz_smShutdownCancelledMsg 		8
197126a8a12Smrg#define sz_smCloseConnectionMsg 		8
198126a8a12Smrg#define sz_smSetPropertiesMsg 			8
199126a8a12Smrg#define sz_smDeletePropertiesMsg 		8
200126a8a12Smrg#define sz_smGetPropertiesMsg 			8
201126a8a12Smrg#define sz_smPropertiesReplyMsg 		8
202126a8a12Smrg#define sz_smSaveYourselfPhase2RequestMsg	8
203126a8a12Smrg#define sz_smSaveYourselfPhase2Msg 		8
204126a8a12Smrg#define sz_smSaveCompleteMsg 			8
205126a8a12Smrg
206126a8a12Smrg#endif /* _SMPROTO_H_ */
207