SM.h revision 126a8a12
1126a8a12Smrg/* $Xorg: SM.h,v 1.4 2001/02/09 02:03:30 xorgcvs Exp $ */
2126a8a12Smrg
3126a8a12Smrg/*
4126a8a12Smrg
5126a8a12SmrgCopyright 1993, 1998  The Open Group
6126a8a12Smrg
7126a8a12SmrgPermission to use, copy, modify, distribute, and sell this software and its
8126a8a12Smrgdocumentation for any purpose is hereby granted without fee, provided that
9126a8a12Smrgthe above copyright notice appear in all copies and that both that
10126a8a12Smrgcopyright notice and this permission notice appear in supporting
11126a8a12Smrgdocumentation.
12126a8a12Smrg
13126a8a12SmrgThe above copyright notice and this permission notice shall be included in
14126a8a12Smrgall copies or substantial portions of the Software.
15126a8a12Smrg
16126a8a12SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17126a8a12SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18126a8a12SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
19126a8a12SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
20126a8a12SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21126a8a12SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22126a8a12Smrg
23126a8a12SmrgExcept as contained in this notice, the name of The Open Group shall not be
24126a8a12Smrgused in advertising or otherwise to promote the sale, use or other dealings
25126a8a12Smrgin this Software without prior written authorization from The Open Group.
26126a8a12Smrg
27126a8a12Smrg*/
28126a8a12Smrg
29126a8a12Smrg/*
30126a8a12Smrg * Author: Ralph Mor, X Consortium
31126a8a12Smrg */
32126a8a12Smrg
33126a8a12Smrg#ifndef _SM_H_
34126a8a12Smrg#define _SM_H_
35126a8a12Smrg
36126a8a12Smrg/*
37126a8a12Smrg * Protocol Version
38126a8a12Smrg */
39126a8a12Smrg
40126a8a12Smrg#define SmProtoMajor	1
41126a8a12Smrg#define SmProtoMinor	0
42126a8a12Smrg
43126a8a12Smrg
44126a8a12Smrg/*
45126a8a12Smrg * Interact Style
46126a8a12Smrg */
47126a8a12Smrg
48126a8a12Smrg#define SmInteractStyleNone	0
49126a8a12Smrg#define SmInteractStyleErrors	1
50126a8a12Smrg#define SmInteractStyleAny	2
51126a8a12Smrg
52126a8a12Smrg
53126a8a12Smrg/*
54126a8a12Smrg * Dialog Type
55126a8a12Smrg */
56126a8a12Smrg
57126a8a12Smrg#define SmDialogError		0
58126a8a12Smrg#define SmDialogNormal		1
59126a8a12Smrg
60126a8a12Smrg
61126a8a12Smrg/*
62126a8a12Smrg * Save Type
63126a8a12Smrg */
64126a8a12Smrg
65126a8a12Smrg#define SmSaveGlobal	0
66126a8a12Smrg#define SmSaveLocal	1
67126a8a12Smrg#define SmSaveBoth	2
68126a8a12Smrg
69126a8a12Smrg
70126a8a12Smrg/*
71126a8a12Smrg * Restart Style Hints
72126a8a12Smrg */
73126a8a12Smrg
74126a8a12Smrg#define SmRestartIfRunning	0
75126a8a12Smrg#define SmRestartAnyway		1
76126a8a12Smrg#define SmRestartImmediately	2
77126a8a12Smrg#define SmRestartNever		3
78126a8a12Smrg
79126a8a12Smrg
80126a8a12Smrg/*
81126a8a12Smrg * Property names
82126a8a12Smrg */
83126a8a12Smrg
84126a8a12Smrg#define SmCloneCommand		"CloneCommand"
85126a8a12Smrg#define SmCurrentDirectory	"CurrentDirectory"
86126a8a12Smrg#define SmDiscardCommand	"DiscardCommand"
87126a8a12Smrg#define SmEnvironment		"Environment"
88126a8a12Smrg#define SmProcessID		"ProcessID"
89126a8a12Smrg#define SmProgram		"Program"
90126a8a12Smrg#define SmRestartCommand	"RestartCommand"
91126a8a12Smrg#define SmResignCommand		"ResignCommand"
92126a8a12Smrg#define SmRestartStyleHint	"RestartStyleHint"
93126a8a12Smrg#define SmShutdownCommand	"ShutdownCommand"
94126a8a12Smrg#define SmUserID		"UserID"
95126a8a12Smrg
96126a8a12Smrg
97126a8a12Smrg/*
98126a8a12Smrg * Property types
99126a8a12Smrg */
100126a8a12Smrg
101126a8a12Smrg#define SmCARD8			"CARD8"
102126a8a12Smrg#define SmARRAY8		"ARRAY8"
103126a8a12Smrg#define SmLISTofARRAY8		"LISTofARRAY8"
104126a8a12Smrg
105126a8a12Smrg
106126a8a12Smrg/*
107126a8a12Smrg * SM minor opcodes
108126a8a12Smrg */
109126a8a12Smrg
110126a8a12Smrg#define SM_Error			0
111126a8a12Smrg#define SM_RegisterClient 		1
112126a8a12Smrg#define SM_RegisterClientReply 		2
113126a8a12Smrg#define SM_SaveYourself 		3
114126a8a12Smrg#define SM_SaveYourselfRequest 		4
115126a8a12Smrg#define SM_InteractRequest 		5
116126a8a12Smrg#define SM_Interact 			6
117126a8a12Smrg#define SM_InteractDone 		7
118126a8a12Smrg#define SM_SaveYourselfDone 		8
119126a8a12Smrg#define SM_Die 				9
120126a8a12Smrg#define SM_ShutdownCancelled		10
121126a8a12Smrg#define SM_CloseConnection 		11
122126a8a12Smrg#define SM_SetProperties 		12
123126a8a12Smrg#define SM_DeleteProperties 		13
124126a8a12Smrg#define SM_GetProperties 		14
125126a8a12Smrg#define SM_PropertiesReply 		15
126126a8a12Smrg#define SM_SaveYourselfPhase2Request	16
127126a8a12Smrg#define SM_SaveYourselfPhase2		17
128126a8a12Smrg#define SM_SaveComplete			18
129126a8a12Smrg
130126a8a12Smrg#endif /* _SM_H_ */
131