Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 640
 
4-59
CTI OS Developer’s Guide for Cisco ICM/IPCC Enterprise & Hosted Editions Release 7.0(0)
 
Chapter 4      Building Your Application
Making Requests
   }
 });
} // 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.
Making Requests
Telephony requests are made through either an Agent object or a Call object by 
calling the appropriate API methods listed in Chapters 9 and 10. It is important to 
ensure that a user not be able to make multiple duplicate requests before the first 
request has a chance to be sent down to the switch and the appropriate events be 
sent back to the application, since this will result in either multiple failures or 
unexpected results.
Preventing Multiple Duplicate Requests
Since it is important for a custom application to prevent a user from making a 
number of duplicate requests, it should not allow the user to click the same button 
many times. In order to do this, it is recommended that a custom application 
disable a clicked button until such time as it should be re-enabled, indicating that 
it would be all right for the user to click it again. 
Some examples of when Sample softphones re-enable a button that has been 
clicked and disabled are listed below:
  •
re-enable Connect/LoginBtn when:
  –
LoginDlg canceled
  –
ControlFailure or CTIOSFailure when login is in progress