Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: compiled/subscription/UserDefinedSubscription.h

Issue 29385742: Issue 4127 - [emscripten] Convert subscription classes to C++ - Part 2 (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Created March 16, 2017, 6:27 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 #pragma once 1 #pragma once
2 2
3 #include "Subscription.h" 3 #include "Subscription.h"
4 #include "../filter/Filter.h" 4 #include "../filter/Filter.h"
5 5
6 class UserDefinedSubscription : public Subscription 6 class UserDefinedSubscription : public Subscription
7 { 7 {
8 private: 8 private:
9 enum Defaults 9 enum Defaults
10 { 10 {
11 WHITELIST = 1, 11 WHITELIST = 1,
12 BLOCKING = 2, 12 BLOCKING = 2,
13 ELEMHIDE = 4, 13 ELEMHIDE = 4,
14 }; 14 };
15 static int filterTypeToDefaults[Filter::Type::MAXTYPE + 1]; 15 static int filterTypeToDefaults[Filter::Type::MAXTYPE + 1];
16 int mDefaults; 16 int mDefaults;
17 17
18 public: 18 public:
19 explicit UserDefinedSubscription(const String& id); 19 explicit UserDefinedSubscription(const String& id);
20 EMSCRIPTEN_KEEPALIVE bool IsDefaultFor(const Filter* filter) const; 20 EMSCRIPTEN_KEEPALIVE bool IsDefaultFor(const Filter* filter) const;
21 EMSCRIPTEN_KEEPALIVE void MakeDefaultFor(const Filter* filter); 21 EMSCRIPTEN_KEEPALIVE void MakeDefaultFor(const Filter* filter);
22 EMSCRIPTEN_KEEPALIVE void InsertFilterAt(Filter* filter, unsigned pos);
23 EMSCRIPTEN_KEEPALIVE bool RemoveFilterAt(unsigned pos);
22 EMSCRIPTEN_KEEPALIVE OwnedString Serialize() const; 24 EMSCRIPTEN_KEEPALIVE OwnedString Serialize() const;
23 }; 25 };
OLDNEW

Powered by Google App Engine
This is Rietveld