| OLD | NEW |
| 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 #ifndef _ADBLOCK_PLUS_CLIENT_H_ | 18 #ifndef _ADBLOCK_PLUS_CLIENT_H_ |
| 19 #define _ADBLOCK_PLUS_CLIENT_H_ | 19 #define _ADBLOCK_PLUS_CLIENT_H_ |
| 20 | 20 |
| 21 #include <MsHTML.h> |
| 21 | 22 |
| 22 #include "PluginClientBase.h" | 23 #include "PluginClientBase.h" |
| 23 #include "../shared/Communication.h" | 24 #include "../shared/Communication.h" |
| 24 #include "../shared/CriticalSection.h" | 25 #include "../shared/CriticalSection.h" |
| 25 #include <AdblockPlus/FilterEngine.h> | 26 #include <AdblockPlus/FilterEngine.h> |
| 26 | 27 |
| 27 | 28 |
| 28 class CPluginFilter; | 29 class CPluginFilter; |
| 29 | 30 |
| 30 struct SubscriptionDescription | 31 struct SubscriptionDescription |
| 31 { | 32 { |
| 32 std::wstring url; | 33 std::wstring url; |
| 33 std::wstring title; | 34 std::wstring title; |
| 34 std::wstring specialization; | 35 std::wstring specialization; |
| 35 bool listed; | 36 bool listed; |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 class CAdblockPlusClient : public CPluginClientBase | 39 class CAdblockPlusClient |
| 39 { | 40 { |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 | 43 |
| 43 std::auto_ptr<CPluginFilter> m_filter; | 44 std::auto_ptr<CPluginFilter> m_filter; |
| 44 | 45 |
| 45 CComAutoCriticalSection m_criticalSectionFilter; | 46 CComAutoCriticalSection m_criticalSectionFilter; |
| 46 CComAutoCriticalSection m_criticalSectionCache; | 47 CComAutoCriticalSection m_criticalSectionCache; |
| 48 static CComAutoCriticalSection s_criticalSectionLocal; |
| 47 | 49 |
| 48 std::map<std::wstring, bool> m_cacheBlockedSources; | 50 std::map<std::wstring, bool> m_cacheBlockedSources; |
| 49 | 51 |
| 50 std::shared_ptr<Communication::Pipe> enginePipe; | 52 std::shared_ptr<Communication::Pipe> enginePipe; |
| 51 CriticalSection enginePipeLock; | 53 CriticalSection enginePipeLock; |
| 52 | 54 |
| 53 | 55 |
| 54 // Private constructor used by the singleton pattern | 56 // Private constructor used by the singleton pattern |
| 55 CAdblockPlusClient(); | 57 CAdblockPlusClient(); |
| 56 | 58 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 std::wstring GetAppLocale(); | 97 std::wstring GetAppLocale(); |
| 96 std::wstring GetDocumentationLink(); | 98 std::wstring GetDocumentationLink(); |
| 97 bool TogglePluginEnabled(); | 99 bool TogglePluginEnabled(); |
| 98 std::wstring GetHostFromUrl(const std::wstring& url); | 100 std::wstring GetHostFromUrl(const std::wstring& url); |
| 99 int CompareVersions(const std::wstring& v1, const std::wstring& v2); | 101 int CompareVersions(const std::wstring& v1, const std::wstring& v2); |
| 100 | 102 |
| 101 bool IsFirstRun(); | 103 bool IsFirstRun(); |
| 102 }; | 104 }; |
| 103 | 105 |
| 104 #endif // _ADBLOCK_PLUS_CLIENT_H_ | 106 #endif // _ADBLOCK_PLUS_CLIENT_H_ |
| OLD | NEW |