Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 500
   
6-91
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
Getting All Event Parameters
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. Subscriber list IDs for .NET are part of the CtiOs_Enums.SubscriberList 
interface; each C++/COM/VB event interface has a corresponding .NET subscriber list (for example, 
C++/COM/VB ISessionEvents corresponds to .NET eSessionList).
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(Object sender, Cisco.CtiOs.Cil.EventPublisher.EventPublisherEventArgs 
eventArgs)
where, sender is a null object and eventArgs contains the eventID and arguments for the event. The 
arguments for each .NET event are the same as for the corresponding C++/COM/VB event.
The EventPublisherEventArgs class is a data type that defines the information passed to receivers of the 
event. This information includes the event ID and an Arguments array containing the arguments for the 
event. Therefore, event handling code must extract the event arguments from the 
EventPublisherEventArgs object as shown in the following sample code snippet, which uses the .NET 
CIL:
Arguments args = eventArgs.rArgs;
EventID receivedEvent = (EventID) eventArgs.iEventID;
switch(receivedEvent)
{
case EventID.eQueryAgentStatisticsConf:
ProcessQueryConf(args);
break;
...
}
To unsubscribe for events in the .NET CIL, use the RemoveEventListener method.
This method has the following syntax:
CilError 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 from which to remove this listener.
Getting All Event Parameters
How to Get All Parameters from an Event
The MinimizeEventArgs registry value controls the amount of nonessential call object parameters that 
are sent to the client. When MinimizeEventArgs is set to 1, a minimal set of nonessential call object 
parameters are sent to the CTI OS Client. When the MinimizeEventArgs registry value is set to 0, the 
CTI OS server sends to CTI OS Clients the event parameters listed in 
The MinimizeEventArgs value is located under the following registry key: