×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2011
    Posts
    28

    [moved] web access using access point wlan

    I have a access point created. I want to get access web through the access point.
    Here is the code for establish connection with wlan access point, taken from a application which tested my device E-51 and it works successfully
    Code:
    // ----------------------------------------------------------------------------
    //  CWLanSampleExAppUi::EstablishConnectionL()
    //  Establishes WLAN connection with the last wlan access point from the access point list
    void CWLanSampleExAppUi::EstablishConnectionL()
    	{
    	// establishes iConnection with the last wlan access point.
    	// It also lists all the available access point
    	TUint32 accessPoint(0);
    	CCommsDatabase* commDB = CCommsDatabase::NewL(EDatabaseTypeIAP);
    	CleanupStack::PushL(commDB);
    	CApSelect * iSelect =CApSelect::NewLC(*commDB,KEApIspTypeAll,EApBearerTypeWLAN,KEApSortUidAscending);
    	TBuf<50> iName;
    	TBool move = iSelect->MoveToFirst();
    	TInt icount = 0;
    	while(icount<iSelect->Count())
    		{
    		if(move==TRUE) 
    			{
    			iName =iSelect->Name();
    			accessPoint=iSelect->Uid();
    			
    			}
    		move = iSelect->MoveNext();
    		icount=icount+1;
    		}
    	CEikonEnv::InfoWinL(_L("Using"),iName);	 
    	User::LeaveIfError(iServer.Connect(KESockDefaultMessageSlots));
    	User::LeaveIfError(iConnection.Open(iServer, KConnectionTypeDefault));
    	TCommDbConnPref prefs;
    	prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
    	prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
    	prefs.SetIapId(accessPoint);
    	User::LeaveIfError(iConnection.Start(prefs));
    	iConnState = ETrue;
    	CleanupStack::PopAndDestroy(2);
    	}

    Following code is taken from webclient application in s60 3rd edition example to access web. I want it should get web from wlan access point. Please give suggestion how to access througn wlan access point
    Code:
    // CWebClientEngine::IssueHTTPGetL()
    // Start a new HTTP GET transaction.
    // ----------------------------------------------------------------------------
    //  RHTTPSession            iSession;
    //  RHTTPTransaction        iTransaction;
    // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // // 
    void CWebClientEngine::IssueHTTPGetL( const TDesC8& aUri )
        {
        // Parse string to URI (as defined in RFC2396)
        TUriParser8 uri;
        uri.Parse( aUri );
    
        // Get request method string for HTTP GET
        RStringF method = iSession.StringPool().StringF( HTTP::EGET,
            RHTTPSession::GetTable());
    
        // Open transaction with previous method and parsed uri. This class will
        // receive transaction events in MHFRunL and MHFRunError.
        iTransaction = iSession.OpenTransactionL( uri, *this, method );
    
        // Set headers for request; user agent and accepted content type
        RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
        SetHeaderL( hdr, HTTP::EUserAgent, KUserAgent );
        SetHeaderL( hdr, HTTP::EAccept, KAccept );
    
        // Submit the transaction. After this the framework will give transaction
        // events via MHFRunL and MHFRunError.
        iTransaction.SubmitL();
    
        iRunning = ETrue;
    
        // Load a string from the resource file 
        HBufC* textResource = StringLoader::LoadLC( R_WEBCLIENT_CONNECTING );
        iObserver.ClientEvent( *textResource );
        CleanupStack::PopAndDestroy( textResource );
        }

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: web access using access point wlan

    Your question is not clear, but are you looking for TSS000203 - Using the HTTP Client API with RConnection ?
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. Replies: 0
    Last Post: 2010-03-20, 11:36
  2. Replies: 0
    Last Post: 2009-04-29, 12:47
  3. Replies: 0
    Last Post: 2009-04-29, 12:45
  4. How can I create a WLAN access point without using standart AP-selecting dialog 2009
    By olkazmin in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2009-03-25, 07:05
  5. Using S60 device as WLAN access point?
    By PawelDefee in forum Symbian Networking & Messaging (Closed)
    Replies: 5
    Last Post: 2008-02-07, 11:51

Posting Permissions

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