Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 506
   
4-41
CTI OS Developer’s Guide for Cisco Unified Contact Center Enterprise
Release 8.5(1)
Chapter 4      Building Your Application
Working with Calls
The following example shows this in Java:
void OnButtonEnablementChange(Arguments rArguments) {
 m_appFrame.LogEvent("OnButtonEnablementChange", rArguments);
 // Get mask from message
 Long LMask = rArguments.GetValueUIntObj(CTIOS_ENABLEMENTMASK);
 if (null==LMask)
   
return;
 
 final long bitMask = LMask.longValue();
 
 /* Transfer modification of the GUI objects to the     
EventDispatchThread or we could have a thread sync issue.  We're 
currently on the CtiOsSession's event thread.*/
 SwingUtilities.invokeLater(new Runnable() {
 
 
 public void run() {
 /* Enable a button if it's bit is 
turned on.  Disable it if not.*/
 
m_appFrame.m_btnAnswer.setEnabled (((bitMask & ENABLE_ANSWER) > 0));
 m_appFrame.m_btnConference.setEnabled 
       
(((bitMask 
ENABLE_CONFERENCE_COMPLETE) 
0));
 m_appFrame.m_btnCCConference.setEnabled
       (((bitMask 
ENABLE_CONFERENCE_INIT) 
0));
 
m_appFrame.m_btnHold.setEnabled (((bitMask & ENABLE_HOLD) > 0));
 m_appFrame.m_btnLogin.setEnabled (((bitMask & ENABLE_LOGIN)> 0));
 m_appFrame.m_btnLogout.setEnabled 
      
(((bitMask 
(ENABLE_LOGOUT 
 
 
 
 
 
 
 
 
CtiOs_Enums.ButtonEnablement.ENABLE_LOGOUT_WITH_REASON)) >    
            0));
 m_appFrame.m_btnMakeCall.setEnabled 
       
(((bitMask 
ENABLE_MAKECALL) 
0));
 m_appFrame.m_btnNotReady.setEnabled(((bitMask & (ENABLE_NOTREADY | 
        
ENABLE_NOTREADY_WITH_REASON)) 
0));
 m_appFrame.m_btnReady.setEnabled(((bitMask & ENABLE_READY) > 0));
 m_appFrame.m_btnRelease.setEnabled(((bitMask & ENABLE_RELEASE)> 0));
 m_appFrame.m_btnRetrieve.setEnabled 
       
(((bitMask 
ENABLE_RETRIEVE) 
0));
 m_appFrame.m_btnSSTransfer.setEnabled
       (((bitMask 
ENABLE_SINGLE_STEP_TRANSFER)> 
0));
 m_appFrame.m_btnSSConference.setEnabled
        
(((bitMask 
ENABLE_SINGLE_STEP_CONFERENCE) 
0));
 m_appFrame.m_btnTransfer.setEnabled 
        (((bitMask 
ENABLE_TRANSFER_COMPLETE)> 
0));
  
m_appFrame.m_btnCCTransfer.setEnabled 
      
(((bitMask 
ENABLE_TRANSFER_INIT) 
0));
 
 
 }
 });
} // OnButtonEnablementChange
OnButtonEnablementChange() Event in Supervisor Desktop Applications
When a supervisor desktop application processes an OnButtonEnablementChange() event, the 
application should check for the CTIOS_MONITORED parameter and ignore this parameter if it is 
present and is TRUE. In a supervisor desktop application, the OnButtonEnablementChange() event can 
reflect button enablement for either a monitored team member or the supervisor.