×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    2

    selecting access point by code

    selecting access point by code:

    I am connecting to the internet using sockets. Whe I call the connect method on the rocket class it gives me a set of options to choose from for teh access point. these are:
    selecting access point:
    MMS
    T-Mobile Internet
    T-Mobile VPN
    T-zones

    I want to select T-Mobile Internet. can i do this by code, instead of the phone giving me this menu every time to select the access point physically

    thank you,

    Gaurav Jain

  2. #2
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    Access points can be accessed through these classes:
    CCommsDatabase
    CCommsDbConnectionPrefTableView
    CCommDbOverrideSettings

    I also believe that there is an example about IAP somewhere around...

  3. #3
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,

    this peace of code shows the access point dialog - the prefered acces point could be hardcoded if you dont want to allow selection:

    void CIAPConnection::ConnectL()
    {
    if (!IsActive())
    {
    if ( ( iState != EConnected ) && ( iState != EConnecting ) )
    {
    // Set connection preferences. Preference can use specific IAP
    // id and if it is known. Withoust setting preference it falls
    // on device on emulator it works fine
    iPref.iRanking = 1;
    iPref.iDirection = ECommDbConnectionDirectionOutgoing;
    iPref.iDialogPref = ECommDbDialogPrefPrompt;

    // set bearer ( IAP or 'H'CSD )
    CCommsDbConnectionPrefTableView::TCommDbIapBearer bearer;
    bearer.iBearerSet = ECommDbBearerUnknown;
    bearer.iIapId = KUndefinedIAPid;
    iPref.iBearer = bearer;

    // connect ( displays IAP combo box dialog )
    iState = EConnecting;
    iStatus = KRequestPending;
    iConnection->ConnectL( iPref, iStatus );
    SetActive();
    }
    }
    }



    where used variables are those types:

    /// parameters of connection
    CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref iPref;
    /// connection initiator
    CIntConnectionInitiator* iConnection;
    Note also that iConnection->ConnectL(...) method is asynchronous so RunL() will be called after completion so CIAPConnection must be dervived from CActive...
    Bye
    STeN

  4. #4
    Super Contributor
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi again,
    note also, that similar problem was solved before on this forum:

    1) Bypassing IAP pop-up for HTTP Client API connection:
    http://discussion.forum.nokia.com/fo...ight=%2AIAP%2A


    Also searching fro 'IAP' keyword in the forum founds couple of similar threads.
    Bye
    STeN
    Last edited by stenlik; 2004-11-09 at 04:58.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×