LEFT | RIGHT |
1 #ifndef _ADBLOCK_PLUS_CLIENT_H_ | 1 #ifndef _ADBLOCK_PLUS_CLIENT_H_ |
2 #define _ADBLOCK_PLUS_CLIENT_H_ | 2 #define _ADBLOCK_PLUS_CLIENT_H_ |
3 | 3 |
4 | 4 |
5 #include "PluginTypedef.h" | 5 #include "PluginTypedef.h" |
6 #include "PluginClientBase.h" | 6 #include "PluginClientBase.h" |
7 #include "../shared/Communication.h" | 7 #include "../shared/Communication.h" |
| 8 #include "../shared/CriticalSection.h" |
8 | 9 |
9 | 10 |
10 class CPluginFilter; | 11 class CPluginFilter; |
11 | 12 |
12 struct SubscriptionDescription | 13 struct SubscriptionDescription |
13 { | 14 { |
14 std::wstring url; | 15 std::wstring url; |
15 std::wstring title; | 16 std::wstring title; |
16 std::wstring specialization; | 17 std::wstring specialization; |
17 bool listed; | 18 bool listed; |
18 }; | 19 }; |
19 | 20 |
20 class CAdblockPlusClient : public CPluginClientBase | 21 class CAdblockPlusClient : public CPluginClientBase |
21 { | 22 { |
22 | 23 |
23 private: | 24 private: |
24 | 25 |
25 std::auto_ptr<CPluginFilter> m_filter; | 26 std::auto_ptr<CPluginFilter> m_filter; |
26 | 27 |
27 CComAutoCriticalSection m_criticalSectionFilter; | 28 CComAutoCriticalSection m_criticalSectionFilter; |
28 CComAutoCriticalSection m_criticalSectionCache; | 29 CComAutoCriticalSection m_criticalSectionCache; |
29 | 30 |
30 std::map<CString,bool> m_cacheBlockedSources; | 31 std::map<CString,bool> m_cacheBlockedSources; |
31 | 32 |
32 std::shared_ptr<Communication::Pipe> enginePipe; | 33 std::shared_ptr<Communication::Pipe> enginePipe; |
| 34 CriticalSection enginePipeLock; |
33 | 35 |
34 | 36 |
35 // Private constructor used by the singleton pattern | 37 // Private constructor used by the singleton pattern |
36 CAdblockPlusClient(); | 38 CAdblockPlusClient(); |
37 | 39 |
38 bool CallEngine(Communication::OutputBuffer& message, Communication::InputBuff
er& inputBuffer = Communication::InputBuffer()); | 40 bool CallEngine(Communication::OutputBuffer& message, Communication::InputBuff
er& inputBuffer = Communication::InputBuffer()); |
39 bool CallEngine(Communication::ProcType proc, Communication::InputBuffer& inpu
tBuffer = Communication::InputBuffer()); | 41 bool CallEngine(Communication::ProcType proc, Communication::InputBuffer& inpu
tBuffer = Communication::InputBuffer()); |
40 public: | 42 public: |
41 | 43 |
42 static CAdblockPlusClient* s_instance; | 44 static CAdblockPlusClient* s_instance; |
(...skipping 28 matching lines...) Expand all Loading... |
71 bool GetPref(const std::wstring& name, bool defaultValue = false); | 73 bool GetPref(const std::wstring& name, bool defaultValue = false); |
72 int64_t GetPref(const std::wstring& name, int64_t defaultValue = 0); | 74 int64_t GetPref(const std::wstring& name, int64_t defaultValue = 0); |
73 void CheckForUpdates(); | 75 void CheckForUpdates(); |
74 std::wstring GetAppLocale(); | 76 std::wstring GetAppLocale(); |
75 std::wstring GetDocumentationLink(); | 77 std::wstring GetDocumentationLink(); |
76 | 78 |
77 bool IsFirstRun(); | 79 bool IsFirstRun(); |
78 }; | 80 }; |
79 | 81 |
80 #endif // _ADBLOCK_PLUS_CLIENT_H_ | 82 #endif // _ADBLOCK_PLUS_CLIENT_H_ |
LEFT | RIGHT |