X-Git-Url: https://git.sven.stormbind.net/?a=blobdiff_plain;f=downloadagent.h;fp=downloadagent.h;h=0000000000000000000000000000000000000000;hb=d483bd8e6523c23c6f1d8908a2e0611c2bc9ff4f;hp=929daffde3a968ba27765979c0653e2ff859d70b;hpb=7dfa3fe589d1722d49681f42cdb0bf1e6efb5223;p=sven%2Fvym.git diff --git a/downloadagent.h b/downloadagent.h deleted file mode 100644 index 929daff..0000000 --- a/downloadagent.h +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -QT_BEGIN_NAMESPACE -class QSslError; -QT_END_NAMESPACE - -QT_USE_NAMESPACE - -class VymModel; - -class DownloadAgent: public QObject -{ - Q_OBJECT - QNetworkAccessManager agent; - QList currentDownloads; - -public: - DownloadAgent(const QUrl &u); - QString getDestination (); - void setFinishedAction (VymModel *m, const QString &script); - QString getFinishedScript(); - uint getFinishedScriptModelID(); - void setUserAgent(const QString &s); - bool isSuccess(); - QString getResultMessage(); - void doDownload(const QUrl &url); - bool saveToDisk(const QString &filename, const QString &data); - -public slots: - void execute(); - void requestFinished(QNetworkReply *reply); - void sslErrors(const QList &errors); - -signals: - void downloadFinished(); - -private: - QTemporaryFile tmpFile; - QByteArray userAgent; - QUrl url; - - bool success; - QString resultMessage; - - QString finishedScript; - uint finishedScriptModelID; -}; -