Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 490
C H A P T E R
   
12-1
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(3)
12
Helper Classes
The CTI OS Client Interface Library uses several custom data structures. This chapter describes the CTI 
OS Helper Classes (data structures). The following helper classes are distributed with the Client 
Interface Library:
Arg. The Arg structure is the basic data type the CIL uses for any parameter included in methods or 
events. Objects of this type allow the CIL to be fully extensible and reusable. Arg supports many useful 
types including string, integer, Boolean, and Arguments array. Arg is the base class for the Arguments 
class. In most programming scenarios, programmers do not use Arg directly, but indirectly through the 
Arguments class.
Arguments. You use the Arguments structure to maintain and send a set of key-value pairs between 
the CIL and CTI OS Server for events and requests. The Arguments array elements must all be of type 
Arg. The Arguments structure enables future growth of the CTI OS feature set, without requiring 
changes to the method call signature. 
CilRefArg. The CilRefArg class is a specialized subclass of Arg. It stores a reference to an object 
derived from CCtiOsObject (C++ only). For instance, it can hold reference to a CAgent, CCall, 
CSkillGroup, CCtiOsSession, or CWaitObject.
CCtiosException. The CTI OS uses CCtiosException class to provide detailed information when an 
exception occurs (C++ and Java only). When an exception is caught as CCtiosException, the 
programmer can query it for details such as error codes and error messages. 
CWaitObject. CWaitObject is a CIL object that derives from CtiOsObject. It is a utility class 
(available in all CILs except COM) that enables a thread to wait for one or more CTI events. The 
user can provide a list of events along with a wait timeout. You create wait objects with the 
CreateWaitObject Session Object method and destroy them with the DestroyWaitObject Session 
Object method.
Logger. The Logger class creates a Logger object and a LogManager object, if one does not already 
exist. Any object that needs to perform logging must instantiate the Logger class. The Logger class 
communicates with the singleton LogManager object, which acts as the centralized logging facility. 
The Logger class also defines tracing constants.
LogWrapper. The LogWrapper class provides a default Logging mechanism. By default, the 
LogWrapper traces to the console. If you create the LogWrapper with a filename, then it traces to 
that file.