Cisco Cisco Computer Telephony Integration OS 8.5 Guida Dello Sviluppatore
Chapter 8 Session Object
Methods
8-36
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1)
SetAgent
The SetAgent method assigns an agent to this Session object. The agent object
used as a parameter in this method should have the following properties set:
used as a parameter in this method should have the following properties set:
•
CTIOS_AGENTID
•
CTIOS_PERIPHERALID
Syntax
C++:
int
SetAgent(CAgent& agent)
COM:
HRESULT SetAgent(/*[in]*/IAgent *agent, /*[out, retval]*/ int *
errorcode)
VB:
SetAgent (agent As CTIOSCLIENTLib.IAgent) As Long
Java:
int SetAgent(Agent agentObject)
.NET:
CilError SetAgent(Agent NewAgent)
Parameters
agent
The agent to be assigned to the Session object.
errorcode
An output parameter (return parameter in VB) that contains an error code
from
from
in
Return Values
If the SetAgent request is successful, it returns a CIL_OK CtiOs_Enums.CilError
code and sends an OnSetAgentMode event to the client application.
code and sends an OnSetAgentMode event to the client application.
In CTI OS Release 7.1(1) , the SetAgent request returns the following error codes:
•
CIL_FAIL - The request to authenticate failed. The SetAgent request will not
be sent.
be sent.
•
E_CTIOS_SET_AGENT_SESSION_DISCONNECT_REQUIRED - You
attempted to execute SetAgent for a session in monitor mode. The SetAgent
request will not be sent. To correct, execute the Disconnect method to
disconnect the session, then execute the SetAgent method.
attempted to execute SetAgent for a session in monitor mode. The SetAgent
request will not be sent. To correct, execute the Disconnect method to
disconnect the session, then execute the SetAgent method.