/usr/include/X11/SM/SMlib.h is in libsm-dev 2:1.2.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | /*
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
documentation.
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
*/
#ifndef _SMLIB_H_
#define _SMLIB_H_
#include <X11/SM/SM.h>
#include <X11/ICE/ICElib.h>
/*
* Generic SM pointer
*/
typedef IcePointer SmPointer;
/*
* Connection objects. Defined in SMlibint.h
*/
typedef struct _SmcConn *SmcConn;
typedef struct _SmsConn *SmsConn;
/*
* Session Management property
*/
typedef struct {
int length; /* length (in bytes) of the value */
SmPointer value; /* the value */
} SmPropValue;
typedef struct {
char *name; /* name of property */
char *type; /* type of property */
int num_vals; /* number of values in property */
SmPropValue *vals; /* the values */
} SmProp;
/*
* SmcCloseConnection status return
*/
typedef enum {
SmcClosedNow,
SmcClosedASAP,
SmcConnectionInUse
} SmcCloseStatus;
/*
* Client callbacks
*/
typedef void (*SmcSaveYourselfProc) (
SmcConn /* smcConn */,
SmPointer /* clientData */,
int /* saveType */,
Bool /* shutdown */,
int /* interactStyle */,
Bool /* fast */
);
typedef void (*SmcSaveYourselfPhase2Proc) (
SmcConn /* smcConn */,
SmPointer /* clientData */
);
typedef void (*SmcInteractProc) (
SmcConn /* smcConn */,
SmPointer /* clientData */
);
typedef void (*SmcDieProc) (
SmcConn /* smcConn */,
SmPointer /* clientData */
);
typedef void (*SmcShutdownCancelledProc) (
SmcConn /* smcConn */,
SmPointer /* clientData */
);
typedef void (*SmcSaveCompleteProc) (
SmcConn /* smcConn */,
SmPointer /* clientData */
);
typedef void (*SmcPropReplyProc) (
SmcConn /* smcConn */,
SmPointer /* clientData */,
int /* numProps */,
SmProp ** /* props */
);
/*
* Callbacks set up at SmcOpenConnection time
*/
typedef struct {
struct {
SmcSaveYourselfProc callback;
SmPointer client_data;
} save_yourself;
struct {
SmcDieProc callback;
SmPointer client_data;
} die;
struct {
SmcSaveCompleteProc callback;
SmPointer client_data;
} save_complete;
struct {
SmcShutdownCancelledProc callback;
SmPointer client_data;
} shutdown_cancelled;
} SmcCallbacks;
#define SmcSaveYourselfProcMask (1L << 0)
#define SmcDieProcMask (1L << 1)
#define SmcSaveCompleteProcMask (1L << 2)
#define SmcShutdownCancelledProcMask (1L << 3)
/*
* Session manager callbacks
*/
typedef Status (*SmsRegisterClientProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */,
char * /* previousId */
);
typedef void (*SmsInteractRequestProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */,
int /* dialogType */
);
typedef void (*SmsInteractDoneProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */,
Bool /* cancelShutdown */
);
typedef void (*SmsSaveYourselfRequestProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */,
int /* saveType */,
Bool /* shutdown */,
int /* interactStyle */,
Bool /* fast */,
Bool /* global */
);
typedef void (*SmsSaveYourselfPhase2RequestProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */
);
typedef void (*SmsSaveYourselfDoneProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */,
Bool /* success */
);
typedef void (*SmsCloseConnectionProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */,
int /* count */,
char ** /* reasonMsgs */
);
typedef void (*SmsSetPropertiesProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */,
int /* numProps */,
SmProp ** /* props */
);
typedef void (*SmsDeletePropertiesProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */,
int /* numProps */,
char ** /* propNames */
);
typedef void (*SmsGetPropertiesProc) (
SmsConn /* smsConn */,
SmPointer /* managerData */
);
/*
* Callbacks set up by a session manager when a new client connects.
*/
typedef struct {
struct {
SmsRegisterClientProc callback;
SmPointer manager_data;
} register_client;
struct {
SmsInteractRequestProc callback;
SmPointer manager_data;
} interact_request;
struct {
SmsInteractDoneProc callback;
SmPointer manager_data;
} interact_done;
struct {
SmsSaveYourselfRequestProc callback;
SmPointer manager_data;
} save_yourself_request;
struct {
SmsSaveYourselfPhase2RequestProc callback;
SmPointer manager_data;
} save_yourself_phase2_request;
struct {
SmsSaveYourselfDoneProc callback;
SmPointer manager_data;
} save_yourself_done;
struct {
SmsCloseConnectionProc callback;
SmPointer manager_data;
} close_connection;
struct {
SmsSetPropertiesProc callback;
SmPointer manager_data;
} set_properties;
struct {
SmsDeletePropertiesProc callback;
SmPointer manager_data;
} delete_properties;
struct {
SmsGetPropertiesProc callback;
SmPointer manager_data;
} get_properties;
} SmsCallbacks;
#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) (
SmsConn /* smsConn */,
SmPointer /* managerData */,
unsigned long * /* maskRet */,
SmsCallbacks * /* callbacksRet */,
char ** /* failureReasonRet */
);
/*
* Error handlers
*/
typedef void (*SmcErrorHandler) (
SmcConn /* smcConn */,
Bool /* swap */,
int /* offendingMinorOpcode */,
unsigned long /* offendingSequence */,
int /* errorClass */,
int /* severity */,
SmPointer /* values */
);
typedef void (*SmsErrorHandler) (
SmsConn /* smsConn */,
Bool /* swap */,
int /* offendingMinorOpcode */,
unsigned long /* offendingSequence */,
int /* errorClass */,
int /* severity */,
SmPointer /* values */
);
/*
* Function Prototypes
*/
_XFUNCPROTOBEGIN
extern SmcConn SmcOpenConnection (
char * /* networkIdsList */,
SmPointer /* context */,
int /* xsmpMajorRev */,
int /* xsmpMinorRev */,
unsigned long /* mask */,
SmcCallbacks * /* callbacks */,
char * /* previousId */,
char ** /* clientIdRet */,
int /* errorLength */,
char * /* errorStringRet */
);
extern SmcCloseStatus SmcCloseConnection (
SmcConn /* smcConn */,
int /* count */,
char ** /* reasonMsgs */
);
extern void SmcModifyCallbacks (
SmcConn /* smcConn */,
unsigned long /* mask */,
SmcCallbacks * /* callbacks */
);
extern void SmcSetProperties (
SmcConn /* smcConn */,
int /* numProps */,
SmProp ** /* props */
);
extern void SmcDeleteProperties (
SmcConn /* smcConn */,
int /* numProps */,
char ** /* propNames */
);
extern Status SmcGetProperties (
SmcConn /* smcConn */,
SmcPropReplyProc /* propReplyProc */,
SmPointer /* clientData */
);
extern Status SmcInteractRequest (
SmcConn /* smcConn */,
int /* dialogType */,
SmcInteractProc /* interactProc */,
SmPointer /* clientData */
);
extern void SmcInteractDone (
SmcConn /* smcConn */,
Bool /* cancelShutdown */
);
extern void SmcRequestSaveYourself (
SmcConn /* smcConn */,
int /* saveType */,
Bool /* shutdown */,
int /* interactStyle */,
Bool /* fast */,
Bool /* global */
);
extern Status SmcRequestSaveYourselfPhase2 (
SmcConn /* smcConn */,
SmcSaveYourselfPhase2Proc /* saveYourselfPhase2Proc */,
SmPointer /* clientData */
);
extern void SmcSaveYourselfDone (
SmcConn /* smcConn */,
Bool /* success */
);
extern int SmcProtocolVersion (
SmcConn /* smcConn */
);
extern int SmcProtocolRevision (
SmcConn /* smcConn */
);
extern char *SmcVendor (
SmcConn /* smcConn */
);
extern char *SmcRelease (
SmcConn /* smcConn */
);
extern char *SmcClientID (
SmcConn /* smcConn */
);
extern IceConn SmcGetIceConnection (
SmcConn /* smcConn */
);
extern Status SmsInitialize (
const char * /* vendor */,
const char * /* release */,
SmsNewClientProc /* newClientProc */,
SmPointer /* managerData */,
IceHostBasedAuthProc /* hostBasedAuthProc */,
int /* errorLength */,
char * /* errorStringRet */
);
extern char *SmsClientHostName (
SmsConn /* smsConn */
);
extern char *SmsGenerateClientID (
SmsConn /* smsConn */
);
extern Status SmsRegisterClientReply (
SmsConn /* smsConn */,
char * /* clientId */
);
extern void SmsSaveYourself (
SmsConn /* smsConn */,
int /* saveType */,
Bool /* shutdown */,
int /* interactStyle */,
Bool /* fast */
);
extern void SmsSaveYourselfPhase2 (
SmsConn /* smsConn */
);
extern void SmsInteract (
SmsConn /* smsConn */
);
extern void SmsDie (
SmsConn /* smsConn */
);
extern void SmsSaveComplete (
SmsConn /* smsConn */
);
extern void SmsShutdownCancelled (
SmsConn /* smsConn */
);
extern void SmsReturnProperties (
SmsConn /* smsConn */,
int /* numProps */,
SmProp ** /* props */
);
extern void SmsCleanUp (
SmsConn /* smsConn */
);
extern int SmsProtocolVersion (
SmsConn /* smsConn */
);
extern int SmsProtocolRevision (
SmsConn /* smsConn */
);
extern char *SmsClientID (
SmsConn /* smsConn */
);
extern IceConn SmsGetIceConnection (
SmsConn /* smsConn */
);
extern SmcErrorHandler SmcSetErrorHandler (
SmcErrorHandler /* handler */
);
extern SmsErrorHandler SmsSetErrorHandler (
SmsErrorHandler /* handler */
);
extern void SmFreeProperty (
SmProp * /* prop */
);
extern void SmFreeReasons (
int /* count */,
char ** /* reasonMsgs */
);
_XFUNCPROTOEND
#endif /* _SMLIB_H_ */
|