Cisco Cisco Computer Telephony Integration OS 8.5 Developer's Guide
![Cisco](https://files.manualsbrain.com/attachments/7380d0050044647c30f5c24bbbf5d0c0b6d9bb84/common/fit/150/50/faa183d287233c52228cfea3dbc2a127fe780f60564fcb0955d9c3d1cd23/brand_logo.png)
3-17
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.1(1)
Chapter 3 CIL Coding Conventions
Using Button Enablement Masks
}
Visual Basic 6.0 example:
Public Sub m_Session_OnCallDeliveredEvent(ByVal pArguments as
CTIOSClientLib.Arguments)
Dim nBitMask as Integer
If pArguments.IsValid “EnablementMask” Then
nBitMask = pArguments.GetValueInt “EnablementMask”
End If
‘ do bitwise comparison
If nBitMask And ENABLE_ANSWER Then
m_AnswerButton.Enable
End If
End Sub
Java example:
void OnCallDeliveredEvent(Arguments args)
{
Long LMask =
args.GetValueUIntObj(CtiOs_IKeywordIDs.CTIOS_ENABLEMENTMASK);
if (null!=LMask)
{
long lMask = LMask.longValue();
if ((lMask & CtiOs_Enums.ButtonEnablement.ENABLE_ANSWER) == 0)
m_AnswerButton.setEnabled(false);
else
m_AnswerButton.setEnabled(true);
}
The advantage of using this approach is that all of the peripheral-specific details
of enabling and disabling buttons is determined in a central location – at the CTI
OS Server. This allows future new features to be enabled, and software bugs to be
corrected in a central location, which is a great benefit for deploying future
releases.
of enabling and disabling buttons is determined in a central location – at the CTI
OS Server. This allows future new features to be enabled, and software bugs to be
corrected in a central location, which is a great benefit for deploying future
releases.
Warning
The button enablement feature is intended to be used in agent mode
applications and not for monitor mode applications.
applications and not for monitor mode applications.