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

Unified Diff: compiled/subscription/Subscription.h

Issue 29385742: Issue 4127 - [emscripten] Convert subscription classes to C++ - Part 2 (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Rebased Created April 13, 2017, 1:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/intrusive_ptr.h ('k') | compiled/subscription/Subscription.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/subscription/Subscription.h
===================================================================
--- a/compiled/subscription/Subscription.h
+++ b/compiled/subscription/Subscription.h
@@ -79,17 +79,17 @@
}, &action, this, mType, &value, &oldvalue);\
}\
}
class Subscription : public ref_counted
{
protected:
OwnedString mID;
- std::vector<Filter> mFilters;
+ std::vector<FilterPtr> mFilters;
public:
enum Type
{
UNKNOWN = 0,
DOWNLOADABLE = 1,
USERDEFINED = 2
};
@@ -102,15 +102,22 @@ public:
EMSCRIPTEN_KEEPALIVE const String& GetID() const
{
return mID;
}
SUBSCRIPTION_STRING_PROPERTY(mTitle, GetTitle, SetTitle);
SUBSCRIPTION_PROPERTY(bool, mDisabled, GetDisabled, SetDisabled);
+ EMSCRIPTEN_KEEPALIVE unsigned GetFilterCount() const
+ {
+ return mFilters.size();
+ }
+
+ EMSCRIPTEN_KEEPALIVE Filter* FilterAt(unsigned index);
+ EMSCRIPTEN_KEEPALIVE int IndexOfFilter(Filter* filter);
EMSCRIPTEN_KEEPALIVE OwnedString Serialize() const;
EMSCRIPTEN_KEEPALIVE OwnedString SerializeFilters() const;
static EMSCRIPTEN_KEEPALIVE Subscription* FromID(const String& id);
};
typedef intrusive_ptr<Subscription> SubscriptionPtr;
« no previous file with comments | « compiled/intrusive_ptr.h ('k') | compiled/subscription/Subscription.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld