Cisco Cisco Computer Telephony Integration OS 8.5 Developer's Guide

Page of 668
 
Appendix A      CTI OS Keywords and Enumerated Types
Enumerated Types
A-4
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1)
Java Interfaces
The Java CIL handles the C++ CIL enums is through the use of interfaces. The 
custom application can then either implement those interfaces and use the static 
data members without referencing them with the interface name first, or it can 
access those members through referencing.  By convention, the name of the Java 
interface is the same as the enum tag but with the “enumCTIOS_”  prefix 
substituted with “CtiOs_I”. So for example, the following C++ CIL enum
enum enumCTIOS_AgentState
{
eLogin = 0,
eLogout = 1,
eNotReady = 2,
eAvailable = 3,
eTalking = 4,
eWorkNotReady = 5,
eWorkReady = 6,
eBusyOther = 7,
eReserved = 8,
eUnknown = 9,
eHold=10
 };
is implemented in the Java CIL as follows:
public interface CtiOs_IAgentState
{
public static final inteLogin = 0,
eLogout = 1,
eNotReady = 2,
eAvailable = 3,
eTalking = 4,
eWorkNotReady = 5,
eWorkReady = 6,
eBusyOther = 7,
eReserved = 8,
eUnknown = 9,
eHold=10;
}
A Java CIL application can access those defined values in one of two ways; either 
by implementing the interface, as shown: