OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
16 */ | 16 */ |
17 | 17 |
18 #ifndef ADBLOCK_PLUS_WEB_REQUEST_H | 18 #ifndef ADBLOCK_PLUS_WEB_REQUEST_H |
19 #define ADBLOCK_PLUS_WEB_REQUEST_H | 19 #define ADBLOCK_PLUS_WEB_REQUEST_H |
20 | 20 |
| 21 #include <memory> |
21 #include <stdint.h> | 22 #include <stdint.h> |
22 #include <string> | 23 #include <string> |
23 #include <vector> | 24 #include <vector> |
24 | 25 |
25 #include "tr1_memory.h" | |
26 | |
27 namespace AdblockPlus | 26 namespace AdblockPlus |
28 { | 27 { |
29 typedef std::vector<std::pair<std::string, std::string> > HeaderList; | 28 typedef std::vector<std::pair<std::string, std::string> > HeaderList; |
30 | 29 |
31 struct ServerResponse | 30 struct ServerResponse |
32 { | 31 { |
33 #ifdef _WIN32 | 32 #ifdef _WIN32 |
34 __int64 status; | 33 __int64 status; |
35 #else | 34 #else |
36 int64_t status; | 35 int64_t status; |
(...skipping 23 matching lines...) Expand all Loading... |
60 NS_ERROR_NET_INTERRUPT = 0x804b0047, | 59 NS_ERROR_NET_INTERRUPT = 0x804b0047, |
61 NS_ERROR_UNKNOWN_PROXY_CONNECTION_REFUSED = 0x804b0048, | 60 NS_ERROR_UNKNOWN_PROXY_CONNECTION_REFUSED = 0x804b0048, |
62 NS_CUSTOM_ERROR_BASE = 0x80850000, | 61 NS_CUSTOM_ERROR_BASE = 0x80850000, |
63 NS_ERROR_NOT_INITIALIZED = 0xc1f30001 | 62 NS_ERROR_NOT_INITIALIZED = 0xc1f30001 |
64 }; | 63 }; |
65 | 64 |
66 virtual inline ~WebRequest() {}; | 65 virtual inline ~WebRequest() {}; |
67 virtual ServerResponse GET(const std::string& url, const HeaderList& request
Headers) const = 0; | 66 virtual ServerResponse GET(const std::string& url, const HeaderList& request
Headers) const = 0; |
68 }; | 67 }; |
69 | 68 |
70 typedef std::tr1::shared_ptr<WebRequest> WebRequestPtr; | 69 typedef std::shared_ptr<WebRequest> WebRequestPtr; |
71 } | 70 } |
72 | 71 |
73 #endif | 72 #endif |
OLD | NEW |