00001
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __ILIBRARY_INTERFACE_H
00017 #define __ILIBRARY_INTERFACE_H
00018
00019
00020
00021
00022 #ifdef __cplusplus
00023 extern "C" {
00024 #endif
00025
00026 #if defined __OS2DEF__ || defined __wtypes_h__ || defined WIN32
00027 #define NDEF_BOOL
00028 #endif
00029
00030 #if !defined DEF_BOOL && !defined NDEF_BOOL
00031 #define DEF_BOOL
00032 #ifdef FALSE
00033 #undef FALSE
00034 #endif
00035 #ifdef TRUE
00036 #undef TRUE
00037 #endif
00038 #define FALSE 0
00039 #define TRUE 1
00040 typedef int BOOL;
00041 typedef BOOL* PBOOL;
00042 #endif
00043
00044 #if !defined __OS2DEF__
00045 typedef unsigned char BYTE;
00046 typedef unsigned short USHORT;
00047 typedef unsigned int UINT;
00048 typedef unsigned long ULONG;
00049 typedef void * PVOID;
00050 typedef BYTE * PBYTE;
00051 typedef int * PINT;
00052 typedef UINT * PUINT;
00053 typedef ULONG * PULONG;
00054 typedef BYTE * PUSTR;
00055 #endif
00056
00057 typedef const void * CPVOID;
00058 typedef PVOID * PPVOID;
00059 typedef char * PSTR;
00060 typedef const char * CPSTR;
00061 typedef long * PLONG;
00062
00063 #if !defined WIN32
00064 typedef long LONG;
00065 typedef long * LPTR;
00066 #endif
00067
00068 #if defined WIN32
00069 typedef __int64 LONG64;
00070 typedef unsigned __int64 ULONG64;
00071 #elif defined __osf__
00072 typedef long LONG64;
00073 typedef unsigned long ULONG64;
00074 #elif defined SCO_SV_3_2
00075 #elif defined _ATT_UX
00076 #elif defined _UW1_1
00077 #elif defined _UW2_1
00078 #elif defined OS2
00079 typedef struct tagLONG64
00080 {
00081 long Lo;
00082 long Hi;
00083 } LONG64;
00084 typedef struct tagULONG64
00085 {
00086 ULONG Lo;
00087 ULONG Hi;
00088 } ULONG64;
00089 #else
00090 typedef long long LONG64;
00091 typedef unsigned long long ULONG64;
00092 #endif
00093
00094 #if !defined NULL
00095 # define NULL 0
00096 #endif
00097
00098 typedef unsigned short SOCKET_PORT;
00099 typedef ULONG ilPORT;
00100 typedef ULONG ilRQ;
00101 #define ilRQ_ERR 0
00102 #define ilRQ_ANY 0
00103
00104
00105
00106
00107
00108 typedef long ilRET;
00109 #define ilRET_OK 0L
00110 #define ilRET_ERROR -1L
00111 #define ilRET_LIB_NOTREADY -3L
00112
00113 #define ilRET_CONN_CLOSED -5L
00114 #define ilRET_BAD_ARGS -7L
00115 #define ilRET_FUNC_UNSUPPORTED -9L
00116 #define ilRET_TIMEOUT -11L
00117 #define ilRET_REQ_EXPIRED -12L
00118
00119 #define ilRET_NO_REQUESTS -13L
00120
00121
00122 #define ilRET_BAD_CONN_NAME -15L
00123 #define ilRET_REQ_FAILURE -1000L
00124
00125
00126
00127
00128 typedef enum
00129 {
00130 ilCI_ALL = 100,
00131 ilCI_CONN_ID = 101,
00132 ilCI_CALL_ID = 102,
00133 ilCI_DN = 111,
00134 ilCI_ANI = 112,
00135 ilCI_DNIS = 113,
00136 ilCI_THIS_DN = 121,
00137 ilCI_THIS_TRUNK = 122,
00138 ilCI_THIS_QUEUE = 123,
00139 ilCI_OTHER_DN = 131,
00140 ilCI_OTHER_TRUNK = 132,
00141 ilCI_OTHER_QUEUE = 133,
00142 ilCI_LAST_EVENT_NAME = 151,
00143 ilCI_FIRST_HOME_LOC = 152,
00144 ilCI_UNKNOWN = 999
00145 } ilCI_TYPE;
00146
00147
00148
00149
00150 #define ilCI_CONN_ID_CHAR "ConnId"
00151 #define ilCI_ALL_CHAR "All"
00152 #define ilCI_CALL_ID_CHAR "TSCallId"
00153 #define ilCI_DN_CHAR "CalledNum"
00154 #define ilCI_ANI_CHAR "ANI"
00155 #define ilCI_DNIS_CHAR "DNIS"
00156 #define ilCI_THIS_DN_CHAR "PortDN"
00157 #define ilCI_THIS_TRUNK_CHAR "PortTrunk"
00158 #define ilCI_THIS_QUEUE_CHAR "PortQueue"
00159 #define ilCI_OTHER_DN_CHAR "OtherDN"
00160 #define ilCI_OTHER_TRUNK_CHAR "OtherTrunk"
00161 #define ilCI_OTHER_QUEUE_CHAR "OtherQueue"
00162 #define ilCI_LAST_EVENT_NAME_CHAR "LastEvent"
00163 #define ilCI_FIRST_HOME_LOC_CHAR "FirstHomeLocation"
00164 #define ilCI_UNKNOWN_CHAR "Unknown"
00165
00166 typedef enum
00167 {
00168 ilET_NUMBER = 0,
00169 ilET_TEXT = 10
00170 } ilERR_TYPE;
00171
00172 typedef enum
00173 {
00174 ilDO_NOT_SUPPORTED = 0,
00175 ilDO_NO_TRUNKS,
00176 ilDO_MISC
00177 } ilDIALOUTERR;
00178
00179 typedef enum
00180 {
00181 ilFAIL_BUSY=0,
00182 ilFAIL_NO_ANSWER,
00183 ilFAIL_CONNECT_FAILED
00184 } ilFAILURE;
00185
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199 enum CallStatus
00200 {
00201 eCallStatusUnknown=0,
00202
00203
00204
00205
00206 eCallStatusDialingMakeCall,
00207 eCallStatusBusyMakeCall,
00208 eCallStatusRinging,
00209
00210
00211
00212 eCallStatusHeld,
00213 eCallStatusBusy,
00214 eCallStatusDialing,
00215 eCallStatusEstablished,
00216 eCallStatusRetrieved,
00217 eCallStatusConfPartyDel,
00218 eCallStatusConfPartyAdd,
00219 eCallStatusXferComplete,
00220
00221
00222
00223
00224
00225
00226
00227
00228
00229
00230
00231 eCallStatusReleased,
00232 eCallStatusNoChange
00233
00234 };
00235
00236
00237
00238 enum IlibraryState
00239 {
00240 ilRET_ACTIVE=0,
00241 ilRET_SHUTDOWN_IN_PROCESS,
00242 ilRET_ALL_AGENTS_LOGGEDOUT,
00243 ilRET_NO_CALLS_IN_PROGRESS
00244 };
00245
00246
00247
00248
00249 #ifdef WIN32
00250 __declspec(dllexport)
00251 #endif
00252
00266 BOOL ilInitiate(CPSTR psName);
00267
00268 #ifdef WIN32
00269 __declspec(dllexport)
00270 #endif
00271
00280 BOOL ilSetVersionNumber(CPSTR pszVersionNumber);
00281
00282 #ifdef WIN32
00283 __declspec(dllexport)
00284 #endif
00285
00305 BOOL ilConnectionOpen(CPSTR psHost,SOCKET_PORT sPort,ULONG ulTimeoutMS);
00306
00307 #ifdef WIN32
00308 __declspec(dllexport)
00309 #endif
00310
00332 BOOL ilConnectionOpenConfigServer(CPSTR psHost,SOCKET_PORT sPort,CPSTR szAppName,ULONG ulTimeoutMS);
00333
00334 #ifdef WIN32
00335 __declspec(dllexport)
00336 #endif
00337
00344 BOOL ilConnectionClose(void);
00345
00346 #ifdef WIN32
00347 __declspec(dllexport)
00348 #endif
00349
00389 ilRQ ilSRqNoteCallStart(ilRQ RqID,ilPORT Port,CPSTR psCallID,CPSTR psDNIS,CPSTR psANI,CPSTR psTagCDT);
00390
00391 #ifdef WIN32
00392 __declspec(dllexport)
00393 #endif
00394
00411 ilRQ ilSRqNoteCallEnd(ilRQ RqID,ilPORT Port);
00412
00413 #ifdef WIN32
00414 __declspec(dllexport)
00415 #endif
00416
00437 ilRET ilGetReply(ilRQ RqID, PSTR psRep, int iRepLen);
00438
00439 #ifdef WIN32
00440 __declspec(dllexport)
00441 #endif
00442
00451 ilRET ilWatch(ULONG ulMaxTimeMSec);
00452
00453 #ifdef WIN32
00454 __declspec(dllexport)
00455 #endif
00456
00473 ilRQ ilSRqUDataAddKD(ilRQ RqID,ilPORT port,CPSTR psKey,CPSTR psData);
00474
00475 #ifdef WIN32
00476 __declspec(dllexport)
00477 #endif
00478
00500 ilRQ ilSRqRouteGet(ilRQ RqID,ilPORT Port,CPSTR psRP);
00501
00502 #ifdef WIN32
00503 __declspec(dllexport)
00504 #endif
00505
00525 ilRET ilGetReplyAny(ilRQ* pRqID,PSTR psRep,int iRepLen);
00526
00527 #ifdef WIN32
00528 __declspec(dllexport)
00529 #endif
00530
00547 ilRQ ilSRqCallInit(ilRQ RqID,ilPORT Port,CPSTR psDstDN);
00548
00549 #ifdef WIN32
00550 __declspec(dllexport)
00551 #endif
00552
00571 ilRQ ilSRqCallComplete(ilRQ RqID,ilPORT Port);
00572
00573 #ifdef WIN32
00574 __declspec(dllexport)
00575 #endif
00576
00596 ilRQ ilSRqCallConference(ilRQ RqID,ilPORT Port,CPSTR psDstDN);
00597
00598 #ifdef WIN32
00599 __declspec(dllexport)
00600 #endif
00601
00623 ilRQ ilSRqCallTransfer(ilRQ RqID,ilPORT Port,CPSTR psDstDN);
00624
00625 #ifdef WIN32
00626 __declspec(dllexport)
00627 #endif
00628
00652 ilRQ ilSRqCallTransferKVList(ilRQ RqID,ilPORT Port,CPSTR psDstDN, CPSTR psData);
00653
00654 #ifdef WIN32
00655 __declspec(dllexport)
00656 #endif
00657
00679 ilRQ ilSRqCallConsultInit(ilRQ RqID,ilPORT Port,CPSTR psDstDN);
00680
00681 #ifdef WIN32
00682 __declspec(dllexport)
00683 #endif
00684
00701 ilRQ ilSRqCallConsultComplete(ilRQ RqID,ilPORT Port);
00702
00703 #ifdef WIN32
00704 __declspec(dllexport)
00705 #endif
00706
00726 ilRQ ilSRqCallConsultConference(ilRQ RqID,ilPORT Port);
00727
00728 #ifdef WIN32
00729 __declspec(dllexport)
00730 #endif
00731
00752 ilRQ ilSRqCallConsultTransfer(ilRQ RqID,ilPORT Port);
00753
00754 #ifdef WIN32
00755 __declspec(dllexport)
00756 #endif
00757
00805 ilRQ ilSRqUDataAddList(ilRQ RqID,ilPORT Port,CPSTR psList);
00806
00807 #ifdef WIN32
00808 __declspec(dllexport)
00809 #endif
00810
00831 ilRQ ilSRqUDataGetKD(ilRQ RqID,ilPORT Port,CPSTR psKey);
00832
00833 #ifdef WIN32
00834 __declspec(dllexport)
00835 #endif
00836
00853 ilRQ ilSRqUDataDelKD(ilRQ RqID,ilPORT Port,CPSTR psKey);
00854
00855 #ifdef WIN32
00856 __declspec(dllexport)
00857 #endif
00858
00873 ilRQ ilSRqUDataDelAll(ilRQ RqID,ilPORT Port);
00874
00875 #ifdef WIN32
00876 __declspec(dllexport)
00877 #endif
00878
00910 ilRQ ilSRqGetCallInfo(ilRQ RqID,ilPORT Port,ilCI_TYPE eCI);
00911
00912 #ifdef WIN32
00913 __declspec(dllexport)
00914 #endif
00915
00970 ilRQ ilSRqCDT_Init(ilRQ RqID,ilPORT Port,CPSTR psDstDN,CPSTR psService,CPSTR psCDT_Type,CPSTR psCDT_Tag);
00971
00972 #ifdef WIN32
00973 __declspec(dllexport)
00974 #endif
00975
00990 ilRQ ilSRqCDT_Cancel(ilRQ RqID,ilPORT Port);
00991
00992 #ifdef WIN32
00993 __declspec(dllexport)
00994 #endif
00995
01013 ilRQ ilSRqVersion(ilRQ RqID,ilPORT Port,CPSTR psService);
01014
01015 #ifdef WIN32
01016 __declspec(dllexport)
01017 #endif
01018
01024 CPSTR ilGetVersion(void);
01025
01026 #ifdef WIN32
01027 __declspec(dllexport)
01028 #endif
01029
01047 ilRQ ilSRqToLog(ilRQ RqID,ilPORT Port,CPSTR psService,CPSTR psStr);
01048
01049 #ifdef WIN32
01050 __declspec(dllexport)
01051 #endif
01052
01058 BOOL ilSetLogHeader(CPSTR pszLogHeader);
01059
01060 #ifdef WIN32
01061 __declspec(dllexport)
01062 #endif
01063
01070 BOOL ilSetTimeout(ULONG ulMSec);
01071
01072 #ifdef WIN32
01073 __declspec(dllexport)
01074 #endif
01075
01081 ULONG ilGetTimeout(void);
01082
01083 #ifdef WIN32
01084 __declspec(dllexport)
01085 #endif
01086
01108 long ilGetLastError(ilERR_TYPE eErrType);
01109
01110 #ifdef WIN32
01111 __declspec(dllexport)
01112 #endif
01113
01136 long ilGetLastPortError(ilPORT ilPort, ilERR_TYPE eErrType);
01137
01138 #ifdef WIN32
01139 __declspec(dllexport)
01140 #endif
01141
01155 ilRET ilLocalPrn(ilRQ RqID,ilPORT Port,CPSTR psFmt, ...);
01156
01157 #ifdef WIN32
01158 __declspec(dllexport)
01159 #endif
01160
01181 ilRET ilLocalPrnSelector(char* selector, ilRQ RqID,ilPORT Port,CPSTR psFmt, ...);
01182
01183 #ifdef WIN32
01184 __declspec(dllexport)
01185 #endif
01186
01194 int ilGetCallStatus(ilPORT Port);
01195
01196 #ifdef WIN32
01197 __declspec(dllexport)
01198 #endif
01199
01215 CPSTR ilPrnError(long lErrCode);
01216
01217 #ifdef WIN32
01218 __declspec(dllexport)
01219 #endif
01220
01235 ilRQ ilSRqRouteDone(ilRQ RqID,ilPORT Port);
01236
01237 #ifdef WIN32
01238 __declspec(dllexport)
01239 #endif
01240
01266 ilRQ ilSRqRouteStart(ilRQ RqID,ilPORT Port,CPSTR psRP);
01267
01268 #ifdef WIN32
01269 __declspec(dllexport)
01270 #endif
01271
01287 ilRQ ilGetRequest(ilPORT Port,PSTR psReq,int iReqLen);
01288
01289 #ifdef WIN32
01290 __declspec(dllexport)
01291 #endif
01292
01312 ilRET ilSendReply(ilRQ RqID,BOOL bResult,CPSTR psReply);
01313
01314 #ifdef WIN32
01315 __declspec(dllexport)
01316 #endif
01317
01333 ilRQ ilSRqRouteAbort(ilRQ RqID,ilPORT Port);
01334
01335 #ifdef WIN32
01336 __declspec(dllexport)
01337 #endif
01338
01357 ilRQ ilSRqStatPeek(ilRQ RqID,ilPORT Port,CPSTR psStatName);
01358
01359 #ifdef WIN32
01360 __declspec(dllexport)
01361 #endif
01362
01367 ilRQ ilSRqStatGet(ilRQ RqID,ilPORT Port,CPSTR psSS_Name,CPSTR psObjectType,CPSTR psObjectID,CPSTR psStatType);
01368
01369 #ifdef WIN32
01370 __declspec(dllexport)
01371 #endif
01372
01379 BOOL ilDeinitiate(void);
01380
01381 #ifdef WIN32
01382 __declspec(dllexport)
01383 #endif
01384
01398 ilRET ilDialOutError(ilPORT Port, ilDIALOUTERR _ilDialOutErr);
01399
01400 #ifdef WIN32
01401 __declspec(dllexport)
01402 #endif
01403
01419 ilRQ ilSRqGetDialOutData();
01420
01421 #ifdef WIN32
01422 __declspec(dllexport)
01423 #endif
01424
01444 ilRQ ilSRqDialOutDataInit(ilRQ RqID, ilPORT Port, ilRQ RqID_DialOut);
01445
01446 #ifdef WIN32
01447 __declspec(dllexport)
01448 #endif
01449
01463 ilRET ilCallEstablished(ilPORT Port);
01464
01465 #ifdef WIN32
01466 __declspec(dllexport)
01467 #endif
01468
01484 ilRET ilFailure(ilPORT Port, ilFAILURE _ilFailure);
01485
01486 #ifdef WIN32
01487 __declspec(dllexport)
01488 #endif
01489
01498 ilRET ilGetProcessingState();
01499
01500 #ifdef WIN32
01501 __declspec(dllexport)
01502 #endif
01503
01505 char* ilGetParmValue(char*, int);
01506
01507
01508
01509
01510 #ifdef __cplusplus
01511 }
01512 #endif
01513
01514 #endif
01515