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 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 bool CAdblockPlusClient::TogglePluginEnabled() | 536 bool CAdblockPlusClient::TogglePluginEnabled() |
537 { | 537 { |
538 DEBUG_GENERAL("TogglePluginEnabled"); | 538 DEBUG_GENERAL("TogglePluginEnabled"); |
539 Communication::InputBuffer response; | 539 Communication::InputBuffer response; |
540 if (!CallEngine(Communication::PROC_TOGGLE_PLUGIN_ENABLED, response)) | 540 if (!CallEngine(Communication::PROC_TOGGLE_PLUGIN_ENABLED, response)) |
541 return false; | 541 return false; |
542 bool currentEnabledState; | 542 bool currentEnabledState; |
543 response >> currentEnabledState; | 543 response >> currentEnabledState; |
544 return currentEnabledState; | 544 return currentEnabledState; |
545 } | 545 } |
| 546 std::wstring CAdblockPlusClient::GetHostFromUrl(const std::wstring& url) |
| 547 { |
| 548 DEBUG_GENERAL("GetHostFromUrl"); |
| 549 Communication::OutputBuffer request; |
| 550 request << Communication::PROC_GET_HOST << ToUtf8String(url); |
| 551 |
| 552 Communication::InputBuffer response; |
| 553 if (!CallEngine(request, response)) |
| 554 return L""; |
| 555 std::string host; |
| 556 response >> host; |
| 557 return ToUtf16String(host); |
| 558 } |
OLD | NEW |