summaryrefslogtreecommitdiffstats
path: root/src/libs/installer/downloadfiletask.h
diff options
context:
space:
mode:
authorkh <karsten.heimrich@theqtcompany.com>2014-11-25 12:21:33 +0100
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2014-11-26 14:48:53 +0100
commitd18b9696e573aa7b3f38784f6c5764b9fe6fd81b (patch)
treeb322cefe545a6425a0d87c7ef191fcda973fbb98 /src/libs/installer/downloadfiletask.h
parentd81176d2dd3b03cc6a2f9d69e1fd1e90832a0374 (diff)
Implement server authentication and updating repository credentials.
Task-number: QTIFW-570 Change-Id: I7b6b1fab8279331e5cb4b4da86726322b44a1109 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Diffstat (limited to 'src/libs/installer/downloadfiletask.h')
-rw-r--r--src/libs/installer/downloadfiletask.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/libs/installer/downloadfiletask.h b/src/libs/installer/downloadfiletask.h
index c9f7281da..e11c86ae6 100644
--- a/src/libs/installer/downloadfiletask.h
+++ b/src/libs/installer/downloadfiletask.h
@@ -50,20 +50,33 @@ enum
};
}
-class ProxyAuthenticationRequiredException : public TaskException
+class AuthenticationRequiredException : public TaskException
{
public:
- ProxyAuthenticationRequiredException(const QNetworkProxy &proxy);
- ~ProxyAuthenticationRequiredException() throw() {}
+ enum struct Type {
+ Proxy,
+ Server
+ };
+
+ explicit AuthenticationRequiredException(Type type, const QString &message);
+ ~AuthenticationRequiredException() throw() {}
+
+ Type type() const { return m_type; }
QNetworkProxy proxy() const { return m_proxy; }
+ void setProxy(const QNetworkProxy &proxy) { m_proxy = proxy; }
+
+ FileTaskItem taskItem() const { return m_fileTaskItem; }
+ void setFileTaskItem(const FileTaskItem &item) { m_fileTaskItem = item; }
void raise() const { throw *this; }
- ProxyAuthenticationRequiredException *clone() const {
- return new ProxyAuthenticationRequiredException(*this); }
+ AuthenticationRequiredException *clone() const {
+ return new AuthenticationRequiredException(*this); }
private:
+ Type m_type;
QNetworkProxy m_proxy;
+ FileTaskItem m_fileTaskItem;
};
class INSTALLER_EXPORT DownloadFileTask : public AbstractFileTask