Copyright 1993, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
* Author: Ralph Mor, X Consortium
#include <X11/ICE/ICElib.h>
typedef IcePointer SmPointer;
* Connection objects. Defined in SMlibint.h
typedef struct _SmcConn *SmcConn;
typedef struct _SmsConn *SmsConn;
* Session Management property
int length; /* length (in bytes) of the value */
SmPointer value; /* the value */
char *name; /* name of property */
char *type; /* type of property */
int num_vals; /* number of values in property */
SmPropValue *vals; /* the values */
* SmcCloseConnection status return
typedef void (*SmcSaveYourselfProc) (
SmPointer /* clientData */,
typedef void (*SmcSaveYourselfPhase2Proc) (
SmPointer /* clientData */
typedef void (*SmcInteractProc) (
SmPointer /* clientData */
typedef void (*SmcDieProc) (
SmPointer /* clientData */
typedef void (*SmcShutdownCancelledProc) (
SmPointer /* clientData */
typedef void (*SmcSaveCompleteProc) (
SmPointer /* clientData */
typedef void (*SmcPropReplyProc) (
SmPointer /* clientData */,
* Callbacks set up at SmcOpenConnection time
SmcSaveYourselfProc callback;
SmcSaveCompleteProc callback;
SmcShutdownCancelledProc callback;
#define SmcSaveYourselfProcMask (1L << 0)
#define SmcDieProcMask (1L << 1)
#define SmcSaveCompleteProcMask (1L << 2)
#define SmcShutdownCancelledProcMask (1L << 3)
* Session manager callbacks
typedef Status (*SmsRegisterClientProc) (
SmPointer /* managerData */,
typedef void (*SmsInteractRequestProc) (
SmPointer /* managerData */,
typedef void (*SmsInteractDoneProc) (
SmPointer /* managerData */,
Bool /* cancelShutdown */
typedef void (*SmsSaveYourselfRequestProc) (
SmPointer /* managerData */,
typedef void (*SmsSaveYourselfPhase2RequestProc) (
SmPointer /* managerData */
typedef void (*SmsSaveYourselfDoneProc) (
SmPointer /* managerData */,
typedef void (*SmsCloseConnectionProc) (
SmPointer /* managerData */,
typedef void (*SmsSetPropertiesProc) (
SmPointer /* managerData */,
typedef void (*SmsDeletePropertiesProc) (
SmPointer /* managerData */,
typedef void (*SmsGetPropertiesProc) (
SmPointer /* managerData */
* Callbacks set up by a session manager when a new client connects.
SmsRegisterClientProc callback;
SmsInteractRequestProc callback;
SmsInteractDoneProc callback;
SmsSaveYourselfRequestProc callback;
SmsSaveYourselfPhase2RequestProc callback;
} save_yourself_phase2_request;
SmsSaveYourselfDoneProc callback;
SmsCloseConnectionProc callback;
SmsSetPropertiesProc callback;
SmsDeletePropertiesProc callback;
SmsGetPropertiesProc callback;
#define SmsRegisterClientProcMask (1L << 0)
#define SmsInteractRequestProcMask (1L << 1)
#define SmsInteractDoneProcMask (1L << 2)
#define SmsSaveYourselfRequestProcMask (1L << 3)
#define SmsSaveYourselfP2RequestProcMask (1L << 4)
#define SmsSaveYourselfDoneProcMask (1L << 5)
#define SmsCloseConnectionProcMask (1L << 6)
#define SmsSetPropertiesProcMask (1L << 7)
#define SmsDeletePropertiesProcMask (1L << 8)
#define SmsGetPropertiesProcMask (1L << 9)
typedef Status (*SmsNewClientProc) (
SmPointer /* managerData */,
unsigned long * /* maskRet */,
SmsCallbacks * /* callbacksRet */,
char ** /* failureReasonRet */
typedef void (*SmcErrorHandler) (
int /* offendingMinorOpcode */,
unsigned long /* offendingSequence */,
typedef void (*SmsErrorHandler) (
int /* offendingMinorOpcode */,
unsigned long /* offendingSequence */,
extern SmcConn SmcOpenConnection (
char * /* networkIdsList */,
unsigned long /* mask */,
SmcCallbacks * /* callbacks */,
const char * /* previousId */,
char ** /* clientIdRet */,
char * /* errorStringRet */
extern SmcCloseStatus SmcCloseConnection (
extern void SmcModifyCallbacks (
unsigned long /* mask */,
SmcCallbacks * /* callbacks */
extern void SmcSetProperties (
extern void SmcDeleteProperties (
extern Status SmcGetProperties (
SmcPropReplyProc /* propReplyProc */,
SmPointer /* clientData */
extern Status SmcInteractRequest (
SmcInteractProc /* interactProc */,
SmPointer /* clientData */
extern void SmcInteractDone (
Bool /* cancelShutdown */
extern void SmcRequestSaveYourself (
extern Status SmcRequestSaveYourselfPhase2 (
SmcSaveYourselfPhase2Proc /* saveYourselfPhase2Proc */,
SmPointer /* clientData */
extern void SmcSaveYourselfDone (
extern int SmcProtocolVersion (
extern int SmcProtocolRevision (
extern char *SmcRelease (
extern char *SmcClientID (
extern IceConn SmcGetIceConnection (
extern Status SmsInitialize (
const char * /* vendor */,
const char * /* release */,
SmsNewClientProc /* newClientProc */,
SmPointer /* managerData */,
IceHostBasedAuthProc /* hostBasedAuthProc */,
char * /* errorStringRet */
extern char *SmsClientHostName (
extern char *SmsGenerateClientID (
extern Status SmsRegisterClientReply (
extern void SmsSaveYourself (
extern void SmsSaveYourselfPhase2 (
extern void SmsInteract (
extern void SmsSaveComplete (
extern void SmsShutdownCancelled (
extern void SmsReturnProperties (