×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Download file using GPRS & WLAN on SDK 3.0

    Hi,

    I make symbian program on SDK 3.0 to download file from internet using GPRS & WLAN.
    I thought the program for both are the same, because it's only depend on access point we selected.
    But in fact, I can only download via WLAN.
    Why ?
    Am I have something missing in my program ?

    And why I can only download file using IP, like this : http://203.92.81.../test/test.jpg ?
    I can't download file using url, like this : http://ronny.mytest.com/test/test.jpg

    Here is my "IssueHTTPGetL" function :
    void CHttpEngine::IssueHTTPGetL(TInt aSize,const TDesC8& aUri)
    {
    if(iSessionOpen)
    {
    TUriParser8 uri;
    uri.Parse(aUri);

    RStringF method = iSession.StringPool().StringF(HTTP::EGET,
    RHTTPSession::GetTable());

    iTransaction = iSession.OpenTransactionL(uri, *this, method);

    RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
    SetHeaderL(hdr, HTTP::EHost, GetHost(aUri) );
    SetHeaderL(hdr, HTTP::EAccept, _L8("*/*"));
    SetHeaderL(hdr, HTTP::EUserAgent, _L8("WebClient 1.0"));
    SetHeaderL(hdr, HTTP::EConnection, _L8("Close") );
    SetHeaderL(hdr, HTTP::ECacheControl, _L8("No-Cache"));

    TBuf8<50> tempbuf8;
    tempbuf8.Append(_L8("bytes="));
    tempbuf8.AppendNum(aSize);
    tempbuf8.Append(_L8("-"));
    SetHeaderL(hdr, HTTP::ERange, tempbuf8);

    iTransaction.SubmitL();

    iRunning = ETrue;
    iObserver.HttpEngineEvent(MHttpEngineObserver::ECEConnecting);
    iTimerTool->Stop();
    iTimerTool->Start( 60000000 );
    }
    else CEikonEnv::Static()->AlertWin( _L("session error") );
    }

    Please help...

    Regards,
    Ronny

  2. #2
    Registered User
    Join Date
    Aug 2006
    Location
    London
    Posts
    22

    Re: Download file using GPRS & WLAN on SDK 3.0

    Hi Ronny,
    I'm having a problem similar to you...
    In your post you say:
    And why I can only download file using IP, like this : http://203.92.81.../test/test.jpg ?
    I can't download file using url, like this : http://ronny.mytest.com/test/test.jpg

    how do you initially set aUri to be equal to your http address?

    Paul

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    52

    Re: Download file using GPRS & WLAN on SDK 3.0

    Hi Paul,

    This is the way I call IssueHTTPGetL function :
    iEngine->IssueHTTPGetL(0,_L8("http://203.92.81.../test/test.jpg"));

    Does anyone can help our problem ?

    Regards,
    Ronny

Similar Threads

  1. Can't Download SDK 3.0
    By tanhockguan in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2006-05-02, 17:21
  2. Series 40 - http download of parts of file not possible ?
    By sankotm in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-07-27, 12:35
  3. File Associations and OMA download
    By nicktest in forum Digital Rights Management & Content Downloading
    Replies: 1
    Last Post: 2003-10-21, 15:38
  4. Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug?
    By kauppi in forum Mobile Java Tools & SDKs
    Replies: 3
    Last Post: 2003-04-07, 09:05

Posting Permissions

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