Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 668
 
4-29
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1)
 
Chapter 4      Building Your Application
Connecting to the CTI OS Server
Next Steps
  •
Refer to Chapter 6 and Appendix B for differences between the C++, and 
.NET and Java event publishing.
  •
Refer to Chapters 7 through 12 for differences in method calls and syntax for 
those classes between C++ and Java.
Connecting to the CTI OS Server
To connect a desktop application to the CTI OS server, you must:
5.
Create a session instance, described below.
6.
Set the event listener and subscribe to events, described below.
7.
Set connection parameters, described below.
8.
Call the Connect() method, described on page 4-31.
9.
Set the connection mode, described on page 4-34.
This section also describes how to deal with connection failures, on page 4-31.
How to Create the Session Instance
To connect to the CTIOS Server, you must first create an instance of the 
CtiOsSession object.
The following line shows this in 
Java:
CtiOsSession rSession = new CtiOsSession();
Session Object Lifetime (C++ only)
In C++, a Session object must be created on the heap memory store so that it can exist 
beyond the scope of the method creating it. (In COM, VB, and Java, this is handled 
automatically.)
For example:
CCtiOsSession * m_pSession = NULL;
m_pSession = new CCtiOsSession();