Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide
3-13
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
Chapter 3 CIL Coding Conventions
Generic Interfaces
Setting Request Parameters with AddItem
Similar to accessing parameters and properties with the GetValue methods, the
CTI OS CIL provides an extensible mechanism to add parameters to requests. The
AddItem mechanism, available in the CTI OS Arguments class, enables adding
parameters of any known type to the Arguments structure as a key-value pair. For
each request (method) in the CIL Object Interface, the required and optional
parameters are listed in the chapter on that particular object. Calling AddItem
with an unrecognized keyword is allowed but it will be ignored by the CTI OS
Server.
CTI OS CIL provides an extensible mechanism to add parameters to requests. The
AddItem mechanism, available in the CTI OS Arguments class, enables adding
parameters of any known type to the Arguments structure as a key-value pair. For
each request (method) in the CIL Object Interface, the required and optional
parameters are listed in the chapter on that particular object. Calling AddItem
with an unrecognized keyword is allowed but it will be ignored by the CTI OS
Server.
AddItem, similar to GetValue, supports string keywords and enumerated names:
// C++
string sAgentID = “22866”;
args.AddItem(“AgentID”, sAgentID);
args.AddItem(CTIOS_AGENTID, sAgentID); // alternative
args.AddItem(ekwAgentID, sAgentID); // alternative
‘Visual Basic
Dim sAgentID As String
sAgentID = “22866”
args.AddItem “AgentID”, sAgentID
Setting Object Properties with SetValue
The CIL also provides an extensible mechanism to set properties on CTI OS
Client Interface Objects. The SetValue mechanism, available on the CIL Interface
Objects (as well as the CTI OS Arguments class), enables setting properties of any
known type to the object as a key-value pair.
Client Interface Objects. The SetValue mechanism, available on the CIL Interface
Objects (as well as the CTI OS Arguments class), enables setting properties of any
known type to the object as a key-value pair.
SetValue, similar to GetValue and AddItem, supports string keywords and
enumerated names:
enumerated names:
// C++
Agent a;
a.SetValue(“AgentID”, “22866”);
a.SetValue(CTIOS_AGENTID, “22866”); // alternative
a.SetValue(ekwAgentID, “22866”); // alternative
‘Visual Basic
Dim a As Agent
a.SetValue “AgentID”, “22866”