OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 #include "PluginSettings.h" | 2 #include "PluginSettings.h" |
3 #include "PluginSystem.h" | 3 #include "PluginSystem.h" |
4 #include "PluginFilter.h" | 4 #include "PluginFilter.h" |
5 #include "PluginClientFactory.h" | 5 #include "PluginClientFactory.h" |
6 #include "PluginMutex.h" | 6 #include "PluginMutex.h" |
7 #include "PluginClass.h" | 7 #include "PluginClass.h" |
8 | 8 |
9 #include "AdblockPlusClient.h" | 9 #include "AdblockPlusClient.h" |
10 | 10 |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 432 |
433 void CAdblockPlusClient::SetPref(const std::wstring& name, bool value) | 433 void CAdblockPlusClient::SetPref(const std::wstring& name, bool value) |
434 { | 434 { |
435 Communication::OutputBuffer request; | 435 Communication::OutputBuffer request; |
436 request << Communication::PROC_SET_PREF << ToUtf8String(name) << value; | 436 request << Communication::PROC_SET_PREF << ToUtf8String(name) << value; |
437 CallEngine(request); | 437 CallEngine(request); |
438 } | 438 } |
439 | 439 |
440 std::wstring CAdblockPlusClient::GetPref(const std::wstring& name, const wchar_t
* defaultValue) | 440 std::wstring CAdblockPlusClient::GetPref(const std::wstring& name, const wchar_t
* defaultValue) |
441 { | 441 { |
442 return GetPref(name, std::wstring(defaultValue)); | 442 return GetPref(name, defaultValue); |
443 } | 443 } |
444 std::wstring CAdblockPlusClient::GetPref(const std::wstring& name, const std::ws
tring& defaultValue) | 444 std::wstring CAdblockPlusClient::GetPref(const std::wstring& name, const std::ws
tring& defaultValue) |
445 { | 445 { |
446 DEBUG_GENERAL((L"GetPref: " + name + L" start").c_str()); | 446 DEBUG_GENERAL((L"GetPref: " + name + L" start").c_str()); |
447 Communication::OutputBuffer request; | 447 Communication::OutputBuffer request; |
448 request << Communication::PROC_GET_PREF << ToUtf8String(name); | 448 request << Communication::PROC_GET_PREF << ToUtf8String(name); |
449 | 449 |
450 Communication::InputBuffer response; | 450 Communication::InputBuffer response; |
451 if (!CallEngine(request, response)) | 451 if (!CallEngine(request, response)) |
452 return defaultValue; | 452 return defaultValue; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 Communication::OutputBuffer request; | 550 Communication::OutputBuffer request; |
551 request << Communication::PROC_GET_HOST << ToUtf8String(url); | 551 request << Communication::PROC_GET_HOST << ToUtf8String(url); |
552 | 552 |
553 Communication::InputBuffer response; | 553 Communication::InputBuffer response; |
554 if (!CallEngine(request, response)) | 554 if (!CallEngine(request, response)) |
555 return L""; | 555 return L""; |
556 std::string host; | 556 std::string host; |
557 response >> host; | 557 response >> host; |
558 return ToUtf16String(host); | 558 return ToUtf16String(host); |
559 } | 559 } |
OLD | NEW |