Index: compiled/subscription/Subscription.h |
=================================================================== |
--- a/compiled/subscription/Subscription.h |
+++ b/compiled/subscription/Subscription.h |
@@ -52,19 +52,22 @@ |
static_assert(std::is_arithmetic<type>::value, "SUBSCRIPTION_PROPERTY macro can only be used with arithmetic types");\ |
SUBSCRIPTION_PROPERTY_INTERNAL(type, type, name, topic, getter, setter) |
#define SUBSCRIPTION_STRING_PROPERTY(name, topic, getter, setter) \ |
SUBSCRIPTION_PROPERTY_INTERNAL(OwnedString, const String&, name, topic, getter, setter) |
class Subscription : public ref_counted |
{ |
+public: |
+ typedef std::vector<FilterPtr> Filters; |
+ |
protected: |
OwnedString mID; |
- std::vector<FilterPtr> mFilters; |
+ Filters mFilters; |
public: |
enum Type |
{ |
UNKNOWN = 0, |
DOWNLOADABLE = 1, |
USERDEFINED = 2 |
}; |
@@ -77,23 +80,27 @@ public: |
BINDINGS_EXPORTED const String& GetID() const |
{ |
return mID; |
} |
SUBSCRIPTION_STRING_PROPERTY(mTitle, SUBSCRIPTION_TITLE, GetTitle, SetTitle); |
SUBSCRIPTION_PROPERTY(bool, mDisabled, SUBSCRIPTION_DISABLED, |
GetDisabled, SetDisabled); |
+ SUBSCRIPTION_PROPERTY(bool, mListed, NONE, GetListed, SetListed); |
- BINDINGS_EXPORTED unsigned GetFilterCount() const |
+ BINDINGS_EXPORTED Filters::size_type GetFilterCount() const |
{ |
return mFilters.size(); |
} |
- BINDINGS_EXPORTED Filter* FilterAt(unsigned index); |
+ BINDINGS_EXPORTED Filter* FilterAt(Filters::size_type index); |
BINDINGS_EXPORTED int IndexOfFilter(Filter* filter); |
BINDINGS_EXPORTED OwnedString Serialize() const; |
BINDINGS_EXPORTED OwnedString SerializeFilters() const; |
static BINDINGS_EXPORTED Subscription* FromID(const String& id); |
+ |
+ template<typename T> |
+ T* As(); |
}; |
typedef intrusive_ptr<Subscription> SubscriptionPtr; |