1 /* -*-c-*- */
2 
3 #ifndef FVWMLIB_FSMLIB_H
4 #define FVWMLIB_FSMLIB_H
5 
6 /* ---------------------------- included header files ---------------------- */
7 #include "config.h"
8 #include "fvwm_x11.h"
9 
10 /* ---------------------------- global definitions ------------------------- */
11 
12 /* ---------------------------- global macros ------------------------------ */
13 
14 #if SessionSupport
15 
16 /* SM.h */
17 #define FSmProtoMajor	SmProtoMajor
18 #define FSmProtoMinor	SmProtoMinor
19 
20 #define FSmInteractStyleNone	SmInteractStyleNone
21 #define FSmInteractStyleErrors	SmInteractStyleErrors
22 #define FSmInteractStyleAny	SmInteractStyleAny
23 
24 #define FSmDialogError		SmDialogError
25 #define FSmDialogNormal		SmDialogNormal
26 
27 #define FSmSaveGlobal	SmSaveGlobal
28 #define FSmSaveLocal	SmSaveLocal
29 #define FSmSaveBoth	SmSaveBoth
30 
31 #define FSmRestartIfRunning	SmRestartIfRunning
32 #define FSmRestartAnyway	SmRestartAnyway
33 #define FSmRestartImmediately	SmRestartImmediately
34 #define FSmRestartNever		SmRestartNever
35 
36 #define FSmCloneCommand		SmCloneCommand
37 #define FSmCurrentDirectory	SmCurrentDirectory
38 #define FSmDiscardCommand	SmDiscardCommand
39 #define FSmEnvironment		SmEnvironment
40 #define FSmProcessID		SmProcessID
41 #define FSmProgram		SmProgram
42 #define FSmRestartCommand	SmRestartCommand
43 #define FSmResignCommand	SmResignCommand
44 #define FSmRestartStyleHint	SmRestartStyleHint
45 #define FSmShutdownCommand	SmShutdownCommand
46 #define FSmUserID		SmUserID
47 
48 #define FSmCARD8		SmCARD8
49 #define FSmARRAY8		SmARRAY8
50 #define FSmLISTofARRAY8		SmLISTofARRAY8
51 
52 #define FSM_Error			SM_Error
53 #define FSM_RegisterClient 		SM_RegisterClient
54 #define FSM_RegisterClientReply 	SM_RegisterClientReply
55 #define FSM_SaveYourself 		SM_SaveYourself
56 #define FSM_SaveYourselfRequest 	SM_SaveYourselfRequest
57 #define FSM_InteractRequest 		SM_InteractRequest
58 #define FSM_Interact 			SM_Interact
59 #define FSM_InteractDone 		SM_InteractDone
60 #define FSM_SaveYourselfDone 		SM_SaveYourselfDone
61 #define FSM_Die 			SM_Die
62 #define FSM_ShutdownCancelled		SM_ShutdownCancelled
63 #define FSM_CloseConnection 		SM_CloseConnection
64 #define FSM_SetProperties 		SM_SetProperties
65 #define FSM_DeleteProperties 		SM_DeleteProperties
66 #define FSM_GetProperties 		SM_GetProperties
67 #define FSM_PropertiesReply 		SM_PropertiesReply
68 #define FSM_SaveYourselfPhase2Request	SM_SaveYourselfPhase2Request
69 #define FSM_SaveYourselfPhase2		SM_SaveYourselfPhase2
70 #define FSM_SaveComplete		SM_SaveComplete
71 
72 /* ICE.h */
73 #define FIceProtoMajor IceProtoMajor
74 #define FIceProtoMinor IceProtoMinor
75 
76 #define FIceLSBfirst		IceLSBfirst
77 #define FIceMSBfirst		IceMSBfirst
78 
79 #define FICE_Error 		ICE_Error
80 #define FICE_ByteOrder		ICE_ByteOrder
81 #define FICE_ConnectionSetup	ICE_ConnectionSetup
82 #define FICE_AuthRequired	ICE_AuthRequired
83 #define FICE_AuthReply 		ICE_AuthReply
84 #define FICE_AuthNextPhase	ICE_AuthNextPhase
85 #define FICE_ConnectionReply	ICE_ConnectionReply
86 #define FICE_ProtocolSetup	ICE_ProtocolSetup
87 #define FICE_ProtocolReply	ICE_ProtocolReply
88 #define FICE_Ping		ICE_Ping
89 #define FICE_PingReply		ICE_PingReply
90 #define FICE_WantToClose	ICE_WantToClose
91 #define FICE_NoClose		ICE_NoClose
92 
93 #define FIceCanContinue		IceCanContinue
94 #define FIceFatalToProtocol	IceFatalToProtocol
95 #define FIceFatalToConnection	IceFatalToConnection
96 
97 #define FIceBadMinor	IceBadMinor
98 #define FIceBadState	IceBadState
99 #define FIceBadLength	IceBadLength
100 #define FIceBadValue	IceBadValue
101 
102 #define FIceBadMajor			IceBadMajor
103 #define FIceNoAuth			IceNoAuth
104 #define FIceNoVersion			IceNoVersion
105 #define FIceSetupFailed			IceSetupFailed
106 #define FIceAuthRejected		IceAuthRejected
107 #define FIceAuthFailed			IceAuthFailed
108 #define FIceProtocolDuplicate		IceProtocolDuplicate
109 #define FIceMajorOpcodeDuplicate	IceMajorOpcodeDuplicate
110 #define FIceUnknownProtocol		IceUnknownProtocol
111 
112 /* SMlib.h */
113 #define FSmsRegisterClientProcMask		SmsRegisterClientProcMask
114 #define FSmsInteractRequestProcMask		SmsInteractRequestProcMask
115 #define FSmsInteractDoneProcMask		SmsInteractDoneProcMask
116 #define FSmsSaveYourselfRequestProcMask  	SmsSaveYourselfRequestProcMask
117 #define FSmsSaveYourselfP2RequestProcMask	SmsSaveYourselfP2RequestProcMask
118 #define FSmsSaveYourselfDoneProcMask		SmsSaveYourselfDoneProcMask
119 #define FSmsCloseConnectionProcMask		SmsCloseConnectionProcMask
120 #define FSmsSetPropertiesProcMask		SmsSetPropertiesProcMask
121 #define FSmsDeletePropertiesProcMask		SmsDeletePropertiesProcMask
122 #define FSmsGetPropertiesProcMask		SmsGetPropertiesProcMask
123 
124 #define FSmcSaveYourselfProcMask	SmcSaveYourselfProcMask
125 #define FSmcDieProcMask			SmcDieProcMask
126 #define FSmcSaveCompleteProcMask	SmcSaveCompleteProcMask
127 #define FSmcShutdownCancelledProcMask	SmcShutdownCancelledProcMask
128 
129 /* ICEutil.h */
130 #define FIceAuthLockSuccess IceAuthLockSuccess
131 #define FIceAuthLockError IceAuthLockError
132 #define FIceAuthLockTimeout IceAuthLockTimeout
133 
134 #else /* !SessionSupport */
135 
136 /* SM.h */
137 #define FSmProtoMajor	1
138 #define FSmProtoMinor	0
139 
140 #define FSmInteractStyleNone	0
141 #define FSmInteractStyleErrors	1
142 #define FSmInteractStyleAny	2
143 
144 #define FSmDialogError		0
145 #define FSmDialogNormal		1
146 
147 #define FSmSaveGlobal	0
148 #define FSmSaveLocal	1
149 #define FSmSaveBoth	2
150 
151 #define FSmRestartIfRunning	0
152 #define FSmRestartAnyway	1
153 #define FSmRestartImmediately	2
154 #define FSmRestartNever		3
155 
156 #define FSmCloneCommand		"CloneCommand"
157 #define FSmCurrentDirectory	"CurrentDirectory"
158 #define FSmDiscardCommand	"DiscardCommand"
159 #define FSmEnvironment		"Environment"
160 #define FSmProcessID		"ProcessID"
161 #define FSmProgram		"Program"
162 #define FSmRestartCommand	"RestartCommand"
163 #define FSmResignCommand	"ResignCommand"
164 #define FSmRestartStyleHint	"RestartStyleHint"
165 #define FSmShutdownCommand	"ShutdownCommand"
166 #define FSmUserID		"UserID"
167 
168 #define FSmCARD8		"CARD8"
169 #define FSmARRAY8		"ARRAY8"
170 #define FSmLISTofARRAY8		"LISTofARRAY8"
171 
172 #define FSM_Error			0
173 #define FSM_RegisterClient 		1
174 #define FSM_RegisterClientReply 	2
175 #define FSM_SaveYourself 		3
176 #define FSM_SaveYourselfRequest 	4
177 #define FSM_InteractRequest 		5
178 #define FSM_Interact 			6
179 #define FSM_InteractDone 		7
180 #define FSM_SaveYourselfDone 		8
181 #define FSM_Die 			9
182 #define FSM_ShutdownCancelled		10
183 #define FSM_CloseConnection 		11
184 #define FSM_SetProperties 		12
185 #define FSM_DeleteProperties 		13
186 #define FSM_GetProperties 		14
187 #define FSM_PropertiesReply 		15
188 #define FSM_SaveYourselfPhase2Request	16
189 #define FSM_SaveYourselfPhase2		17
190 #define FSM_SaveComplete		18
191 
192 /* ICE.h */
193 #define FIceProtoMajor 1
194 #define FIceProtoMinor 0
195 
196 #define FIceLSBfirst		0
197 #define FIceMSBfirst		1
198 
199 #define FICE_Error 		0
200 #define FICE_ByteOrder		1
201 #define FICE_ConnectionSetup	2
202 #define FICE_AuthRequired	3
203 #define FICE_AuthReply 		4
204 #define FICE_AuthNextPhase	5
205 #define FICE_ConnectionReply	6
206 #define FICE_ProtocolSetup	7
207 #define FICE_ProtocolReply	8
208 #define FICE_Ping		9
209 #define FICE_PingReply		10
210 #define FICE_WantToClose	11
211 #define FICE_NoClose		12
212 
213 #define FIceCanContinue		0
214 #define FIceFatalToProtocol	1
215 #define FIceFatalToConnection	2
216 
217 #define FIceBadMinor	0x8000
218 #define FIceBadState	0x8001
219 #define FIceBadLength	0x8002
220 #define FIceBadValue	0x8003
221 
222 #define FIceBadMajor			0
223 #define FIceNoAuth			1
224 #define FIceNoVersion			2
225 #define FIceSetupFailed			3
226 #define FIceAuthRejected		4
227 #define FIceAuthFailed			5
228 #define FIceProtocolDuplicate		6
229 #define FIceMajorOpcodeDuplicate	7
230 #define FIceUnknownProtocol		8
231 
232 /* SMlib.h */
233 #define FSmsRegisterClientProcMask		(1L << 0)
234 #define FSmsInteractRequestProcMask		(1L << 1)
235 #define FSmsInteractDoneProcMask		(1L << 2)
236 #define FSmsSaveYourselfRequestProcMask  	(1L << 3)
237 #define FSmsSaveYourselfP2RequestProcMask	(1L << 4)
238 #define FSmsSaveYourselfDoneProcMask		(1L << 5)
239 #define FSmsCloseConnectionProcMask		(1L << 6)
240 #define FSmsSetPropertiesProcMask		(1L << 7)
241 #define FSmsDeletePropertiesProcMask		(1L << 8)
242 #define FSmsGetPropertiesProcMask		(1L << 9)
243 
244 #define FSmcSaveYourselfProcMask	(1L << 0)
245 #define FSmcDieProcMask			(1L << 1)
246 #define FSmcSaveCompleteProcMask	(1L << 2)
247 #define FSmcShutdownCancelledProcMask	(1L << 3)
248 
249 /* ICEutil.h */
250 #define IceAuthLockSuccess	0
251 #define IceAuthLockError	1
252 #define IceAuthLockTimeout	2
253 
254 #endif /* SessionSupport */
255 
256 /* ---------------------------- type definitions --------------------------- */
257 
258 #if SessionSupport
259 
260 /* ICElib.h */
261 typedef IcePointer FIcePointer;
262 
263 #define FIcePoAuthHaveReply IcePoAuthHaveReply
264 #define FIcePoAuthRejected IcePoAuthRejected
265 #define FIcePoAuthFailed IcePoAuthFailed
266 #define FIcePoAuthDoneCleanup IcePoAuthDoneCleanup
267 typedef IcePoAuthStatus FIcePoAuthStatus;
268 
269 #define FIcePaAuthContinue IcePaAuthContinue
270 #define FIcePaAuthAccepted IcePaAuthAccepted
271 #define FIcePaAuthRejected IcePaAuthRejected
272 #define FIcePaAuthFailed IcePaAuthFailed
273 typedef IcePaAuthStatus FIcePaAuthStatus;
274 
275 #define FIceConnectPending IceConnectPending
276 #define FIceConnectAccepted IceConnectAccepted
277 #define FIceConnectRejected IceConnectRejected
278 #define FIceConnectIOError IceConnectIOError
279 typedef IceConnectStatus FIceConnectStatus;
280 
281 #define FIceProtocolSetupSuccess IceProtocolSetupSuccess
282 #define FIceProtocolSetupFailure IceProtocolSetupFailure
283 #define FIceProtocolSetupIOError IceProtocolSetupIOError
284 #define FIceProtocolAlreadyActive IceProtocolAlreadyActive
285 typedef IceProtocolSetupStatus FIceProtocolSetupStatus;
286 
287 #define FIceAcceptSuccess IceAcceptSuccess
288 #define FIceAcceptFailure IceAcceptFailure
289 #define FIceAcceptBadMalloc IceAcceptBadMalloc
290 typedef IceAcceptStatus FIceAcceptStatus;
291 
292 #define FIceClosedNow IceClosedNow
293 #define FIceClosedASAP IceClosedASAP
294 #define FIceConnectionInUse IceConnectionInUse
295 #define FIceStartedShutdownNegotiation IceStartedShutdownNegotiation
296 typedef IceCloseStatus FIceCloseStatus;
297 
298 #define FIceProcessMessagesSuccess IceProcessMessagesSuccess
299 #define FIceProcessMessagesIOError IceProcessMessagesIOError
300 #define FIceProcessMessagesConnectionClosed IceProcessMessagesConnectionClosed
301 typedef IceProcessMessagesStatus FIceProcessMessagesStatus;
302 
303 typedef IceReplyWaitInfo FIceReplyWaitInfo;
304 typedef IceConn FIceConn;
305 typedef IceListenObj FIceListenObj;
306 
307 typedef IceWatchProc FIceWatchProc;
308 typedef IcePoProcessMsgProc FIcePoProcessMsgProc;
309 typedef IcePaProcessMsgProc FIcePaProcessMsgProc;
310 typedef IcePoVersionRec FIcePoVersionRec;
311 typedef IcePaVersionRec FIcePaVersionRec;
312 typedef IcePoAuthProc FIcePoAuthProc;
313 typedef IcePaAuthProc FIcePaAuthProc;
314 
315 typedef IceHostBasedAuthProc FIceHostBasedAuthProc;
316 typedef IceProtocolSetupProc FIceProtocolSetupProc;
317 typedef IceProtocolActivateProc FIceProtocolActivateProc;
318 typedef IceIOErrorProc FIceIOErrorProc;
319 typedef IcePingReplyProc FIcePingReplyProc;
320 typedef IceErrorHandler FIceErrorHandler;
321 typedef IceIOErrorHandler FIceIOErrorHandler;
322 
323 /* SMlib.h */
324 typedef SmPointer FSmPointer;
325 
326 typedef SmcConn FSmcConn;
327 typedef SmsConn FSmsConn;
328 
329 typedef SmPropValue FSmPropValue;
330 
331 typedef SmProp FSmProp;
332 
333 #define FSmcClosedNow SmcClosedNow
334 #define FSmcClosedASAP FSmcClosedASAP
335 #define FSmcConnectionInUse FSmcConnectionInUse
336 typedef SmcCloseStatus FSmcCloseStatus;
337 
338 typedef SmcSaveYourselfProc FSmcSaveYourselfProc;
339 typedef SmcSaveYourselfPhase2Proc FSmcSaveYourselfPhase2Proc;
340 typedef SmcInteractProc FSmcInteractProc;
341 typedef SmcDieProc FSmcDieProc;
342 typedef SmcShutdownCancelledProc  FSmcShutdownCancelledProc;
343 typedef SmcSaveCompleteProc FSmcSaveCompleteProc;
344 typedef SmcPropReplyProc FSmcPropReplyProc;
345 
346 typedef SmcCallbacks FSmcCallbacks;
347 
348 typedef SmsRegisterClientProc FSmsRegisterClientProc;
349 typedef SmsInteractRequestProc FSmsInteractRequestProc;
350 typedef SmsInteractDoneProc FSmsInteractDoneProc;
351 typedef SmsSaveYourselfRequestProc FSmsSaveYourselfRequestProc;
352 typedef SmsSaveYourselfPhase2RequestProc FSmsSaveYourselfPhase2RequestProc;
353 typedef SmsSaveYourselfDoneProc FSmsSaveYourselfDoneProc;
354 typedef SmsCloseConnectionProc FSmsCloseConnectionProc;
355 typedef SmsSetPropertiesProc FSmsSetPropertiesProc;
356 typedef SmsDeletePropertiesProc FSmsDeletePropertiesProc;
357 typedef SmsGetPropertiesProc FSmsGetPropertiesProc;
358 
359 typedef SmsCallbacks FSmsCallbacks;
360 
361 typedef SmsNewClientProc FSmsNewClientProc;
362 typedef SmcErrorHandler FSmcErrorHandler;
363 typedef SmsErrorHandler FSmsErrorHandler;
364 
365 /* ICEutil.h */
366 typedef IceAuthFileEntry FIceAuthFileEntry;
367 typedef IceAuthDataEntry FIceAuthDataEntry;
368 
369 #else  /* !SessionSupport */
370 
371 #ifdef __STDC__
372 typedef void *FIcePointer;
373 #else
374 typedef char *FIcePointer;
375 #endif
376 
377 
378 /* ICElib.h */
379 typedef enum {
380 	FIcePoAuthHaveReply, FIcePoAuthRejected, FIcePoAuthFailed,
381 	FIcePoAuthDoneCleanup
382 } FIcePoAuthStatus;
383 typedef enum {
384 	FIcePaAuthContinue, FIcePaAuthAccepted, FIcePaAuthRejected,
385 	FIcePaAuthFailed
386 } FIcePaAuthStatus;
387 typedef enum {
388     FIceConnectPending,FIceConnectAccepted,FIceConnectRejected,FIceConnectIOError
389 } FIceConnectStatus;
390 typedef enum {
391     FIceProtocolSetupSuccess,FIceProtocolSetupFailure,FIceProtocolSetupIOError,
392     FIceProtocolAlreadyActive
393 } FIceProtocolSetupStatus;
394 typedef enum {
395     FIceAcceptSuccess,FIceAcceptFailure,FIceAcceptBadMalloc
396 } FIceAcceptStatus;
397 typedef enum {
398     FIceClosedNow,FIceClosedASAP,FIceConnectionInUse,
399     FIceStartedShutdownNegotiation
400 } FIceCloseStatus;
401 typedef enum {
402     FIceProcessMessagesSuccess,FIceProcessMessagesIOError,
403     FIceProcessMessagesConnectionClosed
404 } FIceProcessMessagesStatus;
405 typedef struct {
406 	unsigned long sequence_of_request; int major_opcode_of_request;
407 	int minor_opcode_of_request; FIcePointer reply;
408 } FIceReplyWaitInfo;
409 typedef void *FIceConn;
410 typedef void *FIceListenObj;
411 typedef void (*FIceWatchProc) (
412 #ifdef __STDC__
413     FIceConn, FIcePointer, Bool, FIcePointer *
414 #endif
415 );
416 typedef void (*FIcePoProcessMsgProc) (
417 #ifdef __STDC__
418 	FIceConn, FIcePointer, int, unsigned long, Bool, FIceReplyWaitInfo *,
419 	Bool *
420 #endif
421 );
422 typedef void (*FIcePaProcessMsgProc) (
423 #ifdef __STDC__
424 	FIceConn, FIcePointer, int, unsigned long, Bool
425 #endif
426 );
427 typedef struct {
428     int major_version; int minor_version; FIcePoProcessMsgProc process_msg_proc;
429 } FIcePoVersionRec;
430 typedef struct {
431     int major_version; int minor_version; FIcePaProcessMsgProc process_msg_proc;
432 } FIcePaVersionRec;
433 typedef FIcePoAuthStatus (*FIcePoAuthProc) (
434 #ifdef __STDC__
435 	FIceConn, FIcePointer *, Bool, Bool, int, FIcePointer, int *,
436 	FIcePointer *, char **
437 #endif
438 );
439 typedef FIcePaAuthStatus (*FIcePaAuthProc) (
440 #ifdef __STDC__
441 	FIceConn, FIcePointer *, Bool, int, FIcePointer, int *,
442 	FIcePointer *, char **
443 #endif
444 );
445 typedef Bool (*FIceHostBasedAuthProc) (
446 #ifdef __STDC__
447     char *
448 #endif
449 );
450 typedef Status (*FIceProtocolSetupProc) (
451 #ifdef __STDC__
452 	FIceConn, int, int, char *, char *, FIcePointer *, char **
453 #endif
454 );
455 typedef void (*FIceProtocolActivateProc) (
456 #ifdef __STDC__
457     FIceConn, FIcePointer
458 #endif
459 );
460 typedef void (*FIceIOErrorProc) (
461 #ifdef __STDC__
462     FIceConn
463 #endif
464 );
465 typedef void (*FIcePingReplyProc) (
466 #ifdef __STDC__
467     FIceConn, FIcePointer
468 #endif
469 );
470 typedef void (*FIceErrorHandler) (
471 #ifdef __STDC__
472     FIceConn, Bool, int, unsigned long, int, int, FIcePointer
473 #endif
474 );
475 typedef void (*FIceIOErrorHandler) (
476 #ifdef __STDC__
477     FIceConn 		/* iceConn */
478 #endif
479 );
480 
481 /* SMlib.h */
482 typedef FIcePointer FSmPointer;
483 
484 typedef void *FSmcConn;
485 typedef void *FSmsConn;
486 
487 typedef struct { int length; FSmPointer value;
488 } FSmPropValue;
489 typedef struct { char *name; char *type; int num_vals; FSmPropValue *vals;
490 } FSmProp;
491 
492 typedef enum {
493     FSmcClosedNow,
494     FSmcClosedASAP,
495     FSmcConnectionInUse
496 } FSmcCloseStatus;
497 
498 typedef void (*FSmcSaveYourselfProc) (
499 #ifdef __STDC__
500     FSmcConn, FSmPointer, int, Bool, int, Bool
501 #endif
502 );
503 typedef void (*FSmcSaveYourselfPhase2Proc) (
504 #ifdef __STDC__
505     FSmcConn, FSmPointer
506 #endif
507 );
508 typedef void (*FSmcInteractProc) (
509 #ifdef __STDC__
510     FSmcConn, FSmPointer
511 #endif
512 );
513 typedef void (*FSmcDieProc) (
514 #ifdef __STDC__
515     FSmcConn, FSmPointer
516 #endif
517 );
518 typedef void (*FSmcShutdownCancelledProc) (
519 #ifdef __STDC__
520     FSmcConn, FSmPointer
521 #endif
522 );
523 typedef void (*FSmcSaveCompleteProc) (
524 #ifdef __STDC__
525     FSmcConn, FSmPointer
526 #endif
527 );
528 typedef void (*FSmcPropReplyProc) (
529 #ifdef __STDC__
530     FSmcConn, FSmPointer, int, FSmProp **
531 #endif
532 );
533 
534 typedef struct {
535     struct {
536 	FSmcSaveYourselfProc	 callback;
537 	FSmPointer		 client_data;
538     } save_yourself;
539     struct {
540 	FSmcDieProc		 callback;
541 	FSmPointer		 client_data;
542     } die;
543     struct {
544 	FSmcSaveCompleteProc	 callback;
545 	FSmPointer		 client_data;
546     } save_complete;
547     struct {
548 	FSmcShutdownCancelledProc callback;
549 	FSmPointer		 client_data;
550     } shutdown_cancelled;
551 } FSmcCallbacks;
552 
553 typedef Status (*FSmsRegisterClientProc) (
554 #ifdef __STDC__
555 	FSmsConn, FSmPointer, char *
556 #endif
557 );
558 typedef void (*FSmsInteractRequestProc) (
559 #ifdef __STDC__
560 	FSmsConn, FSmPointer, int
561 #endif
562 );
563 typedef void (*FSmsInteractDoneProc) (
564 #ifdef __STDC__
565 	FSmsConn, FSmPointer, Bool
566 #endif
567 );
568 typedef void (*FSmsSaveYourselfRequestProc) (
569 #ifdef __STDC__
570 	FSmsConn, FSmPointer, int, Bool, int, Bool, Bool
571 #endif
572 );
573 typedef void (*FSmsSaveYourselfPhase2RequestProc) (
574 #ifdef __STDC__
575 	FSmsConn, FSmPointer
576 #endif
577 );
578 typedef void (*FSmsSaveYourselfDoneProc) (
579 #ifdef __STDC__
580 	FSmsConn, FSmPointer, Bool
581 #endif
582 );
583 typedef void (*FSmsCloseConnectionProc) (
584 #ifdef __STDC__
585 	FSmsConn, FSmPointer, int, char **
586 #endif
587 );
588 typedef void (*FSmsSetPropertiesProc) (
589 #ifdef __STDC__
590 	FSmsConn, FSmPointer, int, FSmProp **
591 #endif
592 );
593 typedef void (*FSmsDeletePropertiesProc) (
594 #ifdef __STDC__
595 	FSmsConn, FSmPointer, int, char **
596 #endif
597 );
598 typedef void (*FSmsGetPropertiesProc) (
599 #ifdef __STDC__
600 	FSmsConn, FSmPointer
601 #endif
602 );
603 
604 typedef struct {
605     struct {
606 	FSmsRegisterClientProc	callback;
607 	FSmPointer		manager_data;
608     } register_client;
609     struct {
610 	FSmsInteractRequestProc	callback;
611 	FSmPointer		manager_data;
612     } interact_request;
613     struct {
614 	FSmsInteractDoneProc	callback;
615 	FSmPointer		manager_data;
616     } interact_done;
617     struct {
618 	FSmsSaveYourselfRequestProc	callback;
619 	FSmPointer			manager_data;
620     } save_yourself_request;
621     struct {
622 	FSmsSaveYourselfPhase2RequestProc	callback;
623 	FSmPointer				manager_data;
624     } save_yourself_phase2_request;
625     struct {
626 	FSmsSaveYourselfDoneProc	callback;
627 	FSmPointer		manager_data;
628     } save_yourself_done;
629     struct {
630 	FSmsCloseConnectionProc	callback;
631 	FSmPointer		manager_data;
632     } close_connection;
633     struct {
634 	FSmsSetPropertiesProc	callback;
635 	FSmPointer		manager_data;
636     } set_properties;
637     struct {
638 	FSmsDeletePropertiesProc	callback;
639 	FSmPointer		manager_data;
640     } delete_properties;
641     struct {
642 	FSmsGetPropertiesProc	callback;
643 	FSmPointer		manager_data;
644     } get_properties;
645 } FSmsCallbacks;
646 
647 typedef Status (*FSmsNewClientProc) (
648 #ifdef __STDC__
649     FSmsConn,FSmPointer, unsigned long *, FSmsCallbacks *, char **
650 #endif
651 );
652 typedef void (*FSmcErrorHandler) (
653 #ifdef __STDC__
654     FSmcConn, Bool, int, unsigned long, int, int, FSmPointer
655 #endif
656 );
657 typedef void (*FSmsErrorHandler) (
658 #ifdef __STDC__
659     FSmsConn, Bool, int, unsigned long, int, int, FSmPointer
660 #endif
661 );
662 
663 /* ICEutil.h */
664 typedef struct {
665     char *protocol_name;
666     unsigned short protocol_data_length;
667     char *protocol_data;
668     char *network_id;
669     char *auth_name;
670     unsigned short auth_data_length;
671     char *auth_data;
672 } FIceAuthFileEntry;
673 
674 typedef struct {
675     char *protocol_name;
676     char *network_id;
677     char *auth_name;
678     unsigned short auth_data_length;
679     char *auth_data;
680 } FIceAuthDataEntry;
681 
682 #endif
683 
684 /* ---------------------------- forward declarations ----------------------- */
685 
686 /* ---------------------------- exported variables (globals) --------------- */
687 
688 /* ---------------------------- interface functions ------------------------ */
689 
690 #if SessionSupport
691 
692 /* ICElib.h (no all) */
693 #define FIceSetIOErrorHandler(a) IceSetIOErrorHandler(a)
694 #define FIceFreeListenObjs(a,b) IceFreeListenObjs(a,b)
695 #define FIceConnectionNumber(a) IceConnectionNumber(a)
696 #define FIceSetShutdownNegotiation(a,b) IceSetShutdownNegotiation(a,b)
697 #define FIceCloseConnection(a) IceCloseConnection(a)
698 #define FIceConnectionStatus(a) IceConnectionStatus(a)
699 #define FIceAcceptConnection(a,b) IceAcceptConnection(a,b)
700 #define FIceProcessMessages(a,b,c) IceProcessMessages(a,b,c)
701 #define FIceListenForConnections(a,b,c,d) IceListenForConnections(a,b,c,d)
702 #define FIceAddConnectionWatch(a,b) IceAddConnectionWatch(a,b)
703 #define FIceGetListenConnectionNumber(a) IceGetListenConnectionNumber(a)
704 #define FIceComposeNetworkIdList(a,b) IceComposeNetworkIdList(a,b)
705 #define FIceGetListenConnectionString(a) IceGetListenConnectionString(a)
706 #define FIceSetHostBasedAuthProc(a,b) IceSetHostBasedAuthProc(a,b)
707 #define FIceConnectionString(a) IceConnectionString(a)
708 
709 /* SMlib.h */
710 #define FSmcOpenConnection(a,b,c,d,e,f,g,h,i,k) \
711         SmcOpenConnection(a,b,c,d,e,f,g,h,i,k)
712 #define FSmcCloseConnection(a,b,c) SmcCloseConnection(a,b,c)
713 #define FSmcModifyCallbacks(a,b,c) SmcModifyCallbacks(a,b,c)
714 #define FSmcSetProperties(a,b,c) SmcSetProperties(a,b,c)
715 #define FSmcDeleteProperties(a,b,c) SmcDeleteProperties(a,b,c)
716 #define FSmcGetProperties(a,b,c) SmcGetProperties(a,b,c)
717 #define FSmcInteractRequest(a,b,c,d) SmcInteractRequest(a,b,c,d)
718 #define FSmcInteractDone(a,b) SmcInteractDone(a,b)
719 #define FSmcRequestSaveYourself(a,b,c,d,e,f) SmcRequestSaveYourself(a,b,c,d,e,f)
720 #define FSmcRequestSaveYourselfPhase2(a,b,c) SmcRequestSaveYourselfPhase2(a,b,c)
721 #define FSmcSaveYourselfDone(a,b)  SmcSaveYourselfDone(a,b)
722 #define FSmcProtocolVersion(a) SmcProtocolVersion(a)
723 #define FSmcProtocolRevision(a) SmcProtocolRevision(a)
724 #define FSmcVendor(a) SmcVendor(a)
725 #define FSmcRelease(a) SmcRelease(a)
726 #define FSmcClientID(a) SmcClientID(a)
727 #define FSmcGetIceConnection(a) SmcGetIceConnection(a)
728 #define FSmsInitialize(a,b,c,d,e,f,g) SmsInitialize(a,b,c,d,e,f,g)
729 #define FSmsClientHostName(a) SmsClientHostName(a)
730 #define FSmsGenerateClientID(a) SmsGenerateClientID(a)
731 #define FSmsRegisterClientReply(a,b) SmsRegisterClientReply(a,b)
732 #define FSmsSaveYourself(a,b,c,d,e) SmsSaveYourself(a,b,c,d,e)
733 #define FSmsSaveYourselfPhase2(a) SmsSaveYourselfPhase2(a)
734 #define FSmsInteract(a) SmsInteract(a)
735 #define FSmsDie(a) SmsDie(a)
736 #define FSmsSaveComplete(a) SmsSaveComplete(a)
737 #define FSmsShutdownCancelled(a) SmsShutdownCancelled(a)
738 #define FSmsReturnProperties(a,b,c) SmsReturnProperties(a,b,c)
739 #define FSmsCleanUp(a) SmsCleanUp(a)
740 #define FSmsProtocolVersion(a) SmsProtocolVersion(a)
741 #define FSmsProtocolRevision(a) SmsProtocolRevision(a)
742 #define FSmsClientID(a) SmsClientID(a)
743 #define FSmsGetIceConnection(a) SmsGetIceConnection(a)
744 #define FSmcSetErrorHandler(a) SmcSetErrorHandler(a)
745 #define FSmsSetErrorHandler(a) SmsSetErrorHandler(a)
746 #define FSmFreeProperty(a) SmFreeProperty(a)
747 #define FSmFreeReasons(a,b) SmFreeReasons(a,b)
748 
749 /* ICEutils.h */
750 #define FIceAuthFileName(a) IceAuthFileName(a)
751 #define FIceLockAuthFile(a,b,c,d) IceLockAuthFile(a,b,c,d)
752 #define FIceUnlockAuthFile(a) IceUnlockAuthFile(a)
753 #define FIceReadAuthFileEntry(a) IceReadAuthFileEntry(a)
754 #define FIceFreeAuthFileEntry(a) IceFreeAuthFileEntry(a)
755 #define FIceWriteAuthFileEntry(a,b) IceWriteAuthFileEntry(a,b)
756 #define FIceGetAuthFileEntry(a,b,c) IceGetAuthFileEntry(a,b,c)
757 #define FIceGenerateMagicCookie(a) IceGenerateMagicCookie(a)
758 #define FIceSetPaAuthData(a,b) IceSetPaAuthData(a,b)
759 
760 #else
761 
762 /* ICElib.h (no all) */
763 #define FIceSetIOErrorHandler(a) NULL
764 #define FIceFreeListenObjs(a,b)
765 #define FIceConnectionNumber(a) 0
766 #define FIceSetShutdownNegotiation(a,b)
767 #define FIceCloseConnection(a) 0
768 #define FIceConnectionStatus(a) 0
769 #define FIceAcceptConnection(a,b) NULL
770 #define FIceProcessMessages(a,b,c) 0
771 #define FIceListenForConnections(a,b,c,d) 0
772 #define FIceAddConnectionWatch(a,b) 0
773 #define FIceGetListenConnectionNumber(a) 0
774 #define FIceComposeNetworkIdList(a,b) NULL
775 #define FIceGetListenConnectionString(a) NULL
776 #define FIceSetHostBasedAuthProc(a,b)
777 #define FIceConnectionString(a) NULL
778 
779 /* SMlib.h */
780 #define FSmcOpenConnection(a,b,c,d,e,f,g,h,i,k) NULL
781 #define FSmcCloseConnection(a,b,c) 0
782 #define FSmcModifyCallbacks(a,b,c)
783 #define FSmcSetProperties(a,b,c)
784 #define FSmcDeleteProperties(a,b,c)
785 #define FSmcGetProperties(a,b,c) 0
786 #define FSmcInteractRequest(a,b,c,d) 0
787 #define FSmcInteractDone(a,b)
788 #define FSmcRequestSaveYourself(a,b,c,d,e,f)
789 #define FSmcRequestSaveYourselfPhase2(a,b,c) 0
790 #define FSmcSaveYourselfDone(a,b)
791 #define FSmcProtocolVersion(a) 0
792 #define FSmcProtocolRevision(a) 0
793 #define FSmcVendor(a) NULL
794 #define FSmcRelease(a) NULL
795 #define FSmcClientID(a) NULL
796 #define FSmcGetIceConnection(a) NULL
797 #define FSmsInitialize(a,b,c,d,e,f,g) 0
798 #define FSmsClientHostName(a) NULL
799 #define FSmsGenerateClientID(a) NULL
800 #define FSmsRegisterClientReply(a,b) 0
801 #define FSmsSaveYourself(a,b,c,d,e)
802 #define FSmsSaveYourselfPhase2(a)
803 #define FSmsInteract(a)
804 #define FSmsDie(a)
805 #define FSmsSaveComplete(a)
806 #define FSmsShutdownCancelled(a)
807 #define FSmsReturnProperties(a,b,c)
808 #define FSmsCleanUp(a)
809 #define FSmsProtocolVersion(a) 0
810 #define FSmsProtocolRevision(a) 0
811 #define FSmsClientID(a) NULL
812 #define FSmsGetIceConnection(a) NULL
813 #define FSmcSetErrorHandler(a) NULL
814 #define FSmsSetErrorHandler(a) NULL
815 #define FSmFreeProperty(a)
816 #define FSmFreeReasons(a,b)
817 
818 /* ICEutils.h */
819 #define FIceAuthFileName(a) NULL
820 #define FIceLockAuthFile(a,b,c,d) 0
821 #define FIceUnlockAuthFile(a)
822 #define FIceReadAuthFileEntry(a) NULL
823 #define FIceFreeAuthFileEntry(a)
824 #define FIceWriteAuthFileEntry(a,b) 0
825 #define FIceGetAuthFileEntry(a,b,c) NULL
826 #define FIceGenerateMagicCookie(a) NULL
827 #define FIceSetPaAuthData(a,b)
828 
829 #endif
830 
831 #endif /* FVWMLIB_FSMLIB_H */
832