Namespace $.fn.cwic-settings
Defined in: cwic.js.
| Constructor Attributes | Constructor Name and Description |
|---|---|
| <inner> |
cwic global settings, they can be overridden by passing options to init
|
| Field Attributes | Field Name and Description |
|---|---|
| <static> |
$.fn.cwic-settings.devicePrefix
Device prefix to use for default softphone device prediction algorithm.
|
| <static> |
$.fn.cwic-settings.errorMap
Allows the application to extend the default error map.
|
| <static> |
$.fn.cwic-settings.ready
The handler to be called when the API is ready and authorized.
|
| <static> |
$.fn.cwic-settings.redirectUri
OAuth2 redirect_uri parameter.
|
| <static> |
$.fn.cwic-settings.serviceDiscovery
A flag to indicate if service discovery based sign in is active.
|
| <static> |
$.fn.cwic-settings.verbose
A flag to indicate to cwic that it should log more messages.
|
| Method Attributes | Method Name and Description |
|---|---|
| <static> |
$.fn.cwic-settings.credentialsRequired(setCredentials, cachedUser)
Discovery lifecycle callback for "Credentials Required" lifecycle event.
|
| <static> |
$.fn.cwic-settings.delayedUserAuth()
A callback used to indicate that CWIC must show the user authorization dialog before the application can use
the CWIC API.
|
| <static> |
$.fn.cwic-settings.emailRequired(setEmail, cachedEmail)
Discovery lifecycle callback for "User Profile Required" lifecycle event.
|
| <static> |
$.fn.cwic-settings.error(error)
The handler to be called if the API could not be initialized.
|
| <static> |
$.fn.cwic-settings.log(msg, context)
Handler to be called when cwic needs to log information.
|
| <static> |
$.fn.cwic-settings.predictDevice(options)
Callback function to predict softphone device name
Device prediction algorithm is used to predict softphone device name in switchPhoneMode API function. |
| <static> |
$.fn.cwic-settings.signedIn()
Discovery lifecycle callback for "SSO Signed In" lifecycle state.
|
Namespace Detail
<inner>
$.fn.cwic-settings
cwic global settings, they can be overridden by passing options to init
Field Detail
<static>
{String='ecp'}
$.fn.cwic-settings.devicePrefix
Device prefix to use for default softphone device prediction algorithm. If not set, default prefix is 'ecp'. See also $.fn.cwic-settings.predictDevice.
<static>
{$.fn.cwic-errorMapEntry{}}
$.fn.cwic-settings.errorMap
Allows the application to extend the default error map.
This parameter is a map of error id to $.fn.cwic-errorMapEntry It may also be a map of error id to String By default error messages (String) are associated to error codes (map keys, Numbers).
The application can define new error codes, or associate a different message/object to a pre-defined error code.
Default error map: $.fn.cwic-errorMap
This parameter is a map of error id to $.fn.cwic-errorMapEntry It may also be a map of error id to String By default error messages (String) are associated to error codes (map keys, Numbers).
The application can define new error codes, or associate a different message/object to a pre-defined error code.
Default error map: $.fn.cwic-errorMap
<static>
{Function=null}
$.fn.cwic-settings.ready
The handler to be called when the API is ready and authorized.
The values in the defaults parameter can be used when invoking registerPhone.
The API is ready when:
The values in the defaults parameter can be used when invoking registerPhone.
The API is ready when:
- The document (DOM) is ready.
- The Cisco Web Communicator add-on was found and could be loaded.
- User authorization status is "UserAuthorized" (since 3.0.1).
<static>
$.fn.cwic-settings.redirectUri
OAuth2 redirect_uri parameter. An URL to which an OAuth token is sent. Required for SSO sign in scenario.
<static>
{Boolean=true}
$.fn.cwic-settings.serviceDiscovery
A flag to indicate if service discovery based sign in is active.
If discovery lifecycle callbacks are not implemented, set this value to false.
<static>
{Boolean=false}
$.fn.cwic-settings.verbose
A flag to indicate to cwic that it should log more messages.
Method Detail
<static>
$.fn.cwic-settings.credentialsRequired(setCredentials, cachedUser)
Discovery lifecycle callback for "Credentials Required" lifecycle event.
- Parameters:
- {Function} setCredentials
- Callback to call to set credentials and to continue with sign-in.
- {string} cachedUser
- Cached username value which could be used to populate input field on UI.
<static>
{Function=null}
$.fn.cwic-settings.delayedUserAuth()
A callback used to indicate that CWIC must show the user authorization dialog before the application can use
the CWIC API. Can be used to display instructions to the user, etc. before the user authorization dialog is
displayed to the user. If implemented, the application must call the $.fn.cwic-showUserAuthorization API to show the
user authorization dialog and obtain authorization from the user before using the CWIC API.
If null, the user authorization dialog will be displayed when the application calls CWIC 'init', unless
the domain has been previously authorized through the authorization dialog by the user selecting the "Always
Allow" button, or the applications domain has been allowed by administrative whitelist.
- Since:
- 3.0.1
<static>
$.fn.cwic-settings.emailRequired(setEmail, cachedEmail)
Discovery lifecycle callback for "User Profile Required" lifecycle event. Only happens on first use.
After first use, plugin caches user email address/domain and callback won't be triggered again.
Call resetData API to change email address.
- Parameters:
- {Function} setEmail
- Callback to call to continue with sign-in.
- {string} cachedEmail
- Cached previous value of email which could be used to populate input field on UI.
<static>
{Function}
$.fn.cwic-settings.error(error)
The handler to be called if the API could not be initialized.
The basic properties of the error object are listed, however more may be added based on the context of the error.
If the triggered error originated from a caught exception, the original error properties are included in the error parameter.
An error with code 1 (PluginNotAvailable) can have an extra 'pluginDisabled' property set to true.
The basic properties of the error object are listed, however more may be added based on the context of the error.
If the triggered error originated from a caught exception, the original error properties are included in the error parameter.
An error with code 1 (PluginNotAvailable) can have an extra 'pluginDisabled' property set to true.
- Parameters:
- {Object} error
- see $.fn.cwic-errorMap
- {String} error.message Optional
- message associated with the error.
- {Number} error.code
- code associated with the error
<static>
{Function}
$.fn.cwic-settings.log(msg, context)
Handler to be called when cwic needs to log information.
Default is to use console.log if available, otherwise do nothing.
Default is to use console.log if available, otherwise do nothing.
- Parameters:
- {String} msg
- the message
- {Object} context Optional
- the context of the message
<static>
{Function=null}
$.fn.cwic-settings.predictDevice(options)
Callback function to predict softphone device name
Device prediction algorithm is used to predict softphone device name in switchPhoneMode API function. If device name is not provided in the form of non-empty string, predictDevice function is used to predict device name. If custom predictDevice is not provided, default implementation is to concatenate settings.devicePrefix + options.username, where options.username is the name of the currently logged-in user.
Device prediction algorithm is used to predict softphone device name in switchPhoneMode API function. If device name is not provided in the form of non-empty string, predictDevice function is used to predict device name. If custom predictDevice is not provided, default implementation is to concatenate settings.devicePrefix + options.username, where options.username is the name of the currently logged-in user.
- Parameters:
- {Object} options
- {String} options.username
<static>
$.fn.cwic-settings.signedIn()
Discovery lifecycle callback for "SSO Signed In" lifecycle state. Only happens when the app has successfully been authenticated.
This does not mean that phone is ready to use, telephony device connection flow is initiated afterwards. Implementation of signedIn callback is optional.
