Cisco Cisco Computer Telephony Integration OS 8.5 Guía Del Desarrollador
2-6
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 2 CTI OS Client Interface Library Architecture
CIL Object Model
Note
In C++, the object must be created on the heap memory store so that it can exist beyond the scope of the
method creating it. For clients using other CILs, this is handled automatically.
method creating it. For clients using other CILs, this is handled automatically.
The Session will hold a reference to the Agent object as long as it is in use, but the client programmer
must release the last reference to the object to prevent a memory leak.
must release the last reference to the object to prevent a memory leak.
In Monitor Mode objects are created at the CIL the first time the CIL receives an event for that agent
(e.g in an OnAgentStateChange event). When the Session receives an event for an unrecognized Agent,
that new Agent is added to the Session’s collection of agents.
(e.g in an OnAgentStateChange event). When the Session receives an event for an unrecognized Agent,
that new Agent is added to the Session’s collection of agents.
During application clean-up, the Session object will release its references to all agents in the Agent
collection. To ensure proper memory clean-up, the programmer must release all reference to Agent
objects.
collection. To ensure proper memory clean-up, the programmer must release all reference to Agent
objects.
SkillGroup Object Lifetime
A SkillGroup object is created at the CIL the first time an OnNewSkillGroupStatisticsEvent event occurs
for that SkillGroup. It is added to the SkillGroup collection, and it is subsequently updated by follow-on
OnNewSkillGroupStatisticsEvent events.
for that SkillGroup. It is added to the SkillGroup collection, and it is subsequently updated by follow-on
OnNewSkillGroupStatisticsEvent events.
During application clean-up, the Session object releases its references to all skill groups in the
SkillGroup collection. To ensure proper memory clean-up, the programmer must release all reference to
SkillGroup objects.
SkillGroup collection. To ensure proper memory clean-up, the programmer must release all reference to
SkillGroup objects.
Methods that Call AddRef()
The following tables detail the various methods that call
AddRef(). To prevent memory leaks, C++
and COM application developers that call these methods in their applications must be aware of the
impact of these methods on the reference count and must appropriately release the reference when no
longer using the object.:
impact of these methods on the reference count and must appropriately release the reference when no
longer using the object.:
Table 2-1
SessionLib (C++)
Object Name
Method Name
Explanation
CAgent
GetSkillGroups(),
GetMonitoredCall()
The client application must call
Release() on the returned object
when the object is no longer
needed.
Release() on the returned object
when the object is no longer
needed.
CILRefArg
CreateInstance(),
GetValue()
The client application must call
Release() on the returned object
when the object is no longer
needed.
Release() on the returned object
when the object is no longer
needed.
CILRefArg
SetValue(),
operator=
These methods increment the
reference count on the passed in
object. When the CilRefArg is
deleted the reference count of the
enclosed object will be
decremented.
reference count on the passed in
object. When the CilRefArg is
deleted the reference count of the
enclosed object will be
decremented.