Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 500
   
6-90
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions
Cisco CTI OS Release 7.2(1)
Chapter 6      Event Interfaces and Events
Events in Java CIL
ICallEvents
The following methods subscribe and unsubscribe the CTI OS Session Object for the ICallEvents 
interface.
int addCallEventListener (ICallEvents callEvents)
int removeCallEventListener (ICallEvents callEvents)
ISkillGroupEvents
The following methods subscribe and unsubscribe the CTI OS Session Object for the ISkillGrouEvents 
interface.
int addSkillGroupEventListener (ISkillGroupEvents skillGroupEvents)
int removeSkillGroupEventListener (ISkillGroupEvents skillGroupEvents)
Events in Java CIL
To subscribe for events in the Java CIL, use the AddEventListener method. This method has the 
following syntax:
int AddEventListener(IGenericEvents Listener, int iListID)
where Listener is the IGenericEvents object that is subscribing for events and iListID is the ID of the 
subscriber list to add this listener to. Java subscriber list IDs are part of the CtiOs_Enums.SubscriberList 
interface; each C++/COM/VB event interface has a corresponding Java subscriber list (for example, 
C++/COM/VB ISessionEvents corresponds to Java eSessionList). See the Javadoc file for more details on the 
CtiOs_Enums.SubscriberList interface.
The IGenericEvents interface, though it contains the C++/COM/VB events documented in this chapter, 
does not have a callback method for each event. Instead, the OnEvent method passes the event ID code 
and arguments for each event. The OnEvent method has the following syntax:
void OnEvent(int iEventID, Arguments rArgs)
where iEventID is the event ID code for the event and rArgs is the arguments for the event. The 
arguments for each Java event are the same as for the corresponding C++/COM/VB event. See the 
Javadoc file for details on the IGenericEvents interface.
To unsubscribe for events in the Java CIL, use the RemoveEventListener method. This method has the 
following syntax:
int RemoveEventListener(IGenericEvents Listener, int iListID)
where Listener is the IGenericEvents object that is unsubscribing for events and iListID is the ID of the 
subscriber list to remove this listener from.
Events in .NET CIL
To subscribe for events in the .NET CIL, use the AddEventListener method. This method has the 
following syntax:
CilError AddEventListener(IGenericEvents Listener, int iListID)