Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide
12-11
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 12 Helper Classes
Arguments Class
To avoid this problem, call the Clone method on the initial Arguments array and modify the copy rather
than modifying the original. For example, the preceding example would change as follows:
than modifying the original. For example, the preceding example would change as follows:
•
Programmer passes an Arguments array (initialArray) into a CTI OS SDK method (methodA)
•
MethodA returns
•
modifiedArray = initialArray.Clone()
•
Programmer modifies modifiedArray
•
Programmer passes the modifiedArray into another CTI OS SDK method (methodB)
AddItem (C++, COM, VB only)
The AddItem method expects a key-value pair. The key value can be a string or an integer. The value can
be a string, an integer, or an object reference. If there is an entry with the same key, it is replaced with
this entry, otherwise the new key-value pair is added to the arguments array. Keys are not case sensitive.
Leading and trailing spaces are always removed from the key.
be a string, an integer, or an object reference. If there is an entry with the same key, it is replaced with
this entry, otherwise the new key-value pair is added to the arguments array. Keys are not case sensitive.
Leading and trailing spaces are always removed from the key.
Syntax
C++:
bool AddItem( std::string& key, int value );
bool AddItem( std::string& key, unsigned int value );
bool AddItem( std::string& key, unsigned short value );
bool AddItem( std::string& key, short value );
bool AddItem( std::string& key, bool value );
bool AddItem( std::string& key, char * pchar );
bool AddItem( std::string& key, std::string& value );
bool AddItem( std::string& key, Arg& value );
bool AddItem( std::string& key, const Arg& value );
bool AddItem( std::string& key, Arguments& value );
bool AddItem( std::string& key, const Arguments& value);
bool AddItem( char * key, int value );
bool AddItem( char * key, unsigned int value );
bool AddItem( char * key, unsigned short value );
bool AddItem( char * key, short value );
bool AddItem( char * key, bool value );
bool AddItem( char * key, char * value );
bool AddItem( char * key, std::string& value );
bool AddItem( char * key, Arg& cArg );
bool AddItem( char * key, const Arg& value );
bool AddItem( char * key, Arguments& value );
bool AddItem( char * key, const Arguments& value );
bool AddItem( enum_Keywords key, int value );
bool AddItem( enum_Keywords key, unsigned int value );
bool AddItem( enum_Keywords key, unsigned short value );
bool AddItem( enum_Keywords key, short value );
bool AddItem( enum_Keywords key, bool value );
bool AddItem( enum_Keywords key, char * value );
bool AddItem( enum_Keywords key, std::string& value );
bool AddItem( enum_Keywords key, Arg& cArg );
bool AddItem( enum_Keywords key, const Arg& value );
bool AddItem( enum_Keywords key, Arguments& value );
bool AddItem( enum_Keywords key, const Arguments& value)
COM:
HRESULT AddItem(/*[in]*/ VARIANT *key, /*[in]*/ VARIANT *value,