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

Unified Diff: compiled/bindings/main.cpp

Issue 29548581: Issue 4128, 5138 - Add Parser and Serializer implemented in C++ Base URL: https://github.com/adblockplus/adblockpluscore.git
Patch Set: Created Sept. 18, 2017, 5:23 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
Index: compiled/bindings/main.cpp
diff --git a/compiled/bindings/main.cpp b/compiled/bindings/main.cpp
index dd27856a27d805650c68de57e77d617745a26ec9..196c2d5c02e855169ff6eed2f54f840d0da46dee 100644
--- a/compiled/bindings/main.cpp
+++ b/compiled/bindings/main.cpp
@@ -35,6 +35,8 @@
#include "../subscription/UserDefinedSubscription.h"
#include "../storage/FilterStorage.h"
#include "../FilterNotifier.h"
+#include "../storage/Parser.h"
+#include "../storage/Serializer.h"
int main()
{
@@ -100,8 +102,6 @@ int main()
.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"},
@@ -113,8 +113,7 @@ int main()
.function("makeDefaultFor", &UserDefinedSubscription::MakeDefaultFor)
.function("isGeneric", &UserDefinedSubscription::IsGeneric)
.function("insertFilterAt", &UserDefinedSubscription::InsertFilterAt)
- .function("removeFilterAt", &UserDefinedSubscription::RemoveFilterAt)
- .function("serialize", &UserDefinedSubscription::Serialize);
+ .function("removeFilterAt", &UserDefinedSubscription::RemoveFilterAt);
class_<DownloadableSubscription,Subscription>("DownloadableSubscription")
.property("fixedTitle", &DownloadableSubscription::GetFixedTitle, &DownloadableSubscription::SetFixedTitle)
@@ -128,8 +127,7 @@ int main()
.property("errors", &DownloadableSubscription::GetErrorCount, &DownloadableSubscription::SetErrorCount)
.property("version", &DownloadableSubscription::GetDataRevision, &DownloadableSubscription::SetDataRevision)
.property("requiredVersion", &DownloadableSubscription::GetRequiredVersion, &DownloadableSubscription::SetRequiredVersion)
- .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &DownloadableSubscription::SetDownloadCount)
- .function("serialize", &DownloadableSubscription::Serialize);
+ .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &DownloadableSubscription::SetDownloadCount);
singleton<FilterStorage>("FilterStorage", &FilterStorage::GetInstance)
.property("subscriptionCount", &FilterStorage::GetSubscriptionCount)
@@ -140,6 +138,18 @@ int main()
.function("removeSubscription", &FilterStorage::RemoveSubscription)
.function("moveSubscription", &FilterStorage::MoveSubscription);
+ class_<Parser>("_FilterStorage_Parser")
+ .property("subscriptionCount", &Parser::GetSubscriptionCount)
+ .function("process", &Parser::Process)
+ .function("finalize", &Parser::Finalize)
+ .function("subscriptionAt", &Parser::SubscriptionAt)
+ .class_function("create", &Parser::Create);
+
+ class_<Serializer>("_FilterStorage_Serializer")
+ .property("data", &Serializer::GetData)
+ .function("serialize", &Serializer::Serialize)
+ .class_function("create", &Serializer::Create);
+
printBindings();
RegExpFilter::GenerateCustomBindings();
FilterNotifier::GenerateCustomBindings();

Powered by Google App Engine
This is Rietveld