Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Preferred API for creating an Internet connection

From Wiki
Jump to: navigation, search
Article Metadata
Platform(s): S60 1st Edition
S60 2nd Edition
S60 2nd Edition (initial release)
S60 1st Edition
Created: User:Technical writer 2 (04 Feb 2003)
Last edited: hamishwillee (10 Jul 2013)


Preferred API for creating an Internet connection


The preferred method to create an Internet connection is to do it with the Internet Connection Initiator API. The header file is Intconninit.h and the library Intconninit.lib. Below is an example of how to use it. It can also be used without a preferred connection. In practice, you may have to create an active object to control the connection initialization.

CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref1;
CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref pref2;
//--- First preference ----
pref1.iRanking = 1;
pref1.iDirection = ECommDbConnectionDirectionOutgoing;
pref1.iDialogPref = ECommDbDialogPrefDoNotPrompt;
CCommsDbConnectionPrefTableView::TCommDbIapBeare bearer1;
bearer1.iBearerSet = ECommDbBearerGPRS;
bearer1.iIapId = 0x01;
pref1.iBearer = bearer1;
//---Second preference ---
pref2.iRanking = 2;
pref2.iDirection = ECommDbConnectionDirectionOutgoing;
pref2.iDialogPref = ECommDbDialogPrefDoNotPrompt;
CCommsDbConnectionPrefTableView::TCommDbIapBearer bearer2;
bearer2.iBearerSet = ECommDbBearerCSD;
bearer2.iIapId = 0x04;
pref2.iBearer = bearer2;
//---Call Initiator---
TRequestStatus status(KRequestPending);
CIntConnectionInitiator* initConn = CIntConnectionInitiator::NewL();
initConn->ConnectL(pref1, pref2, status);
This page was last modified on 10 July 2013, at 10:21.
42 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.