Reduce number of DownloadManager signals

This commit is contained in:
Vladimir Golovnev (Glassez)
2019-03-01 10:38:16 +03:00
parent 0f1fc7be9d
commit 6cb15706f5
26 changed files with 317 additions and 337 deletions

View File

@@ -64,15 +64,28 @@ namespace Net
bool saveToFile() const;
DownloadRequest &saveToFile(bool value);
bool handleRedirectToMagnet() const;
DownloadRequest &handleRedirectToMagnet(bool value);
private:
QString m_url;
QString m_userAgent;
qint64 m_limit = 0;
bool m_saveToFile = false;
bool m_handleRedirectToMagnet = false;
};
enum class DownloadStatus
{
Success,
RedirectedToMagnet,
Failed
};
struct DownloadResult
{
QString url;
DownloadStatus status;
QString errorString;
QByteArray data;
QString filePath;
QString magnet;
};
struct ServiceID