OLD | NEW |
1 #include "PluginStdAfx.h" | 1 #include "PluginStdAfx.h" |
2 | 2 |
3 #include "PluginSettings.h" | 3 #include "PluginSettings.h" |
4 #include "PluginSystem.h" | 4 #include "PluginSystem.h" |
5 #include "PluginFilter.h" | 5 #include "PluginFilter.h" |
6 #include "PluginClientFactory.h" | 6 #include "PluginClientFactory.h" |
7 #include "PluginMutex.h" | 7 #include "PluginMutex.h" |
8 #include "PluginClass.h" | 8 #include "PluginClass.h" |
9 | 9 |
10 #include "AdblockPlusClient.h" | 10 #include "AdblockPlusClient.h" |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 295 } |
296 | 296 |
297 void CAdblockPlusClient::UpdateAllSubscriptions() | 297 void CAdblockPlusClient::UpdateAllSubscriptions() |
298 { | 298 { |
299 CallEngine(Communication::PROC_UPDATE_ALL_SUBSCRIPTIONS); | 299 CallEngine(Communication::PROC_UPDATE_ALL_SUBSCRIPTIONS); |
300 } | 300 } |
301 | 301 |
302 std::vector<std::wstring> CAdblockPlusClient::GetExceptionDomains() | 302 std::vector<std::wstring> CAdblockPlusClient::GetExceptionDomains() |
303 { | 303 { |
304 Communication::InputBuffer response; | 304 Communication::InputBuffer response; |
305 if (!CallEngine(Communication::PROC_GET_EXCEPTION_DOMAINS)) return std::vector
<std::wstring>(); | 305 if (!CallEngine(Communication::PROC_GET_EXCEPTION_DOMAINS, response)) return s
td::vector<std::wstring>(); |
306 return ReadStrings(response); | 306 return ReadStrings(response); |
307 } | 307 } |
308 | 308 |
309 bool CAdblockPlusClient::IsFirstRun() | 309 bool CAdblockPlusClient::IsFirstRun() |
310 { | 310 { |
311 Communication::InputBuffer response; | 311 Communication::InputBuffer response; |
312 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, &response)) re
turn false; | 312 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, response)) ret
urn false; |
313 bool res; | 313 bool res; |
314 response >> res; | 314 response >> res; |
315 return res; | 315 return res; |
316 } | 316 } |
317 void CAdblockPlusClient::AddFilter(const std::wstring& text) | 317 void CAdblockPlusClient::AddFilter(const std::wstring& text) |
318 { | 318 { |
319 Communication::OutputBuffer request; | 319 Communication::OutputBuffer request; |
320 request << Communication::PROC_ADD_FILTER << ToUtf8String(text); | 320 request << Communication::PROC_ADD_FILTER << ToUtf8String(text); |
321 CallEngine(request); | 321 CallEngine(request); |
322 } | 322 } |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 response >> success; | 401 response >> success; |
402 if (success) | 402 if (success) |
403 { | 403 { |
404 int64_t value; | 404 int64_t value; |
405 response >> value; | 405 response >> value; |
406 return value; | 406 return value; |
407 } | 407 } |
408 else | 408 else |
409 return defaultValue; | 409 return defaultValue; |
410 } | 410 } |
OLD | NEW |