#include <MAUtil/Downloader.h>
Inheritance diagram for MAUtil::Downloader:

Public Member Functions | |
| Downloader () | |
| virtual | ~Downloader () |
| void | addDownloadListener (DownloadListener *dl) |
| void | removeDownloadListener (DownloadListener *dl) |
| virtual int | beginDownloading (const char *url, MAHandle placeholder=0) |
| virtual void | cancelDownloading () |
| bool | isDownloading () const |
| virtual void | connectFinished (Connection *conn, int result) __attribute__((noreturn)) |
| virtual void | connWriteFinished (Connection *conn, int result) __attribute__((noreturn)) |
| virtual void | connReadFinished (Connection *conn, int result) __attribute__((noreturn)) |
Protected Member Functions | |
| virtual MAHandle | getHandle () |
| void | fireFinishedDownloading (MAHandle data) |
| void | fireError (int code) |
| void | connRecvFinished (Connection *conn, int result) |
| virtual void | httpFinished (HttpConnection *http, int result) |
Protected Attributes | |
| HttpConnection * | mConn |
| bool | mIsDownloading |
| bool | mUserData |
| MAHandle | mData |
| int | mDataOffset |
| int | mContentLength |
| Vector< DownloadListener * > | mDownloadListeners |
|
|
The constructor. |
|
|
The destructor. |
|
|
Function to register a DownloadListener, to which all events for this Downloader is distributed.
|
|
|
|
|
||||||||||||
|
Function to begin downloading a file.
Reimplemented in MAUtil::ImageDownloader, and MAUtil::AudioDownloader. |
|
|
Function to cancel the current download. Reimplemented in MAUtil::ImageDownloader. |
|
|
Function to retrieve if the Downloader is currently downloading something.
|
|
|
Reimplemented in MAUtil::ImageDownloader. |
|
|
|
|
|
|
|
||||||||||||
|
Called when a recv operation finishes.
Reimplemented from MAUtil::ConnectionListener. |
|
||||||||||||
|
Called when a finish operation is done.
Implements MAUtil::HttpConnectionListener. Reimplemented in MAUtil::AudioDownloader. |
|
||||||||||||
|
Called when a connect operation finishes.
|
|
||||||||||||
|
Called when a write operation finishes. |
|
||||||||||||
|
Called when a read operation finishes. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.6-NO