File Downloader. More...

#include <rdownload.h>

Inheritance diagram for RDownloadFile:
Collaboration diagram for RDownloadFile:

Public Member Functions

 RDownloadFile (void)
void Download (const RURI &uri, const R::RURI &local)
- Public Member Functions inherited from RDownload
 RDownload (void)
void Download (const RURI &uri)
RString GetMIMEType (void)
virtual ~RDownload (void)

Private Member Functions

virtual size_t GetData (void *buffer, size_t size, size_t nmemb)

Private Attributes

FILE * Stream

Detailed Description

File Downloader.

The RDownloadFile class provides a session that will download content retrieved from URLs and storeit in a file.

Constructor & Destructor Documentation

RDownloadFile ( void  )

Download a document given by an URI and store it in a local file.

Member Function Documentation

void Download ( const RURI uri,
const R::RURI local 

Download a document given by an URI.

uriURI of the document.
localLocal file where to store.
virtual size_t GetData ( void *  buffer,
size_t  size,
size_t  nmemb 

Call each time a given amount of data is downloaded and store it in the file.

bufferPointer to the delivered data
sizeSize of an element downloaded.
nmembNumber of elements downloaded.
the number of bytes written in a file.

Reimplemented from RDownload.

Field Documentation

FILE* Stream

Stream that will store the file to download.