Prompting the User to Select a Destination Network

If there is no connection specified in the connection setup and no default connection has been defined, your application can prompt the user to select the connection.

Context

To prompt the user select the destination network:

Steps

  1. Start the connection with RConnection::Start(ECommDbDialogPrefPrompt). RConnection handle is returned to the application.

  2. The user makes a selection. A destination network is the preferred selection, but the user can also select a specific access point with this dialog.

  3. Link layer is now ready for the application.

  4. Send NewL(RConnection handle, MMobilityProtocolResp(). The application can now use the mobility API, but if the user selected an access point 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.

Example

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 );