| LEFT | RIGHT |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 return false; | 300 return false; |
| 301 | 301 |
| 302 bool isWhitelisted; | 302 bool isWhitelisted; |
| 303 response >> isWhitelisted; | 303 response >> isWhitelisted; |
| 304 return isWhitelisted; | 304 return isWhitelisted; |
| 305 } | 305 } |
| 306 | 306 |
| 307 bool CAdblockPlusClient::Matches(const std::wstring& url, AdblockPlus::FilterEng
ine::ContentType contentType, const std::wstring& domain) | 307 bool CAdblockPlusClient::Matches(const std::wstring& url, AdblockPlus::FilterEng
ine::ContentType contentType, const std::wstring& domain) |
| 308 { | 308 { |
| 309 Communication::OutputBuffer request; | 309 Communication::OutputBuffer request; |
| 310 request << Communication::PROC_MATCHES << ToUtf8String(url) << contentType <<
ToUtf8String(domain); | 310 request << Communication::PROC_MATCHES << ToUtf8String(url) << static_cast<int
32_t>(contentType) << ToUtf8String(domain); |
| 311 | 311 |
| 312 Communication::InputBuffer response; | 312 Communication::InputBuffer response; |
| 313 if (!CallEngine(request, response)) | 313 if (!CallEngine(request, response)) |
| 314 return false; | 314 return false; |
| 315 | 315 |
| 316 bool match; | 316 bool match; |
| 317 response >> match; | 317 response >> match; |
| 318 return match; | 318 return match; |
| 319 } | 319 } |
| 320 | 320 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 DEBUG_GENERAL("CompareVersions"); | 566 DEBUG_GENERAL("CompareVersions"); |
| 567 Communication::OutputBuffer request; | 567 Communication::OutputBuffer request; |
| 568 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S
tring(v2); | 568 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S
tring(v2); |
| 569 Communication::InputBuffer response; | 569 Communication::InputBuffer response; |
| 570 if (!CallEngine(request, response)) | 570 if (!CallEngine(request, response)) |
| 571 return 0; | 571 return 0; |
| 572 int result; | 572 int result; |
| 573 response >> result; | 573 response >> result; |
| 574 return result; | 574 return result; |
| 575 } | 575 } |
| LEFT | RIGHT |