Cisco Cisco Computer Telephony Integration OS 8.5 Entwickleranleitung
12-10
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
Chapter 12 Helper Classes
Arguments Class
lists the Arguments class methods.
Usage Notes
When writing an application using the CTI OS SDK, the following sequence of steps in the program can
produce a problem:
produce a problem:
•
Programmer passes an Arguments array into a CTI OS SDK method (methodA)
•
MethodA returns
•
Programmer modifies the same Arguments array
•
Programmer passes the modified Arguments array into another CTI OS SDK method (methodB)
When running the application, the call to methodA can behave as if it was passed the modified
Arguments array. This is because many CTI OS methods simply place a pointer to the Arguments array
on a queue of items to send to CTI OS server. When the same Arguments array is later modified, as in
the preceding example, the pointer on the queue now points to the modified array and the modified array
is sent to CTI OS server. A problem can occur depending on timing, as there are multiple threads
involved: the thread pulling items off the queue and the thread modifying the Arguments array. If the
queued message is sent to CTI OS before the Arguments array is modified, the problem does not occur.
Arguments array. This is because many CTI OS methods simply place a pointer to the Arguments array
on a queue of items to send to CTI OS server. When the same Arguments array is later modified, as in
the preceding example, the pointer on the queue now points to the modified array and the modified array
is sent to CTI OS server. A problem can occur depending on timing, as there are multiple threads
involved: the thread pulling items off the queue and the thread modifying the Arguments array. If the
queued message is sent to CTI OS before the Arguments array is modified, the problem does not occur.
Table 12-5
Arguments Class Methods
Method
Description
AddItem
Adds an item to an Arguments array.
AddRef
Increments the reference count for the data item.
Clear
Deletes all elements from an Arguments array.
Clone
Creates a copy of an Arguments array.
CreateInstance
Creates an Arguments array.
DumpArgs
Returns Arguments object as a string
GetElement (also GetElementInt,
GetElementUInt, GetElementUShort,
GetElementShort, GetElementBool,
GetElementString, GetElementArg,
GetElementKey GetElementArgType)
GetElementUInt, GetElementUShort,
GetElementShort, GetElementBool,
GetElementString, GetElementArg,
GetElementKey GetElementArgType)
Returns the value stored under a specified index.
GetValue (also GetValueInt, GetValueUShort,
GetValueShort, GetValueBool, GetValueUInt,
GetValueString, GetValueArray,
GetValueArg)
GetValueShort, GetValueBool, GetValueUInt,
GetValueString, GetValueArray,
GetValueArg)
Returns the value stored under a specified key.
IsValid
Tests if a key is present in the current Arguments
array.
array.
NumElements
Returns the number of arguments in the current
Arguments array,.
Arguments array,.
Release
Decrements the reference count for the data item.
RemoveItem
Removes an item from an Arguments array.
SetElement
Sets the value of an index.
SetValue
Sets the value of a key.