00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _ICELIB_H_
00033 #define _ICELIB_H_
00034
00035 #include <KDE-ICE/ICE.h>
00036 #include <KDE-ICE/Xfuncproto.h>
00037 #ifndef SIZEOF
00038 #define _SIZEOF(x) sz_##x
00039 #define SIZEOF(x) _SIZEOF(x)
00040 #endif
00041
00042 #define Bool int
00043 #define Status int
00044 #define True 1
00045 #define False 0
00046
00047 #if NeedFunctionPrototypes
00048 typedef void *IcePointer;
00049 #else
00050 typedef char *IcePointer;
00051 #endif
00052
00053 typedef enum {
00054 IcePoAuthHaveReply,
00055 IcePoAuthRejected,
00056 IcePoAuthFailed,
00057 IcePoAuthDoneCleanup
00058 } IcePoAuthStatus;
00059
00060 typedef enum {
00061 IcePaAuthContinue,
00062 IcePaAuthAccepted,
00063 IcePaAuthRejected,
00064 IcePaAuthFailed
00065 } IcePaAuthStatus;
00066
00067 typedef enum {
00068 IceConnectPending,
00069 IceConnectAccepted,
00070 IceConnectRejected,
00071 IceConnectIOError
00072 } IceConnectStatus;
00073
00074 typedef enum {
00075 IceProtocolSetupSuccess,
00076 IceProtocolSetupFailure,
00077 IceProtocolSetupIOError,
00078 IceProtocolAlreadyActive
00079 } IceProtocolSetupStatus;
00080
00081 typedef enum {
00082 IceAcceptSuccess,
00083 IceAcceptFailure,
00084 IceAcceptBadMalloc
00085 } IceAcceptStatus;
00086
00087 typedef enum {
00088 IceClosedNow,
00089 IceClosedASAP,
00090 IceConnectionInUse,
00091 IceStartedShutdownNegotiation
00092 } IceCloseStatus;
00093
00094 typedef enum {
00095 IceProcessMessagesSuccess,
00096 IceProcessMessagesIOError,
00097 IceProcessMessagesConnectionClosed
00098 } IceProcessMessagesStatus;
00099
00100 typedef struct {
00101 unsigned long sequence_of_request;
00102 int major_opcode_of_request;
00103 int minor_opcode_of_request;
00104 IcePointer reply;
00105 } IceReplyWaitInfo;
00106
00107 typedef struct _IceConn *IceConn;
00108 typedef struct _IceListenObj *IceListenObj;
00109
00110 typedef void (*IceWatchProc) (
00111 #if NeedFunctionPrototypes
00112 IceConn ,
00113 IcePointer ,
00114 Bool ,
00115 IcePointer *
00116 #endif
00117 );
00118
00119 typedef void (*IcePoProcessMsgProc) (
00120 #if NeedFunctionPrototypes
00121 IceConn ,
00122 IcePointer ,
00123 int ,
00124 unsigned long ,
00125 Bool ,
00126 IceReplyWaitInfo * ,
00127 Bool *
00128 #endif
00129 );
00130
00131 typedef void (*IcePaProcessMsgProc) (
00132 #if NeedFunctionPrototypes
00133 IceConn ,
00134 IcePointer ,
00135 int ,
00136 unsigned long ,
00137 Bool
00138 #endif
00139 );
00140
00141 typedef struct {
00142 int major_version;
00143 int minor_version;
00144 IcePoProcessMsgProc process_msg_proc;
00145 } IcePoVersionRec;
00146
00147 typedef struct {
00148 int major_version;
00149 int minor_version;
00150 IcePaProcessMsgProc process_msg_proc;
00151 } IcePaVersionRec;
00152
00153 typedef IcePoAuthStatus (*IcePoAuthProc) (
00154 #if NeedFunctionPrototypes
00155 IceConn ,
00156 IcePointer * ,
00157 Bool ,
00158 Bool ,
00159 int ,
00160 IcePointer ,
00161 int * ,
00162 IcePointer * ,
00163 char **
00164 #endif
00165 );
00166
00167 typedef IcePaAuthStatus (*IcePaAuthProc) (
00168 #if NeedFunctionPrototypes
00169 IceConn ,
00170 IcePointer * ,
00171 Bool ,
00172 int ,
00173 IcePointer ,
00174 int * ,
00175 IcePointer * ,
00176 char **
00177 #endif
00178 );
00179
00180 typedef Bool (*IceHostBasedAuthProc) (
00181 #if NeedFunctionPrototypes
00182 char *
00183 #endif
00184 );
00185
00186 typedef Status (*IceProtocolSetupProc) (
00187 #if NeedFunctionPrototypes
00188 IceConn ,
00189 int ,
00190 int ,
00191 char * ,
00192 char * ,
00193 IcePointer * ,
00194 char **
00195 #endif
00196 );
00197
00198 typedef void (*IceProtocolActivateProc) (
00199 #if NeedFunctionPrototypes
00200 IceConn ,
00201 IcePointer
00202 #endif
00203 );
00204
00205 typedef void (*IceWriteHandler) (
00206 #if NeedFunctionPrototypes
00207 IceConn ,
00208 unsigned long ,
00209 char *
00210 #endif
00211 );
00212
00213 typedef void (*IceIOErrorProc) (
00214 #if NeedFunctionPrototypes
00215 IceConn
00216 #endif
00217 );
00218
00219 typedef void (*IcePingReplyProc) (
00220 #if NeedFunctionPrototypes
00221 IceConn ,
00222 IcePointer
00223 #endif
00224 );
00225
00226 typedef void (*IceErrorHandler) (
00227 #if NeedFunctionPrototypes
00228 IceConn ,
00229 Bool ,
00230 int ,
00231 unsigned long ,
00232 int ,
00233 int ,
00234 IcePointer
00235 #endif
00236 );
00237
00238 typedef void (*IceIOErrorHandler) (
00239 #if NeedFunctionPrototypes
00240 IceConn
00241 #endif
00242 );
00243
00244
00245
00246
00247
00248
00249 _XFUNCPROTOBEGIN
00250
00251 #define IceRegisterForProtocolSetup KDE_IceRegisterForProtocolSetup
00252
00253 extern int IceRegisterForProtocolSetup (
00254 #if NeedFunctionPrototypes
00255 char * ,
00256 char * ,
00257 char * ,
00258 int ,
00259 IcePoVersionRec * ,
00260 int ,
00261 char ** ,
00262 IcePoAuthProc * ,
00263 IceIOErrorProc
00264 #endif
00265 );
00266
00267 #define IceRegisterForProtocolReply KDE_IceRegisterForProtocolReply
00268
00269 extern int IceRegisterForProtocolReply (
00270 #if NeedFunctionPrototypes
00271 char * ,
00272 char * ,
00273 char * ,
00274 int ,
00275 IcePaVersionRec * ,
00276 int ,
00277 char ** ,
00278 IcePaAuthProc * ,
00279 IceHostBasedAuthProc ,
00280 IceProtocolSetupProc ,
00281 IceProtocolActivateProc ,
00282 IceIOErrorProc
00283 #endif
00284 );
00285
00286 #define IceOpenConnection KDE_IceOpenConnection
00287
00288 extern IceConn IceOpenConnection (
00289 #if NeedFunctionPrototypes
00290 char * ,
00291 IcePointer ,
00292 Bool ,
00293 int ,
00294 int ,
00295 char *
00296 #endif
00297 );
00298
00299 #define IceGetConnectionContext KDE_IceGetConnectionContext
00300
00301 extern IcePointer IceGetConnectionContext (
00302 #if NeedFunctionPrototypes
00303 IceConn
00304 #endif
00305 );
00306
00307 #define IceListenForConnections KDE_IceListenForConnections
00308
00309 extern Status IceListenForConnections (
00310 #if NeedFunctionPrototypes
00311 int * ,
00312 IceListenObj ** ,
00313 int ,
00314 char *
00315 #endif
00316 );
00317
00318 #define IceListenForWellKnownConnections KDE_IceListenForWellKnownConnections
00319
00320 extern Status IceListenForWellKnownConnections (
00321 #if NeedFunctionPrototypes
00322 char * ,
00323 int * ,
00324 IceListenObj ** ,
00325 int ,
00326 char *
00327 #endif
00328 );
00329
00330 #define IceGetListenConnectionNumber KDE_IceGetListenConnectionNumber
00331
00332 extern int IceGetListenConnectionNumber (
00333 #if NeedFunctionPrototypes
00334 IceListenObj
00335 #endif
00336 );
00337
00338 #define IceGetListenConnectionString KDE_IceGetListenConnectionString
00339
00340 extern char *IceGetListenConnectionString (
00341 #if NeedFunctionPrototypes
00342 IceListenObj
00343 #endif
00344 );
00345
00346 #define IceComposeNetworkIdList KDE_IceComposeNetworkIdList
00347
00348 extern char *IceComposeNetworkIdList (
00349 #if NeedFunctionPrototypes
00350 int ,
00351 IceListenObj *
00352 #endif
00353 );
00354
00355 #define IceFreeListenObjs KDE_IceFreeListenObjs
00356
00357 extern void IceFreeListenObjs (
00358 #if NeedFunctionPrototypes
00359 int ,
00360 IceListenObj *
00361 #endif
00362 );
00363
00364 #define IceSetHostBasedAuthProc KDE_IceSetHostBasedAuthProc
00365
00366 extern void IceSetHostBasedAuthProc (
00367 #if NeedFunctionPrototypes
00368 IceListenObj ,
00369 IceHostBasedAuthProc
00370 #endif
00371 );
00372
00373 #define IceAcceptConnection KDE_IceAcceptConnection
00374
00375 extern IceConn IceAcceptConnection (
00376 #if NeedFunctionPrototypes
00377 IceListenObj ,
00378 IceAcceptStatus *
00379 #endif
00380 );
00381
00382 #define IceSetShutdownNegotiation KDE_IceSetShutdownNegotiation
00383
00384 extern void IceSetShutdownNegotiation (
00385 #if NeedFunctionPrototypes
00386 IceConn ,
00387 Bool
00388 #endif
00389 );
00390
00391 #define IceCheckShutdownNegotiation KDE_IceCheckShutdownNegotiation
00392
00393 extern Bool IceCheckShutdownNegotiation (
00394 #if NeedFunctionPrototypes
00395 IceConn
00396 #endif
00397 );
00398
00399 #define IceCloseConnection KDE_IceCloseConnection
00400
00401 extern IceCloseStatus IceCloseConnection (
00402 #if NeedFunctionPrototypes
00403 IceConn
00404 #endif
00405 );
00406
00407 #define IceAddConnectionWatch KDE_IceAddConnectionWatch
00408
00409 extern Status IceAddConnectionWatch (
00410 #if NeedFunctionPrototypes
00411 IceWatchProc ,
00412 IcePointer
00413 #endif
00414 );
00415
00416 #define IceRemoveConnectionWatch KDE_IceRemoveConnectionWatch
00417
00418 extern void IceRemoveConnectionWatch (
00419 #if NeedFunctionPrototypes
00420 IceWatchProc ,
00421 IcePointer
00422 #endif
00423 );
00424
00425 #define IceProtocolSetup KDE_IceProtocolSetup
00426
00427 extern IceProtocolSetupStatus IceProtocolSetup (
00428 #if NeedFunctionPrototypes
00429 IceConn ,
00430 int ,
00431 IcePointer ,
00432 Bool ,
00433 int * ,
00434 int * ,
00435 char ** ,
00436 char ** ,
00437 int ,
00438 char *
00439 #endif
00440 );
00441
00442 #define IceProtocolShutdown KDE_IceProtocolShutdown
00443
00444 extern Status IceProtocolShutdown (
00445 #if NeedFunctionPrototypes
00446 IceConn ,
00447 int
00448 #endif
00449 );
00450
00451 #define IceProcessMessages KDE_IceProcessMessages
00452
00453 extern IceProcessMessagesStatus IceProcessMessages (
00454 #if NeedFunctionPrototypes
00455 IceConn ,
00456 IceReplyWaitInfo * ,
00457 Bool *
00458 #endif
00459 );
00460
00461 #define IcePing KDE_IcePing
00462
00463 extern Status IcePing (
00464 #if NeedFunctionPrototypes
00465 IceConn ,
00466 IcePingReplyProc ,
00467 IcePointer
00468 #endif
00469 );
00470
00471 #define IceAllocScratch KDE_IceAllocScratch
00472
00473 extern char *IceAllocScratch (
00474 #if NeedFunctionPrototypes
00475 IceConn ,
00476 unsigned long
00477 #endif
00478 );
00479
00480 #define IceFlush KDE_IceFlush
00481
00482 extern void IceFlush (
00483 #if NeedFunctionPrototypes
00484 IceConn
00485 #endif
00486 );
00487
00488 #define IceGetOutBufSize KDE_IceGetOutBufSize
00489
00490 extern int IceGetOutBufSize (
00491 #if NeedFunctionPrototypes
00492 IceConn
00493 #endif
00494 );
00495
00496 #define IceGetInBufSize KDE_IceGetInBufSize
00497
00498 extern int IceGetInBufSize (
00499 #if NeedFunctionPrototypes
00500 IceConn
00501 #endif
00502 );
00503
00504 #define IceConnectionStatus KDE_IceConnectionStatus
00505
00506 extern IceConnectStatus IceConnectionStatus (
00507 #if NeedFunctionPrototypes
00508 IceConn
00509 #endif
00510 );
00511
00512 #define IceVendor KDE_IceVendor
00513
00514 extern char *IceVendor (
00515 #if NeedFunctionPrototypes
00516 IceConn
00517 #endif
00518 );
00519
00520 #define IceRelease KDE_IceRelease
00521
00522 extern char *IceRelease (
00523 #if NeedFunctionPrototypes
00524 IceConn
00525 #endif
00526 );
00527
00528 #define IceProtocolVersion KDE_IceProtocolVersion
00529
00530 extern int IceProtocolVersion (
00531 #if NeedFunctionPrototypes
00532 IceConn
00533 #endif
00534 );
00535
00536 #define IceProtocolRevision KDE_IceProtocolRevision
00537
00538 extern int IceProtocolRevision (
00539 #if NeedFunctionPrototypes
00540 IceConn
00541 #endif
00542 );
00543
00544 #define IceConnectionNumber KDE_IceConnectionNumber
00545
00546 extern int IceConnectionNumber (
00547 #if NeedFunctionPrototypes
00548 IceConn
00549 #endif
00550 );
00551
00552 #define IceConnectionString KDE_IceConnectionString
00553
00554 extern char *IceConnectionString (
00555 #if NeedFunctionPrototypes
00556 IceConn
00557 #endif
00558 );
00559
00560 #define IceLastSentSequenceNumber KDE_IceLastSentSequenceNumber
00561
00562 extern unsigned long IceLastSentSequenceNumber (
00563 #if NeedFunctionPrototypes
00564 IceConn
00565 #endif
00566 );
00567
00568 #define IceLastReceivedSequenceNumber KDE_IceLastReceivedSequenceNumber
00569
00570 extern unsigned long IceLastReceivedSequenceNumber (
00571 #if NeedFunctionPrototypes
00572 IceConn
00573 #endif
00574 );
00575
00576 #define IceSwapping KDE_IceSwapping
00577
00578 extern Bool IceSwapping (
00579 #if NeedFunctionPrototypes
00580 IceConn
00581 #endif
00582 );
00583
00584 #define IceSetErrorHandler KDE_IceSetErrorHandler
00585
00586 extern IceErrorHandler IceSetErrorHandler (
00587 #if NeedFunctionPrototypes
00588 IceErrorHandler
00589 #endif
00590 );
00591
00592 #define IceSetIOErrorHandler KDE_IceSetIOErrorHandler
00593
00594 extern IceIOErrorHandler IceSetIOErrorHandler (
00595 #if NeedFunctionPrototypes
00596 IceIOErrorHandler
00597 #endif
00598 );
00599
00600
00601
00602
00603
00604
00605 #define IceInitThreads KDE_IceInitThreads
00606
00607 extern Status IceInitThreads (
00608 #if NeedFunctionPrototypes
00609 void
00610 #endif
00611 );
00612
00613 #define IceAppLockConn KDE_IceAppLockConn
00614
00615 extern void IceAppLockConn (
00616 #if NeedFunctionPrototypes
00617 IceConn
00618 #endif
00619 );
00620
00621 #define IceAppUnlockConn KDE_IceAppUnlockConn
00622
00623 extern void IceAppUnlockConn (
00624 #if NeedFunctionPrototypes
00625 IceConn
00626 #endif
00627 );
00628
00629 _XFUNCPROTOEND
00630
00631 #endif