summaryrefslogtreecommitdiffstats
path: root/src/core/browser_context_adapter_client.h
diff options
context:
space:
mode:
authorViktor Engelmann <viktor.engelmann@qt.io>2016-11-14 16:35:09 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2016-12-07 09:48:24 +0000
commit6644981dfde2ad24186156d5c31a74c686b5557a (patch)
tree3b732a9a2749a9b4469bea9d98dbc4746a099ebc /src/core/browser_context_adapter_client.h
parent3d000cfc013158f56c0b088c9ee99b03938ef50b (diff)
Add DownloadInterruptReason to Q(Quick)WebEngineDownloadItem
Add enum DownloadInterruptReason to BrowserContextAdapterClient, QWebEngineDownloadItem and QQuickWebEngineDownloadItem. Also add corresponding attributes to BrowserContextAdapterClient::DownloadItemInfo, QWebEngineDownloadItemPrivate and QQuickWebEngineDownloadItemPrivate as well as getters in QWebEngineDownloadItem and QQuickWebEngineDownloadItem and interruptReasonChanged signals. Task-number: QTBUG-56839 Change-Id: I937c14ba0b0884b14ae18ba297024b76dde62605 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/core/browser_context_adapter_client.h')
-rw-r--r--src/core/browser_context_adapter_client.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/core/browser_context_adapter_client.h b/src/core/browser_context_adapter_client.h
index faba08591..1eabbe7a0 100644
--- a/src/core/browser_context_adapter_client.h
+++ b/src/core/browser_context_adapter_client.h
@@ -76,6 +76,36 @@ public:
SavePage
};
+ enum DownloadInterruptReason {
+ NoReason = 0,
+ FileFailed = 1,
+ FileAccessDenied = 2,
+ FileNoSpace = 3,
+ FileNameTooLong = 5,
+ FileTooLarge = 6,
+ FileVirusInfected = 7,
+ FileTransientError = 10,
+ FileBlocked = 11,
+ FileSecurityCheckFailed = 12,
+ FileTooShort = 13,
+ FileHashMismatch = 14,
+ NetworkFailed = 20,
+ NetworkTimeout = 21,
+ NetworkDisconnected = 22,
+ NetworkServerDown = 23,
+ NetworkInvalidRequest = 24,
+ ServerFailed = 30,
+ //ServerNoRange = 31,
+ ServerBadContent = 33,
+ ServerUnauthorized = 34,
+ ServerCertProblem = 35,
+ ServerForbidden = 36,
+ ServerUnreachable = 37,
+ UserCanceled = 40,
+ //UserShutdown = 41,
+ //Crash = 50
+ };
+
struct DownloadItemInfo {
const quint32 id;
const QUrl url;
@@ -88,6 +118,7 @@ public:
int savePageFormat;
bool accepted;
int downloadType;
+ int downloadInterruptReason;
};
virtual ~BrowserContextAdapterClient() { }