Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide
3-3
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1)
Chapter 3 CIL Coding Conventions
Asynchronous Program Execution
Asynchronous Program Execution
Synchronous execution is the most common programming approach used by most
applications. In a synchronous execution mode, a method call will execute all of
the code required to complete the request and provide return values as well as
error codes. Client-server programming can be synchronous (the client
application will make a blocking request and will continue execution when the
request is completed) or asynchronous (the client application makes a request, and
continues processing immediately, with the result of the request to follow at a
later time).
applications. In a synchronous execution mode, a method call will execute all of
the code required to complete the request and provide return values as well as
error codes. Client-server programming can be synchronous (the client
application will make a blocking request and will continue execution when the
request is completed) or asynchronous (the client application makes a request, and
continues processing immediately, with the result of the request to follow at a
later time).
CTI programming is unique in that requests are often serviced by third-party
servers or applications, such as a PBX/ACD in the contact center. The
asynchronous nature of CTI programming requires developers to note the
distinction between an error code and the response to a request. In non-CTI
programming, developers test the error codes (return values from method calls) to
determine whether a method request succeeded or failed. However in a distributed
architecture such as CTI OS, success or failure is often determined by some
external server or component such as the PBX/ACD.
servers or applications, such as a PBX/ACD in the contact center. The
asynchronous nature of CTI programming requires developers to note the
distinction between an error code and the response to a request. In non-CTI
programming, developers test the error codes (return values from method calls) to
determine whether a method request succeeded or failed. However in a distributed
architecture such as CTI OS, success or failure is often determined by some
external server or component such as the PBX/ACD.
The CTI OS Client Interface Library API specifies error codes, which are return
values for method calls. These error codes relate to the success or failure of the
method call, but not the success or failure of the underlying operation. By the
success of the method call, we mean that the parameters sent were of the correct
values for method calls. These error codes relate to the success or failure of the
method call, but not the success or failure of the underlying operation. By the
success of the method call, we mean that the parameters sent were of the correct
Visual
Basic 6.0
Type
Basic 6.0
Type
String
Long
None
Integer
Integer
Boolean
Argumen
ts
ts
Arg
COM Type
BSTR
long
OR int
OR int
unsigned int short
unsigned
short
short
VARIAN
T_BOOL
T_BOOL
IArgume
nts *
nts *
IArg*
Java Type
String
int
long
short
int
Boolean
Argumen
ts
ts
Arg
.NET Type
System.St
ring
ring
System
.Int32
.Int32
System.Int6
4
4
System.In
t16
t16
System.Int32
System.
Boolean
Boolean
Argumen
ts
ts
Arg
Table 3-1
CTI OS CIL Data Type (continued)