×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    37

    Setting the default Acess Point results in error

    Hello,

    I have an app that uses HTTP transaction APIs to contact a server.Suppose I set the default connection as an option that is not set(for ex WAP Services) then RConnection::Start completes with -1(as expected).

    In the RunL I am using CCmApplicationSettingsUi so that if I get an error while initial connection, a prompt is thrown to the user to select the available APs, though the connection succeeds after user selects a proper AP, MHFRunL completes with EUnrecoverableError and then EFailed.

    If I have set the default connection as an AP that is available then there is no issue and everything works as expected.

    Below is my RunL

    void CHttpEngine::RunL()
    {
    TInt statusCode = iStatus.Int();

    qDebug()<<"Status code"<<statusCode;
    if (!iConnectionSetupDone && statusCode == KErrNone)
    {
    // Connection done ok
    iConnectionSetupDone = ETrue;
    // Start selected HTTP action
    switch (iEngineState)
    {
    case EIdle:
    {
    CancelTransaction();
    break;
    }
    case EGet:
    {
    DoHTTPGetL();
    break;
    }
    case EPost:
    {
    DoHTTPPostL();
    break;
    }
    };
    }
    else if(statusCode != KErrNone)
    {
    if(failed )
    {
    failed = false;
    emit qPtr->failed();
    }

    // Default connection failed , try with user input.
    TCmSettingSelection userSelection;
    CCmApplicationSettingsUi* settings = CCmApplicationSettingsUi::NewL();
    CleanupStack::PushL(settings);
    TUint listedItems = CMManager::EShowAlwaysAsk |
    CMManager::EShowDefaultConnection |
    CMManager::EShowDestinations |
    CMManager::EShowConnectionMethods;
    TBearerFilterArray filter;
    TBool selected = settings->RunApplicationSettingsL(userSelection,listedItems,filter);
    CleanupStack::PopAndDestroy(settings);
    failed = true;

    // Check selection
    if (selected)
    {
    switch (userSelection.iResult)
    {
    case CMManager::EDestination:
    {
    TConnSnapPref prefs;
    prefs.SetSnap(userSelection.iId);
    iConnection.Start(prefs, iStatus);
    break;
    }
    case CMManager::EConnectionMethod:
    {
    TCommDbConnPref prefs;
    prefs.SetIapId(userSelection.iId);
    prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    iConnection.Start(prefs, iStatus);
    break;
    }
    case CMManager::EDefaultConnection:
    {
    iConnection.Start(iStatus);
    break;
    }
    default: // EAlwaysAsk
    {
    TCommDbConnPref prefs;
    prefs.SetDialogPreference(ECommDbDialogPrefPrompt);
    iConnection.Start(prefs, iStatus);
    }
    }
    SetActive();
    }
    else
    emit qPtr->failed();
    }
    }

  2. #2
    Registered User
    Join Date
    Feb 2011
    Posts
    37

    Re: Setting the default Acess Point results in error

    This got resolved.

    Thanks

Similar Threads

  1. Using the default Acess Point Settings
    By airwatch in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2012-07-19, 11:26
  2. How to add/delete/modify acess point?
    By chensu0526 in forum Nokia N9
    Replies: 4
    Last Post: 2010-11-12, 09:07
  3. Acess Point Selection Custom List for Wifi Acess Point
    By murthy.pramod in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-12-09, 07:15
  4. UI part of default acess points
    By coxcom in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2006-04-06, 04:52
  5. Yet another "setting default access point" question -N70
    By alphanet in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-01-12, 18:49

Posting Permissions

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