OLD | NEW |
1 #ifndef COMMUNICATION_H | 1 #ifndef COMMUNICATION_H |
2 #define COMMUNICATION_H | 2 #define COMMUNICATION_H |
3 | 3 |
4 #include <memory> | 4 #include <memory> |
5 #include <sstream> | 5 #include <sstream> |
6 #include <stdexcept> | 6 #include <stdexcept> |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 #include <Windows.h> | 10 #include <Windows.h> |
11 | 11 |
12 namespace Communication | 12 namespace Communication |
13 { | 13 { |
14 extern const std::wstring pipeName; | 14 extern const std::wstring pipeName; |
15 | 15 |
16 enum ProcType : uint32_t { | 16 enum ProcType : uint32_t { |
17 PROC_MATCHES, | 17 PROC_MATCHES, |
18 PROC_GET_ELEMHIDE_SELECTORS, | 18 PROC_GET_ELEMHIDE_SELECTORS, |
19 PROC_AVAILABLE_SUBSCRIPTIONS, | 19 PROC_AVAILABLE_SUBSCRIPTIONS, |
20 PROC_LISTED_SUBSCRIPTIONS, | 20 PROC_LISTED_SUBSCRIPTIONS, |
21 PROC_SET_SUBSCRIPTION, | 21 PROC_SET_SUBSCRIPTION, |
22 PROC_UPDATE_ALL_SUBSCRIPTIONS, | 22 PROC_UPDATE_ALL_SUBSCRIPTIONS, |
23 PROC_GET_EXCEPTION_DOMAINS, | 23 PROC_GET_EXCEPTION_DOMAINS, |
24 PROC_IS_WHITELISTED_URL, | 24 PROC_IS_WHITELISTED_URL, |
25 PROC_ADD_FILTER, | 25 PROC_ADD_FILTER, |
26 PROC_REMOVE_FILTER, | 26 PROC_REMOVE_FILTER, |
27 PROC_SET_PREF, | 27 PROC_SET_PREF, |
28 PROC_GET_PREF, | 28 PROC_GET_PREF, |
29 PROC_IS_FIRST_RUN_ACTION_NEEDED | 29 PROC_IS_FIRST_RUN_ACTION_NEEDED, |
| 30 PROC_GET_REQUIRE, |
| 31 PROC_GET_FILTER_FROM_TEXT |
30 }; | 32 }; |
31 enum ValueType : uint32_t { | 33 enum ValueType : uint32_t { |
32 TYPE_PROC, TYPE_STRING, TYPE_WSTRING, TYPE_INT64, TYPE_INT32, TYPE_BOOL | 34 TYPE_PROC, TYPE_STRING, TYPE_WSTRING, TYPE_INT64, TYPE_INT32, TYPE_BOOL |
33 }; | 35 }; |
34 typedef uint32_t SizeType; | 36 typedef uint32_t SizeType; |
35 | 37 |
36 class InputBuffer | 38 class InputBuffer |
37 { | 39 { |
38 public: | 40 public: |
39 InputBuffer() : buffer(), hasType(false) {} | 41 InputBuffer() : buffer(), hasType(false) {} |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 | 170 |
169 InputBuffer ReadMessage(); | 171 InputBuffer ReadMessage(); |
170 void WriteMessage(OutputBuffer& message); | 172 void WriteMessage(OutputBuffer& message); |
171 | 173 |
172 protected: | 174 protected: |
173 HANDLE pipe; | 175 HANDLE pipe; |
174 }; | 176 }; |
175 } | 177 } |
176 | 178 |
177 #endif | 179 #endif |
OLD | NEW |