Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include/AdblockPlus/WebRequest.h

Issue 29428650: Issue 5180 - introduce asynchronous web request (Closed) Base URL: https://github.com/adblockplus/libadblockplus.git
Patch Set: Created May 3, 2017, 2:21 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | libadblockplus.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/AdblockPlus/WebRequest.h
diff --git a/include/AdblockPlus/WebRequest.h b/include/AdblockPlus/WebRequest.h
index 9eae7e4e7d36f6ea96559fac9315acaee5a5ffc9..a98ab092d1d1f3d7e90a03d6c6551429c7955f9d 100644
--- a/include/AdblockPlus/WebRequest.h
+++ b/include/AdblockPlus/WebRequest.h
@@ -18,82 +18,16 @@
#ifndef ADBLOCK_PLUS_WEB_REQUEST_H
#define ADBLOCK_PLUS_WEB_REQUEST_H
-#include <memory>
-#include <stdint.h>
-#include <string>
-#include <vector>
+#include "IWebRequest.h"
namespace AdblockPlus
{
/**
- * List of HTTP headers.
- */
- typedef std::vector<std::pair<std::string, std::string> > HeaderList;
-
- /**
- * HTTP response.
- */
- struct ServerResponse
- {
- //@{
- /**
- * [Mozilla status code](https://developer.mozilla.org/en/docs/Table_Of_Errors#Network_Errors)
- * indicating the network-level request status.
- * This should be 0 (NS_OK) if the request succeeded. Note that this should
- * be NS_OK if the server responded with an error code like "404 Not Found".
- */
-#ifdef _WIN32
- __int64 status;
-#else
- int64_t status;
-#endif
- //@}
-
- /**
- * List of response headers.
- */
- HeaderList responseHeaders;
-
- /**
- * HTTP status of the response (e.g.\ 404).
- */
- int responseStatus;
-
- /**
- * Body text of the response.
- */
- std::string responseText;
- };
-
- /**
* Web request interface.
*/
class WebRequest
{
public:
- /**
- * Possible [Mozilla status codes](https://developer.mozilla.org/en/docs/Table_Of_Errors#Network_Errors).
- */
- enum
- {
- NS_OK = 0,
- NS_ERROR_FAILURE = 0x80004005,
- NS_ERROR_OUT_OF_MEMORY = 0x8007000e,
- NS_ERROR_MALFORMED_URI = 0x804b000a,
- NS_ERROR_CONNECTION_REFUSED = 0x804b000d,
- NS_ERROR_NET_TIMEOUT = 0x804b000e,
- NS_ERROR_NO_CONTENT = 0x804b0011,
- NS_ERROR_UNKNOWN_PROTOCOL = 0x804b0012,
- NS_ERROR_NET_RESET = 0x804b0014,
- NS_ERROR_UNKNOWN_HOST = 0x804b001e,
- NS_ERROR_REDIRECT_LOOP = 0x804b001f,
- NS_ERROR_UNKNOWN_PROXY_HOST = 0x804b002a,
- NS_ERROR_NET_INTERRUPT = 0x804b0047,
- NS_ERROR_UNKNOWN_PROXY_CONNECTION_REFUSED = 0x804b0048,
- NS_CUSTOM_ERROR_BASE = 0x80850000,
- NS_ERROR_NOT_INITIALIZED = 0xc1f30001
- };
-
virtual inline ~WebRequest() {};
/**
« no previous file with comments | « include/AdblockPlus/JsEngine.h ('k') | libadblockplus.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld