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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 UNKNOWN = 0, | 70 UNKNOWN = 0, |
71 DOWNLOADABLE = 1, | 71 DOWNLOADABLE = 1, |
72 USERDEFINED = 2 | 72 USERDEFINED = 2 |
73 }; | 73 }; |
74 | 74 |
75 explicit Subscription(Type type, const String& id); | 75 explicit Subscription(Type type, const String& id); |
76 ~Subscription(); | 76 ~Subscription(); |
77 | 77 |
78 Type mType; | 78 Type mType; |
79 | 79 |
80 BINDINGS_EXPORTED const String& GetID() const | 80 const BINDINGS_EXPORTED String& GetID() const |
81 { | 81 { |
82 return mID; | 82 return mID; |
83 } | 83 } |
84 | 84 |
85 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle); | 85 SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle); |
86 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED, | 86 SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED, |
87 GetDisabled, SetDisabled); | 87 GetDisabled, SetDisabled); |
88 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed); | 88 SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed); |
89 | 89 |
90 BINDINGS_EXPORTED Filters::size_type GetFilterCount() const | 90 Filters::size_type BINDINGS_EXPORTED GetFilterCount() const |
91 { | 91 { |
92 return mFilters.size(); | 92 return mFilters.size(); |
93 } | 93 } |
94 | 94 |
95 BINDINGS_EXPORTED Filter* FilterAt(Filters::size_type index); | 95 Filter* BINDINGS_EXPORTED FilterAt(Filters::size_type index); |
96 BINDINGS_EXPORTED int IndexOfFilter(Filter* filter); | 96 int BINDINGS_EXPORTED IndexOfFilter(Filter* filter); |
97 BINDINGS_EXPORTED OwnedString Serialize() const; | 97 OwnedString BINDINGS_EXPORTED Serialize() const; |
98 BINDINGS_EXPORTED OwnedString SerializeFilters() const; | 98 OwnedString BINDINGS_EXPORTED SerializeFilters() const; |
99 | 99 |
100 static BINDINGS_EXPORTED Subscription* FromID(const String& id); | 100 static Subscription* BINDINGS_EXPORTED FromID(const String& id); |
101 | 101 |
102 template<typename T> | 102 template<typename T> |
103 T* As(); | 103 T* As(); |
104 }; | 104 }; |
105 | 105 |
106 typedef intrusive_ptr<Subscription> SubscriptionPtr; | 106 typedef intrusive_ptr<Subscription> SubscriptionPtr; |
OLD | NEW |