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

Side by Side Diff: compiled/bindings/main.cpp

Issue 29606600: Issue 5146 - Implement DownloadableSubscription parsing in C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Nov. 13, 2017, 10:25 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 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 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 .property("lastCheck", &DownloadableSubscription::GetLastCheck, &Downloa dableSubscription::SetLastCheck) 124 .property("lastCheck", &DownloadableSubscription::GetLastCheck, &Downloa dableSubscription::SetLastCheck)
125 .property("hardExpiration", &DownloadableSubscription::GetHardExpiration , &DownloadableSubscription::SetHardExpiration) 125 .property("hardExpiration", &DownloadableSubscription::GetHardExpiration , &DownloadableSubscription::SetHardExpiration)
126 .property("softExpiration", &DownloadableSubscription::GetSoftExpiration , &DownloadableSubscription::SetSoftExpiration) 126 .property("softExpiration", &DownloadableSubscription::GetSoftExpiration , &DownloadableSubscription::SetSoftExpiration)
127 .property("lastDownload", &DownloadableSubscription::GetLastDownload, &D ownloadableSubscription::SetLastDownload) 127 .property("lastDownload", &DownloadableSubscription::GetLastDownload, &D ownloadableSubscription::SetLastDownload)
128 .property("downloadStatus", &DownloadableSubscription::GetDownloadStatus , &DownloadableSubscription::SetDownloadStatus) 128 .property("downloadStatus", &DownloadableSubscription::GetDownloadStatus , &DownloadableSubscription::SetDownloadStatus)
129 .property("lastSuccess", &DownloadableSubscription::GetLastSuccess, &Dow nloadableSubscription::SetLastSuccess) 129 .property("lastSuccess", &DownloadableSubscription::GetLastSuccess, &Dow nloadableSubscription::SetLastSuccess)
130 .property("errorCount", &DownloadableSubscription::GetErrorCount, &Downl oadableSubscription::SetErrorCount) 130 .property("errorCount", &DownloadableSubscription::GetErrorCount, &Downl oadableSubscription::SetErrorCount)
131 .property("dataRevision", &DownloadableSubscription::GetDataRevision, &D ownloadableSubscription::SetDataRevision) 131 .property("dataRevision", &DownloadableSubscription::GetDataRevision, &D ownloadableSubscription::SetDataRevision)
132 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersi on, &DownloadableSubscription::SetRequiredVersion) 132 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersi on, &DownloadableSubscription::SetRequiredVersion)
133 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &DownloadableSubscription::SetDownloadCount) 133 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &DownloadableSubscription::SetDownloadCount)
134 .function("parseDownload", &DownloadableSubscription::ParseDownload)
134 .function("serialize", &DownloadableSubscription::Serialize); 135 .function("serialize", &DownloadableSubscription::Serialize);
135 136
137 class_<_DownloadableSubscription_Parser>("_DownloadableSubscription_Parser")
138 .property("redirect", &_DownloadableSubscription_Parser::GetRedirect)
139 .property("homepage", &_DownloadableSubscription_Parser::GetHomepage)
140 .function("process", &_DownloadableSubscription_Parser::Process)
141 .function("finalize", &_DownloadableSubscription_Parser::Finalize);
142
136 singleton<FilterStorage>("FilterStorage", &FilterStorage::GetInstance) 143 singleton<FilterStorage>("FilterStorage", &FilterStorage::GetInstance)
137 .property("subscriptionCount", &FilterStorage::GetSubscriptionCount) 144 .property("subscriptionCount", &FilterStorage::GetSubscriptionCount)
138 .function("subscriptionAt", &FilterStorage::SubscriptionAt) 145 .function("subscriptionAt", &FilterStorage::SubscriptionAt)
139 .function("indexOfSubscription", &FilterStorage::IndexOfSubscription) 146 .function("indexOfSubscription", &FilterStorage::IndexOfSubscription)
140 .function("getSubscriptionForFilter", &FilterStorage::GetSubscriptionFor Filter) 147 .function("getSubscriptionForFilter", &FilterStorage::GetSubscriptionFor Filter)
141 .function("addSubscription", &FilterStorage::AddSubscription) 148 .function("addSubscription", &FilterStorage::AddSubscription)
142 .function("removeSubscription", &FilterStorage::RemoveSubscription) 149 .function("removeSubscription", &FilterStorage::RemoveSubscription)
143 .function("moveSubscription", &FilterStorage::MoveSubscription); 150 .function("moveSubscription", &FilterStorage::MoveSubscription);
144 151
145 class_<_ElemHide_SelectorList>("_ElemHide_SelectorList") 152 class_<_ElemHide_SelectorList>("_ElemHide_SelectorList")
(...skipping 26 matching lines...) Expand all
172 } 179 }
173 catch (const std::exception& e) 180 catch (const std::exception& e)
174 { 181 {
175 EM_ASM_ARGS( 182 EM_ASM_ARGS(
176 console.error("Error occurred generating JavaScript bindings: " + 183 console.error("Error occurred generating JavaScript bindings: " +
177 Module.AsciiToString($0)), e.what() 184 Module.AsciiToString($0)), e.what()
178 ); 185 );
179 return 1; 186 return 1;
180 } 187 }
181 } 188 }
OLDNEW

Powered by Google App Engine
This is Rietveld