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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 CallEngine(Communication::PROC_UPDATE_ALL_SUBSCRIPTIONS); | 306 CallEngine(Communication::PROC_UPDATE_ALL_SUBSCRIPTIONS); |
307 } | 307 } |
308 | 308 |
309 std::vector<std::wstring> CAdblockPlusClient::GetExceptionDomains() | 309 std::vector<std::wstring> CAdblockPlusClient::GetExceptionDomains() |
310 { | 310 { |
311 Communication::InputBuffer response; | 311 Communication::InputBuffer response; |
312 if (!CallEngine(Communication::PROC_GET_EXCEPTION_DOMAINS)) return std::vector
<std::wstring>(); | 312 if (!CallEngine(Communication::PROC_GET_EXCEPTION_DOMAINS)) return std::vector
<std::wstring>(); |
313 return ReadStrings(response); | 313 return ReadStrings(response); |
314 } | 314 } |
315 | 315 |
| 316 bool CAdblockPlusClient::IsFirstRun() |
| 317 { |
| 318 Communication::InputBuffer response; |
| 319 if (!CallEngine(Communication::PROC_IS_FIRST_RUN_ACTION_NEEDED, &response)) re
turn false; |
| 320 bool res; |
| 321 response >> res; |
| 322 return res; |
| 323 } |
316 void CAdblockPlusClient::AddFilter(const std::wstring& text) | 324 void CAdblockPlusClient::AddFilter(const std::wstring& text) |
317 { | 325 { |
318 Communication::OutputBuffer request; | 326 Communication::OutputBuffer request; |
319 request << Communication::PROC_ADD_FILTER << ToUtf8String(text); | 327 request << Communication::PROC_ADD_FILTER << ToUtf8String(text); |
320 CallEngine(request); | 328 CallEngine(request); |
321 } | 329 } |
322 | 330 |
323 void CAdblockPlusClient::RemoveFilter(const std::wstring& text) | 331 void CAdblockPlusClient::RemoveFilter(const std::wstring& text) |
324 { | 332 { |
325 Communication::OutputBuffer request; | 333 Communication::OutputBuffer request; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 response >> success; | 408 response >> success; |
401 if (success) | 409 if (success) |
402 { | 410 { |
403 int64_t value; | 411 int64_t value; |
404 response >> value; | 412 response >> value; |
405 return value; | 413 return value; |
406 } | 414 } |
407 else | 415 else |
408 return defaultValue; | 416 return defaultValue; |
409 } | 417 } |
OLD | NEW |