Connection Settings UI API provides a UI for selecting a Destination, Connection Method, Default Connection or Always-Ask. The UI is provided for application settings, in connection setup time Agent Dialog API is used.
CM Manager runs in the process of the client application. All the methods in the API are synchronous. Running the selection dialog requires UI context from the client application.
1. Running the default application settings UI dialog.
2. Running the customizable application settings UI dialog.
The diagram below contains the realization of Connection Settings UI API.
Figure 1: Connection Settings UI API realization
The diagram below contains only the relevant details of the types of Connection Settings UI API.
Figure 2: Class structure of the Connection Settings UI API
The RunApplicationSettingsL
method provides the selection
dialog. The overloaded method provides a customizable selection dialog. Customization
includes a bit field aListItems
(TCmSelectionDialogItems
)
which controls what list items are shown and an array of bearer types aFilterArray
,
only the Connection Methods with the specified bearer types in the filter
array are shown.
The return value indicates whether the user selected a Destination/Connection
Method/Always Ask/Default Connection or not. If the user selected one then
the selection is given back in the TCmSettingSelection
struct.
Note that Default Connection option depends on a feature flag that can be
turned on or off in various builds. Regardless of feature flag the API stays
the same, but if default connection is disabled, then it is not shown in the
UI and cannot be selected by a user.
The TCmSettingSelection
struct contains two fields:
iResult
indicates the type of user selection:
EAlwaysAsk
, the user would like to be asked for a Destination/Connection
Method every time when the application makes a connection. If this is selected,
the application needs to use ECommDbDialogPrefPrompt
flag
in connection setup.
EDestination
, the user selected a destination. If this
is selected, the application needs to provide SNAP in connection setup.
EConnectionMethod
, the user selected a Connection Method.
If this is selected, the application needs to provide IAP in connection setup.
EDefaultConnection
, the user selected Default Connection.
If this is selected, the application needs to open a connection without any
connection preferences.
iId
contains the ID of the selected Destination or Connection
Method: