LEFT | RIGHT |
(no file at all) | |
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 |
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 #include "PluginStdAfx.h" | 18 #include "PluginStdAfx.h" |
19 #include "AdblockPlusClient.h" | 19 #include "AdblockPlusClient.h" |
20 #include "PluginSettings.h" | 20 #include "PluginSettings.h" |
21 #include "PluginSystem.h" | 21 #include "PluginSystem.h" |
22 #include "PluginFilter.h" | 22 #include "PluginFilter.h" |
23 #include "PluginMutex.h" | 23 #include "PluginMutex.h" |
24 #include "PluginClass.h" | 24 #include "PluginClass.h" |
25 #include "../shared/Utils.h" | 25 #include "../shared/Utils.h" |
| 26 #include "Registry.h" |
26 | 27 |
27 namespace | 28 namespace |
28 { | 29 { |
29 void SpawnAdblockPlusEngine() | 30 void SpawnAdblockPlusEngine() |
30 { | 31 { |
31 std::wstring engineExecutablePath = GetDllDir() + L"AdblockPlusEngine.exe"; | 32 std::wstring engineExecutablePath = GetDllDir() + L"AdblockPlusEngine.exe"; |
32 CString params = ToCString(L"AdblockPlusEngine.exe " + GetBrowserLanguage())
; | 33 CString params = ToCString(L"AdblockPlusEngine.exe " + GetBrowserLanguage())
; |
33 | 34 |
34 STARTUPINFO startupInfo = {}; | 35 STARTUPINFO startupInfo = {}; |
35 PROCESS_INFORMATION processInformation = {}; | 36 PROCESS_INFORMATION processInformation = {}; |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 { | 565 { |
565 DEBUG_GENERAL("CompareVersions"); | 566 DEBUG_GENERAL("CompareVersions"); |
566 Communication::OutputBuffer request; | 567 Communication::OutputBuffer request; |
567 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S
tring(v2); | 568 request << Communication::PROC_COMPARE_VERSIONS << ToUtf8String(v1) << ToUtf8S
tring(v2); |
568 Communication::InputBuffer response; | 569 Communication::InputBuffer response; |
569 if (!CallEngine(request, response)) | 570 if (!CallEngine(request, response)) |
570 return 0; | 571 return 0; |
571 int result; | 572 int result; |
572 response >> result; | 573 response >> result; |
573 return result; | 574 return result; |
| 575 } |
| 576 |
| 577 std::wstring CAdblockPlusClient::GetConvertedFrom() |
| 578 { |
| 579 DEBUG_GENERAL("GetConvertedFrom"); |
| 580 Communication::OutputBuffer request; |
| 581 request << Communication::PROC_GET_CONVERTED_FROM; |
| 582 Communication::InputBuffer response; |
| 583 if (!CallEngine(request, response)) |
| 584 return L""; |
| 585 std::string convertedFrom; |
| 586 response >> convertedFrom; |
| 587 return ToUtf16String(convertedFrom); |
574 } | 588 } |
LEFT | RIGHT |