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-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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 explicit Subscription(Type type, const String& id); | 77 explicit Subscription(Type type, const String& id); |
78 ~Subscription(); | 78 ~Subscription(); |
79 | 79 |
80 Type mType; | 80 Type mType; |
81 | 81 |
82 const BINDINGS_EXPORTED String& GetID() const | 82 const BINDINGS_EXPORTED String& GetID() const |
83 { | 83 { |
84 return mID; | 84 return mID; |
85 } | 85 } |
86 | 86 |
| 87 void SetFilters(Filters&& filters) |
| 88 { |
| 89 mFilters = filters; |
| 90 } |
| 91 |
| 92 void ClearFilters() |
| 93 { |
| 94 mFilters.clear(); |
| 95 } |
| 96 |
87 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle); | 97 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle); |
88 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED, | 98 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED, |
89 GetDisabled, SetDisabled); | 99 GetDisabled, SetDisabled); |
90 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed); | 100 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed); |
91 | 101 |
92 Filters::size_type BINDINGS_EXPORTED GetFilterCount() const | 102 Filters::size_type BINDINGS_EXPORTED GetFilterCount() const |
93 { | 103 { |
94 return mFilters.size(); | 104 return mFilters.size(); |
95 } | 105 } |
96 | 106 |
(...skipping 19 matching lines...) Expand all Loading... |
116 if (mType != T::classType) | 126 if (mType != T::classType) |
117 return nullptr; | 127 return nullptr; |
118 | 128 |
119 return static_cast<const T*>(this); | 129 return static_cast<const T*>(this); |
120 } | 130 } |
121 }; | 131 }; |
122 | 132 |
123 typedef intrusive_ptr<Subscription> SubscriptionPtr; | 133 typedef intrusive_ptr<Subscription> SubscriptionPtr; |
124 | 134 |
125 ABP_NS_END | 135 ABP_NS_END |
OLD | NEW |