Cisco Cisco Computer Telephony Integration OS 8.5 開発者ガイド
Chapter 3 CIL Coding Conventions
Using Button Enablement Masks
3-16
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1)
Note
The GetObjectFromObjectID method will perform an AddRef() on the pointer
before it is returned to the programmer.
before it is returned to the programmer.
C++ example:
string sUniqueObjectID = “call.5000.101.23901”;
Ccall * pCall = NULL;
m_pSession->GetObjectFromObjectID(sUniqueObjectID,
(CCtiOsObject**)&pCall);
pCall->Clear();
pCall->Release(); // release our reference to this object
pCall = NULL;
Java example:
String sUID = “call.5000.101.23901”;
Call rCall = (Call) m_Session.GetObjectFromObjectID(sUID);
Using Button Enablement Masks
The CTI OS Server provides a rich object-level interface to the CTI interactions
of the contact center. One of the features the CTI OS Server provides is to
evaluate all of the telephony events, and map them to the features permitted by
the Cisco CallManager implementation. The CTI OS Server provides a
peripheral-independent mechanism for clients to determine which requests are
valid at any given time by using a bitmask to indicate which requests are
permitted.
of the contact center. One of the features the CTI OS Server provides is to
evaluate all of the telephony events, and map them to the features permitted by
the Cisco CallManager implementation. The CTI OS Server provides a
peripheral-independent mechanism for clients to determine which requests are
valid at any given time by using a bitmask to indicate which requests are
permitted.
For example, the only time when it is valid to answer a call is when the
ENABLE_ANSWER bit in the enablement mask is set to the on position. The
following C++ example depicts this case:
ENABLE_ANSWER bit in the enablement mask is set to the on position. The
following C++ example depicts this case:
void EventSink::OnCallDeliveredEvent(Arguments& args)
{
unsigned int unBitMask = 0;
if (args.IsValid(“EnablementMask”))
{
args.GetValueInt(“EnablementMask”, & unBitMask)
//do bitwise comparison
If(unBitMask & ENABLE_ANSWER)
m_AnswerButton.Enable();
}