Руководство Разработчика для Cisco Cisco Computer Telephony Integration Option 8.5

Скачать
Страница из 500
   
4-18
CTI OS Developer’s Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted
Release 7.5(1)
Chapter 4      Building Your Application
Using the C++ CIL and Static Libraries
The foregoing are all the Project Settings required for CTI OS. Click OK, and save your project settings. 
Subscribing for Events in C++
Events interfaces are provided in C++ using the publisher-subscriber model. To subscribe for events, you 
must create a callback class (event sink), or implement the event interface in your main class. The 
callback class can be derived from the Adapter classes defined in CIL.h, such as 
AllInOneEventsAdapter.h. 
To register for an event, you use the appropriate AddEventListener method on the Session object:
// Initialize the event sink
m_pEventSink = new CEventSink(&m_ctiSession, &m_ctiAgent, this);
// Add event sink as an event listener
m_ctiSession.AddAllInOneEventListener((IAllInOne *) m_pEventSink);
To remove an event listener (upon program termination), use the appropriate RemoveEventListener on 
the Session object:
// Tell session object to remove our event sink
m_ctiSession.RemoveSessionEventListener((IAllInOne *) m_pEventSink);
STLPort 
Version 7.1(1)(0) of the Cisco CTI OS Toolkit no longer uses STLPort. Instead, it uses Microsoft’s 
version of STL, thereby removing any special configuration of the build environment. 
Next Steps
For detailed information on the CTI OS client start up and shut down sequence, see the section 
“Disconnecting from CTI OS Server”.
For detailed information on the CTI OS Client Interface Library objects, see Chapters 6 through 11.