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

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

Issue 29548581: Issue 4128, 5138 - Add Parser and Serializer implemented in C++ Base URL: https://github.com/adblockplus/adblockpluscore.git
Patch Set: rebase Created March 7, 2018, 12:01 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 /* 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-present eyeo GmbH 3 * Copyright (C) 2006-present 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
(...skipping 13 matching lines...) Expand all
24 24
25 ABP_NS_BEGIN 25 ABP_NS_BEGIN
26 26
27 class UserDefinedSubscription : public Subscription 27 class UserDefinedSubscription : public Subscription
28 { 28 {
29 private: 29 private:
30 int mDefaults; 30 int mDefaults;
31 31
32 public: 32 public:
33 static constexpr Type classType = Type::USERDEFINED; 33 static constexpr Type classType = Type::USERDEFINED;
34 explicit UserDefinedSubscription(const String& id); 34 explicit UserDefinedSubscription(const String& id, const KeyValues& properties );
35 bool BINDINGS_EXPORTED IsDefaultFor(const Filter& filter) const; 35 bool BINDINGS_EXPORTED IsDefaultFor(const Filter& filter) const;
36 void BINDINGS_EXPORTED MakeDefaultFor(const Filter& filter); 36 void BINDINGS_EXPORTED MakeDefaultFor(const Filter& filter);
37 bool BINDINGS_EXPORTED IsGeneric() const 37 bool BINDINGS_EXPORTED IsGeneric() const
38 { 38 {
39 return mDefaults == 0; 39 return mDefaults == 0;
40 } 40 }
41 void BINDINGS_EXPORTED InsertFilterAt(Filter& filter, unsigned pos); 41 void BINDINGS_EXPORTED InsertFilterAt(Filter& filter, unsigned pos);
42 bool BINDINGS_EXPORTED RemoveFilterAt(unsigned pos); 42 bool BINDINGS_EXPORTED RemoveFilterAt(unsigned pos);
43 OwnedString BINDINGS_EXPORTED Serialize() const; 43 OwnedString SerializeProperties() const;
44 private:
45 static void parseDefaultsProperty(const KeyValues& properties, int& member);
44 }; 46 };
45 47
46 typedef intrusive_ptr<UserDefinedSubscription> UserDefinedSubscriptionPtr; 48 typedef intrusive_ptr<UserDefinedSubscription> UserDefinedSubscriptionPtr;
47 49
48 ABP_NS_END 50 ABP_NS_END
OLDNEW

Powered by Google App Engine
This is Rietveld