If there is no connection specified in the connection setup (for more information, see Defining connection management items), and if no default connection has been defined, your application can prompt the user to select the connection.
To prompt the user select the destination network:
Start the connection with the RConnection::Start(ECommDbDialogPrefPrompt) prompting flag using the Connection Manager API.
RConnection handle is returned to the application.
The user makes a selection.
A destination network is the preferred selection, but the user can also select a specific IAP with this dialog.
Activate the connection with the Connection Manager API.
Link layer is now ready for the application.
Send NewL(RConnection handle, MMobilityProtocolResp&) to the Connection Manager API.
The application can now use the mobility API, but if the user selected an IAP this has no meaning, because roaming cannot be used.
For information on how to start the connection through a destination network, see Starting the connection through the destination network.
The following code snippet illustrates this process.
RSocketServ ss; // Connect to ESOCK ss.Connect(); // Open an RConnection object. Note that you must provide an RSocketServ object RConnection conn; conn.Open( ss ); // Create overrides TCommDbConnPref prefs; prefs.SetDialogPreference( ECommDbDialogPrefPrompt ); // Start an Outgoing Connection with overrides conn.Start( prefs );
When implementing connection dialogs in connection setup,
your application should set ECommDbDialogPrefPrompt in the connection preferences
in RConnection
::Start(). This causes the middleware
to trigger the UI dialog which supports both destination network and IAP selection.
You should check all the parts of the UI which deal with connections or IAPs and consider whether destination networks should be visible in addition or in place of the information that is currently shown to the user.
Connection Manager API (often referred to as RConnection API because Symbian does not collect APIs into similar logical entities as the S60 platform does) is a collection of Symbian's connection management-related functionalities provided by ESOCK. It contains several extensions and one of them is the mobility extension. The term "mobility API" actually refers to the mobility extensions that are part of Connection Manager API and defined in header cs_mobility_apiext.h. With the so-called mobility API the client application can register for mobility events, receive information about preferred connections, indicate whether to switch to a new connection or ignore it. In short, it enables ALR for the applications.
For more information on making IP connections, see Making an IP connection.
The S60 platform also offers the following related services:
Dialog and note components for notifying the mobile device user of network connections
Browsing and downloading for enabling content browsing and downloading services through your application
Secure Sockets API for adding authentication to an IP connection and encrypting the data that is transferred
Note: This API is provided by the Symbian OS.
HTTP Client API for using the HTTP protocol for communication over the Internet
Note: This API is provided by the Symbian OS.