#include <clientmedia.h>
Public Member Functions | |
| virtual bool | isStarted () const =0 |
| virtual bool | isDone () const =0 |
| virtual void | addFile (const std::string &name, const std::string &sha1)=0 |
| virtual void | addRemoteServer (const std::string &baseurl)=0 |
| virtual void | step (Client *client)=0 |
| virtual bool | conventionalTransferDone (const std::string &name, const std::string &data, Client *client)=0 |
Protected Member Functions | |
| IClientMediaDownloader () | |
| virtual | ~IClientMediaDownloader ()=default |
| virtual bool | loadMedia (Client *client, const std::string &data, const std::string &name)=0 |
| bool | tryLoadFromCache (const std::string &name, const std::string &sha1, Client *client) |
| bool | checkAndLoad (const std::string &name, const std::string &sha1, const std::string &data, bool is_from_cache, Client *client) |
Protected Attributes | |
| FileCache | m_media_cache |
| bool | m_write_to_cache |
|
protected |
References getMediaCacheDir(), m_media_cache, and m_write_to_cache.
Referenced by ~IClientMediaDownloader(), and conventionalTransferDone().
|
protectedvirtualdefault |
|
pure virtual |
Implemented in ClientMediaDownloader, and SingleMediaDownloader.
References addFile().
Referenced by addFile().
|
pure virtual |
Implemented in ClientMediaDownloader, and SingleMediaDownloader.
References addRemoteServer().
Referenced by addRemoteServer().
|
protected |
References hex_encode(), infostream, loadMedia(), m_media_cache, m_write_to_cache, hashing::sha1(), and verbosestream.
Referenced by ClientMediaDownloader::conventionalTransferDone(), SingleMediaDownloader::conventionalTransferDone(), loadMedia(), ClientMediaDownloader::remoteMediaReceived(), SingleMediaDownloader::remoteMediaReceived(), and tryLoadFromCache().
|
pure virtual |
Implemented in ClientMediaDownloader, and SingleMediaDownloader.
References IClientMediaDownloader(), and conventionalTransferDone().
Referenced by conventionalTransferDone().
|
pure virtual |
Implemented in ClientMediaDownloader, and SingleMediaDownloader.
References isDone().
Referenced by isDone().
|
pure virtual |
Implemented in ClientMediaDownloader, and SingleMediaDownloader.
References isStarted().
Referenced by isStarted().
|
protectedpure virtual |
Implemented in ClientMediaDownloader, and SingleMediaDownloader.
References checkAndLoad(), loadMedia(), and tryLoadFromCache().
Referenced by checkAndLoad(), and loadMedia().
|
pure virtual |
Implemented in ClientMediaDownloader, and SingleMediaDownloader.
References step().
Referenced by step().
|
protected |
References checkAndLoad(), hex_encode(), and m_media_cache.
Referenced by ClientMediaDownloader::initialStep(), SingleMediaDownloader::initialStep(), and loadMedia().
|
protected |
Referenced by IClientMediaDownloader(), checkAndLoad(), and tryLoadFromCache().
|
protected |
Referenced by IClientMediaDownloader(), SingleMediaDownloader::SingleMediaDownloader(), and checkAndLoad().