Cisco Cisco Computer Telephony Integration OS 8.5 개발자 가이드
8-16
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 8.0(1)
Chapter 8 Session Object
Methods
Remarks
The following sample C++ code illustrates how to take the array returned from GetAllCalls() and use it
to access the corresponding calls in the CIL’s object cache. The example uses the C++ CIL.
to access the corresponding calls in the CIL’s object cache. The example uses the C++ CIL.
Arguments &args = m_pSession->GetAllCalls() ;
// Iterate through all of the CILRefArg objects
// in the Arguments array.
//
for ( int i = 1 ; i <= args.NumElements() ; i++ )
{
CILRefArg *pRefArg = NULL ;
// Retrieve the CILRefArg at each position in the
// array.
//
if ( args.GetElement(i, (Arg **)&pRefArg) )
{
if ( pRefArg != NULL )
{
// The value method will return a pointer
// to the agent object referenced by the
// CILRefArg.
//
CCall *pCall = (CCall *)pRefArg->GetValue() ;
cout << "-- Call Properties --" << endl ;
if ( pCall == NULL )
{
cout << "NULL" << endl ;
}
else
{
cout << pCall->DumpProperties().c_str() << endl ;
}
cout << "--" << endl ;
}
}
}