×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    61

    Red face How to save data downloaded using RHttpDownload class

    Hi all

    I need some help on usage of RHttpDownload class. At the moment I use instance of RhttpDownloadMgr class to create an instance of RHttpDownload class.

    Code:
    RHttpDownload& download=iDownloadMgr.CreateDownloadL((*pUrl),bResult);
    CleanupStack::PopAndDestroy(pUrl);
    if(!bResult) User::Leave(KErrAlreadyExists);
            
    User::LeaveIfError( 
    	download.SetIntAttribute( EDlAttrAction, EDoNothing) );
            
    User::LeaveIfError( download.Start() );
    I do get all the required notification when the download completes. Here is my HandleDMgrEventL callback function:

    Code:
    EXPORT_C void CFileDownloaderBase::HandleDMgrEventL( 
            RHttpDownload& aDownload, THttpDownloadEvent aEvent )
    {
        DPRINT(_L8("CFileDownloaderBase::HandleDMgrEventL - "
                "iDownloadState(%d),iProgressState(%d)"),
                aEvent.iDownloadState,aEvent.iProgressState);
        
        switch(aEvent.iDownloadState)
        {
        case EHttpDlPaused:
            if( aEvent.iProgressState==EHttpContentTypeReceived)
                aDownload.Start();
            break;
            
        case EHttpDlCompleted:
        {
            if( aEvent.iProgressState==EHttpProgNone)
            {
                TFileName filename(_L("c:\\system\temp\\tt.gif"));
                TInt error = aDownload.SetStringAttribute( 
                        EDlAttrDestFilename, filename );
                error = aDownload.Move();
            }
            
            break;
        } //end case EHttpDlCompleted:
        } //end switch(aEvent.iDownloadState)
    }
    My problem is although I get notification that the downloaded file has been moved I cannot find it in c:\\system\temp\ directory. Is there any other way of accessing downloaded data? Thanks a lot.

  2. #2
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: How to save data downloaded using RHttpDownload class

    Hi,

    Check the link. Hope this will help you.
    Use [URL="http://qt.nokia.com/products/qt-quick/"]Qt-Quick[/URL] to make your application UI more attractive.

    [URL="http://store.ovi.com/content/271896"]http://store.ovi.com/content/271896[/URL] | [URL="http://store.ovi.com/content/276199"]http://store.ovi.com/content/276199[/URL] |[URL="http://store.ovi.com/content/276202"] http://store.ovi.com/content/276202[/URL] | [URL="http://store.ovi.com/content/280827"]http://store.ovi.com/content/280827[/URL]

  3. #3
    Regular Contributor
    Join Date
    Jan 2009
    Posts
    61

    Re: How to save data downloaded using RHttpDownload class

    Hi - thanks for the link - I've already seen it by I don't want to use UI interface. I just want to download the file (gif image)if it exists and show to a user afterwards in my own user interface.

Similar Threads

  1. Save local data and update resources
    By jappit in forum Symbian
    Replies: 3
    Last Post: 2009-05-04, 16:59
  2. C++ Symbols class(), class()->,class. ????
    By PACALA_BA in forum Symbian
    Replies: 7
    Last Post: 2008-09-15, 20:57
  3. Save data
    By bobbrink in forum Mobile Java General
    Replies: 3
    Last Post: 2007-12-12, 23:06
  4. Problem occur in exit(app crash) after insert data in listbox and save it???
    By chandantheracer in forum Symbian User Interface
    Replies: 8
    Last Post: 2007-05-17, 08:40
  5. Can Class in DLL contain writeable static data
    By zhang_guoqing in forum Symbian
    Replies: 5
    Last Post: 2004-11-12, 04:17

Posting Permissions

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