2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
24 * (c) Copyright 1995 Digital Equipment Corporation.
25 * (c) Copyright 1993, 1994, 1995 Hewlett-Packard Company
26 * (c) Copyright 1993, 1994, 1995 International Business Machines Corp.
27 * (c) Copyright 1993, 1994, 1995 Sun Microsystems, Inc.
28 * (c) Copyright 1993, 1994, 1995 Novell, Inc.
29 * (c) Copyright 1995 FUJITSU LIMITED.
30 * (c) Copyright 1995 Hitachi.
32 * $XConsortium: SmXSMP.h /main/16 1996/02/13 11:02:37 barstow $
35 /*************************************<+>*************************************
36 *****************************************************************************
40 ** Project: DT Session Manager (dtsession)
42 *****************************************************************************
43 *************************************<+>*************************************/
47 #include <X11/Intrinsic.h>
48 #include <X11/SM/SMlib.h>
49 #include <X11/ICE/ICEutil.h>
52 * Constants for the Save_Session ToolTalk message
54 #define DEFAULT_SAVE_TYPE SmSaveGlobal
55 #define DEFAULT_SHUTDOWN False
56 #define DEFAULT_INTERACT_STYLE SmInteractStyleAny
57 #define DEFAULT_FAST True
58 #define DEFAULT_GLOBAL True
61 typedef struct _PropertyRec {
63 struct _PropertyRec *next;
64 } PropertyRec, *PropertyRecPtr;
66 typedef struct _ClientRec {
75 Boolean saveYourselfDone;
76 Boolean saveYourselfP2Requested;
77 Boolean interactRequested;
78 struct _ClientRec * next;
79 } ClientRec, *ClientRecPtr;
84 Boolean clientInteracting;
88 Boolean shutdownCanceled;
94 ClientRecPtr interactClient;
97 typedef struct _XSMPClientDBRec {
103 char ** restartCommand;
104 char ** cloneCommand;
105 char ** discardCommand;
108 struct _XSMPClientDBRec * next;
109 } XSMPClientDBRec, *XSMPClientDBRecPtr;
111 typedef struct _ProxyClientDBRec {
115 } ProxyClientDBRec, *ProxyClientDBRecPtr;
118 IceListenObj * listenObjs;
120 IceAuthDataEntry * authDataEntries;
121 SaveStateRec saveState;
122 XSMPClientDBRecPtr xsmpDbList;
125 } XSMPSettings, *XSMPSettingPtr;
128 * Failure modes during the initializatin of XSMP
131 XSMP_FAILURE_SMS_INITIALIZE,
132 XSMP_FAILURE_ICE_LISTEN,
133 XSMP_FAILURE_AUTHENTICATION,
134 XSMP_FAILURE_ICE_ADD_WATCH,
135 XSMP_FAILURE_ICE_COMPOSE_IDS,
140 * Public variable declarations
142 extern XSMPSettings smXSMP;
143 extern ClientRecPtr connectedList;
145 extern char SM_SESSION_MANAGER[];
146 extern char SM_VENDOR_NAME[];
147 extern char SM_RELEASE_NAME[];
148 extern char SM_CLIENT_ID[];
149 extern Atom XaSmClientId;
152 * Public function declarations
154 extern Boolean InitXSMP ( );
156 void SaveYourselfReqProc (
158 SmPointer managerData,
165 void CloseDownClient (
166 ClientRecPtr client );