2010-05-29 11:33:04 +00:00
|
|
|
#ifndef WEBMULTIMEDIADOWNLOAD_HH
|
|
|
|
#define WEBMULTIMEDIADOWNLOAD_HH
|
|
|
|
|
2023-04-17 20:55:34 +00:00
|
|
|
#include "dict/dictionary.hh"
|
2010-05-29 11:33:04 +00:00
|
|
|
#include <QtNetwork>
|
|
|
|
|
|
|
|
namespace Dictionary {
|
|
|
|
|
|
|
|
/// Downloads data from the web, wrapped as a dictionary's DataRequest. This
|
|
|
|
/// is useful for multimedia files, like sounds and pronunciations.
|
|
|
|
class WebMultimediaDownload: public DataRequest
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2013-05-08 14:50:06 +00:00
|
|
|
QNetworkReply * reply;
|
2017-03-13 14:40:19 +00:00
|
|
|
QNetworkAccessManager & mgr;
|
|
|
|
int redirectCount;
|
2010-05-29 11:33:04 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
WebMultimediaDownload( QUrl const &, QNetworkAccessManager & );
|
|
|
|
|
|
|
|
virtual void cancel();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
void replyFinished( QNetworkReply * );
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Dictionary
|
|
|
|
|
|
|
|
#endif // WEBMULTIMEDIADOWNLOAD_HH
|