diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-04-30 15:15:02 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-05-13 11:18:31 +0000 |
commit | 3b585086049089224422e6f839485be5a4235524 (patch) | |
tree | 51de03f5a29a16b0fa4909346a63cbeaf2122d5b /src/core/url_request_custom_job.h | |
parent | 78de547bc25b708000f6ee725be8cbde7c373d4f (diff) |
Add redirect and error API for custom URL
Adds API for failing or redirecting custom URL requests.
Change-Id: Ia633bff2c0b8484fd6fdb8d42982fda2e427db4c
Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
Diffstat (limited to 'src/core/url_request_custom_job.h')
-rw-r--r-- | src/core/url_request_custom_job.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/url_request_custom_job.h b/src/core/url_request_custom_job.h index ca20c719d..4975e71d2 100644 --- a/src/core/url_request_custom_job.h +++ b/src/core/url_request_custom_job.h @@ -60,18 +60,22 @@ public: virtual bool ReadRawData(net::IOBuffer *buf, int bufSize, int *bytesRead) Q_DECL_OVERRIDE; virtual bool GetMimeType(std::string *mimeType) const Q_DECL_OVERRIDE; virtual bool GetCharset(std::string *charset) Q_DECL_OVERRIDE; + virtual bool IsRedirectResponse(GURL* location, int* http_status_code) Q_DECL_OVERRIDE; void setReplyMimeType(const std::string &); void setReplyCharset(const std::string &); void setReplyDevice(QIODevice *); + void redirect(const GURL &url); void fail(int); + void abort(); protected: virtual ~URLRequestCustomJob(); void startAsync(); void notifyStarted(); void notifyFailure(); + void notifyCanceled(); private: QMutex m_mutex; @@ -81,6 +85,7 @@ private: std::string m_mimeType; std::string m_charset; int m_error; + GURL m_redirect; bool m_started; base::WeakPtrFactory<URLRequestCustomJob> m_weakFactory; |