diff -r 51a74ef9ed63 -r ae94777fff8f Symbian3/SDK/Source/GUID-E2E2FACF-5D4F-43E8-8B53-B268252CF572.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-E2E2FACF-5D4F-43E8-8B53-B268252CF572.dita Fri Jun 11 12:39:03 2010 +0100 @@ -0,0 +1,84 @@ + + + + + +Defining +Connection Management ItemsYour application should define the connection management items +(destination networks, access points, default connection, and always ask) +it supports and show only the supported items in the UI. In this example, +the application supports default connection, always ask, and destination networks. +Access points (if supported) of a certain destination network can be seen +under the Options menu when the destination network is highlighted. +

To define +the connection management items:

+ +Request the connection +settings dialog for supported items using the Connection Settings UI API. + +Show the items that your application supports in the UI using the +Connection Settings UI API. After the user has made a selection, it is returned +to the application. + +Store the user selection in the application's connection setup. + For information on how to start the connection through a destination network, +see Starting the Connection +through the Destination Network. If you want to prompt the user to +make this selection, see Prompting the user to select a destination network. + + +#include <cmapplicationsettingsui.h>TCmSettingSelection userSelection; + +CCmApplicationSettingsUi* settings = CCmApplicationSettingsUi::NewL(); +CleanupStack::PushL( settings ); + +TUint listedItems = EShowAlwaysAsk | EShowDefaultConnection | + EShowDestinations | EShowConnectionMethods; + +TBearerFilterArray filter; + +settings->RunApplicationSettingsL( userSelection, + listedItems, + filter ); + CleanupStack::PopAndDestroy( settings ); + +switch ( userSelection.iResult ) + { + case EDestination: + { + TConnSnapPref prefs; + prefs.SetSnap( userSelection.iId ); + + iConnection.Start( prefs, iStatus ); + break; + } + case EConnectionMethod: + { + TCommDbConnPref prefs; + prefs.SetIapId( userSelection.iId ); + prefs.SetDialogPreference( ECommDbDialogPrefDoNotPrompt ); + + iConnection.Start( prefs, iStatus ); + break; + } + case EDefaultConnection: + { +iConnection.Start( iStatus ); + break; + } + default: // EAlwaysAsk + { + TCommDbConnPref prefs; + prefs.SetDialogPreference( ECommDbDialogPrefPrompt ); + + iConnection.Start( prefs, iStatus ); + } + } +SetActive(); +
\ No newline at end of file