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

Delta Between Two Patch Sets: compiled/bindings.cpp

Issue 29384812: Issue 4127 - [emscripten] Convert subscription classes to C++ - Part 1 (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Left Patch Set: Created March 15, 2017, 3:05 p.m.
Right Patch Set: Addressed comments Created April 13, 2017, 1:02 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « compiled/StringMap.h ('k') | compiled/bindings.ipp » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2017 eyeo GmbH
4 *
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
7 * published by the Free Software Foundation.
8 *
9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */
17
1 #include "bindings.ipp" 18 #include "bindings.ipp"
2 #include "filter/Filter.h" 19 #include "filter/Filter.h"
3 #include "filter/InvalidFilter.h" 20 #include "filter/InvalidFilter.h"
4 #include "filter/CommentFilter.h" 21 #include "filter/CommentFilter.h"
5 #include "filter/ActiveFilter.h" 22 #include "filter/ActiveFilter.h"
6 #include "filter/RegExpFilter.h" 23 #include "filter/RegExpFilter.h"
7 #include "filter/BlockingFilter.h" 24 #include "filter/BlockingFilter.h"
8 #include "filter/WhitelistFilter.h" 25 #include "filter/WhitelistFilter.h"
9 #include "filter/ElemHideBase.h" 26 #include "filter/ElemHideBase.h"
10 #include "filter/ElemHideFilter.h" 27 #include "filter/ElemHideFilter.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 .property("disabled", &Subscription::GetDisabled, &Subscription::SetDisabl ed) 92 .property("disabled", &Subscription::GetDisabled, &Subscription::SetDisabl ed)
76 .function("serialize", &Subscription::Serialize) 93 .function("serialize", &Subscription::Serialize)
77 .function("serializeFilters", &Subscription::SerializeFilters) 94 .function("serializeFilters", &Subscription::SerializeFilters)
78 .class_function("fromURL", &Subscription::FromID) 95 .class_function("fromURL", &Subscription::FromID)
79 .subclass_differentiator(&Subscription::mType, { 96 .subclass_differentiator(&Subscription::mType, {
80 {Subscription::Type::USERDEFINED, "SpecialSubscription"}, 97 {Subscription::Type::USERDEFINED, "SpecialSubscription"},
81 {Subscription::Type::DOWNLOADABLE, "DownloadableSubscription"}, 98 {Subscription::Type::DOWNLOADABLE, "DownloadableSubscription"},
82 }); 99 });
83 100
84 class_<UserDefinedSubscription,Subscription>("SpecialSubscription") 101 class_<UserDefinedSubscription,Subscription>("SpecialSubscription")
85 .function("isDefaultFor", &UserDefinedSubscription::isDefaultFor) 102 .function("isDefaultFor", &UserDefinedSubscription::IsDefaultFor)
86 .function("makeDefaultFor", &UserDefinedSubscription::makeDefaultFor) 103 .function("makeDefaultFor", &UserDefinedSubscription::MakeDefaultFor)
87 .function("serialize", &UserDefinedSubscription::Serialize); 104 .function("serialize", &UserDefinedSubscription::Serialize);
88 105
89 class_<DownloadableSubscription,Subscription>("DownloadableSubscription") 106 class_<DownloadableSubscription,Subscription>("DownloadableSubscription")
90 .property("fixedTitle", &DownloadableSubscription::GetFixedTitle, &Downloa dableSubscription::SetFixedTitle) 107 .property("fixedTitle", &DownloadableSubscription::GetFixedTitle, &Downloa dableSubscription::SetFixedTitle)
91 .property("homepage", &DownloadableSubscription::GetHomepage, &Downloadabl eSubscription::SetHomepage) 108 .property("homepage", &DownloadableSubscription::GetHomepage, &Downloadabl eSubscription::SetHomepage)
92 .property("lastCheck", &DownloadableSubscription::GetLastCheck, &Downloada bleSubscription::SetLastCheck) 109 .property("lastCheck", &DownloadableSubscription::GetLastCheck, &Downloada bleSubscription::SetLastCheck)
93 .property("expires", &DownloadableSubscription::GetHardExpiration, &Downlo adableSubscription::SetHardExpiration) 110 .property("expires", &DownloadableSubscription::GetHardExpiration, &Downlo adableSubscription::SetHardExpiration)
94 .property("softExpiration", &DownloadableSubscription::GetSoftExpiration, &DownloadableSubscription::SetSoftExpiration) 111 .property("softExpiration", &DownloadableSubscription::GetSoftExpiration, &DownloadableSubscription::SetSoftExpiration)
95 .property("lastDownload", &DownloadableSubscription::GetLastDownload, &Dow nloadableSubscription::SetLastDownload) 112 .property("lastDownload", &DownloadableSubscription::GetLastDownload, &Dow nloadableSubscription::SetLastDownload)
96 .property("downloadStatus", &DownloadableSubscription::GetDownloadStatus, &DownloadableSubscription::SetDownloadStatus) 113 .property("downloadStatus", &DownloadableSubscription::GetDownloadStatus, &DownloadableSubscription::SetDownloadStatus)
97 .property("lastSuccess", &DownloadableSubscription::GetLastSuccess, &Downl oadableSubscription::SetLastSuccess) 114 .property("lastSuccess", &DownloadableSubscription::GetLastSuccess, &Downl oadableSubscription::SetLastSuccess)
98 .property("errors", &DownloadableSubscription::GetErrorCount, &Downloadabl eSubscription::SetErrorCount) 115 .property("errors", &DownloadableSubscription::GetErrorCount, &Downloadabl eSubscription::SetErrorCount)
99 .property("version", &DownloadableSubscription::GetDataRevision, &Download ableSubscription::SetDataRevision) 116 .property("version", &DownloadableSubscription::GetDataRevision, &Download ableSubscription::SetDataRevision)
100 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersion , &DownloadableSubscription::SetRequiredVersion) 117 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersion , &DownloadableSubscription::SetRequiredVersion)
101 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &D ownloadableSubscription::SetDownloadCount) 118 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &D ownloadableSubscription::SetDownloadCount)
102 .function("serialize", &DownloadableSubscription::Serialize); 119 .function("serialize", &DownloadableSubscription::Serialize);
103 } 120 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld