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

Unified Diff: compiled/bindings.cpp

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 | « no previous file | compiled/bindings.ipp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/bindings.cpp
===================================================================
--- a/compiled/bindings.cpp
+++ b/compiled/bindings.cpp
@@ -85,27 +85,32 @@ EMSCRIPTEN_BINDINGS
class_<ElemHideEmulationFilter,ElemHideBase>("ElemHideEmulationFilter")
.class_property("type", "'elemhideemulation'");
class_<Subscription>("Subscription")
.property("url", &Subscription::GetID)
.property("title", &Subscription::GetTitle, &Subscription::SetTitle)
.property("disabled", &Subscription::GetDisabled, &Subscription::SetDisabled)
+ .property("filterCount", &Subscription::GetFilterCount)
+ .function("filterAt", &Subscription::FilterAt)
+ .function("indexOfFilter", &Subscription::IndexOfFilter)
.function("serialize", &Subscription::Serialize)
.function("serializeFilters", &Subscription::SerializeFilters)
.class_function("fromURL", &Subscription::FromID)
.subclass_differentiator(&Subscription::mType, {
{Subscription::Type::USERDEFINED, "SpecialSubscription"},
{Subscription::Type::DOWNLOADABLE, "DownloadableSubscription"},
});
class_<UserDefinedSubscription,Subscription>("SpecialSubscription")
.function("isDefaultFor", &UserDefinedSubscription::IsDefaultFor)
.function("makeDefaultFor", &UserDefinedSubscription::MakeDefaultFor)
+ .function("insertFilterAt", &UserDefinedSubscription::InsertFilterAt)
+ .function("removeFilterAt", &UserDefinedSubscription::RemoveFilterAt)
.function("serialize", &UserDefinedSubscription::Serialize);
class_<DownloadableSubscription,Subscription>("DownloadableSubscription")
.property("fixedTitle", &DownloadableSubscription::GetFixedTitle, &DownloadableSubscription::SetFixedTitle)
.property("homepage", &DownloadableSubscription::GetHomepage, &DownloadableSubscription::SetHomepage)
.property("lastCheck", &DownloadableSubscription::GetLastCheck, &DownloadableSubscription::SetLastCheck)
.property("expires", &DownloadableSubscription::GetHardExpiration, &DownloadableSubscription::SetHardExpiration)
.property("softExpiration", &DownloadableSubscription::GetSoftExpiration, &DownloadableSubscription::SetSoftExpiration)
« no previous file with comments | « no previous file | compiled/bindings.ipp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld