Cisco Cisco Computer Telephony Integration OS 8.5 Entwickleranleitung
3-11
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
Chapter 3 CIL Coding Conventions
Generic Interfaces
deleted in future versions without affecting the signature of the method or event.
This provides the benefit to developers that code developed to work with one
version of the CTI OS developer’s toolkit will work with future versions without
requiring any code changes on the client’s side (except to take advantage of new
features). For example, CTI OS will automatically send a new parameter in the
Arguments array for an event, without requiring an interface or library code
change. The dilemma of creating a generic interface is solved by using generic
mechanisms to send parameters with events and request, and to access properties.
This provides the benefit to developers that code developed to work with one
version of the CTI OS developer’s toolkit will work with future versions without
requiring any code changes on the client’s side (except to take advantage of new
features). For example, CTI OS will automatically send a new parameter in the
Arguments array for an event, without requiring an interface or library code
change. The dilemma of creating a generic interface is solved by using generic
mechanisms to send parameters with events and request, and to access properties.
Arguments
The CTI OS developer’s toolkit makes extensive use of a new data structure
(class) called Arguments. Arguments is a structure of key-value pairs that
supports a variable number of parameters and accepts any user-defined parameter
names. For any given event, the arguments structure allows the CTI OS Server to
send the CIL any new parameters without requiring client side changes. Similarly,
for any request, the programmer can send any new parameters, without any
changes to the underlying layers.
(class) called Arguments. Arguments is a structure of key-value pairs that
supports a variable number of parameters and accepts any user-defined parameter
names. For any given event, the arguments structure allows the CTI OS Server to
send the CIL any new parameters without requiring client side changes. Similarly,
for any request, the programmer can send any new parameters, without any
changes to the underlying layers.
Example of using Arguments in a Visual Basic MakeCall request:
Dim args As New Arguments
args.AddItem "DialedNumber", dialthis.Text
If Not 0 = Len(callvar1.Text) Then
' set callvar1
args.AddItem "CallVariable1", callvar1.Text
End If
' send makecall request
m_Agent.MakeCall args, errorcode
Java example:
Arguments args = new Arguments();
args.SetValue(CtiOs_IkeywordIDs.CTIOS_DIALEDNUMBER, “12345”);
args.SetValue(CtiOs_IkeywordIDs.CTIOS_CALLVARIABLE1, “MyData”);
int iRet = m_Agent.MakeCall(args);
The Arguments structure can store and retrieve all native C/C++/Visual Basicand
Java types, as well as nested Arguments structures.
Java types, as well as nested Arguments structures.