Cisco Cisco Computer Telephony Integration Option 8.5 Developer's Guide

Page of 546
 
4-43
Cisco ICM Software CTI OS Developer’s Guide Release 6.0(0)
 
Chapter 4      Building Your Application
Logging In and Logging Out an Agent
Step 7
For convenience, get the int values for those Integers to test with, as described in 
the section 
The following example demonstrates steps 4 through 7 in Java:
void OnGlobalSettingsDownloadConf(Arguments rArgs) {
 /* 4. Get the Arguments instance for the Login configuration 
 information from the event Arguments parameter.*/
 Arguments logInArgs = rArgs.getValueArray(CTIOS_LOGIN);
/* 5. Get the Arguments instance for the Connection Profile
from the Login Arguments instance. */
Arguments connectionProfilesArgs = 
logInArgs.GetValueArray(CTIOS_CONNECTIONPROFILES);
/* 6. Get the Arguments instance for the specific switch from the 
Connection
Profiles instance */
Arguments IPCCLogInArgs = 
connectionProfilesArgs.GetValueArray("IPCC/SoftACD")
/* 7. Get the Integer instances for the custom values you entered in 
the CTI OS Server registry.*/
 Integer warningIntObj = 
IPCCLogInArgs.GetValueIntObj(“custom_WarnIfAgentLoggedIn”);
 
 Integer rejectIntObj 
=IPCCLogInArgs.GetValueIntObj(“custom_RejectIfAgentLoggedIn”);
/* 8. Get the int values for those object to test later.*/
 custom_WarnIfAgentLoggedIn = warnIntObj.intValue();
 custom_RejectIfAgentLoggedIn = rejectIntObj.intValue();
}
How to Detect the Duplicate Log In Attempt in the Desktop Application
You detect the duplicate log in attempt in the OnQueryAgentStateConf() event, 
which is sent after the application calls SetAgent():