×
Namespaces

Variants
Actions

Preferred API for creating an Internet connection

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

Overview

Preferred API for creating an Internet connection

Description

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();
CleanupStack::PushL(initConn);
initConn->ConnectL(pref1, pref2, status);
This page was last modified on 10 July 2013, at 13:21.
81 page views in the last 30 days.
×