Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 668
 
Chapter 3      CIL Coding Conventions
Generic Interfaces
3-12
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1) 
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 Basic, 
and .NET and Java types, as well as nested Arguments structures. 
Accessing Properties and Parameters with GetValue
CTI OS makes extensive use of generic data abstraction. The CTI OS CIL objects, 
as well as the Arguments structure, store all data by key-value pair. Properties and 
data values in CTI OS are accessible through a generic mechanism called 
GetValue. For a list of the different GetValue methods, see 
 The GetValue mechanism provides for 
the retrieval of any data element based on its name. This enables the future 
enhancement of the data set provided for event parameters and object properties 
without requiring any interface changes to support new parameters or properties. 
GetValue supports use of string keywords, as shown in the following examples:
// C++
string sAgentID;
args.GetValueString(“AgentID”, &sAgentID);
‘Visual Basic
Dim sAgentID As String
sAgentID = args.GetValueString “AgentID”
//Java
String  sID     = 
args.GetValueString(CtiOs_IkeywordIDs.CTIOS_AGENTID);
Integer IPeriph = 
args.GetValueIntObj(CtiOs_IkeywordIDs.CTIOS_PERIPHERALID);
if (IPeriph == null)
// Error accessing Peripheral ID! Handle Error here
else
iPeriph = IPeriph.intValue();
CTI OS defines a set of well-known keywords for event parameters and 
properties. The well-known keywords are of type string and are listed throughout 
this document with the methods and events for which they are valid. The complete 
set of valid keywords are listed in the C++ header file, ctioskeywords.h, and are 
provided in the COM (Visual Basic) type library as well. Java CIL keywords are 
listed in the Javadoc in the description of the CtiOs_IKeywordIDs interface.