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: Added md5 checksum. Reorganized some code. Created Nov. 28, 2017, 10:46 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
« no previous file with comments | « compiled/StringScanner.h ('k') | compiled/subscription/DownloadableSubscription.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 .property("lastCheck", &DownloadableSubscription::GetLastCheck, &Downloa dableSubscription::SetLastCheck) 126 .property("lastCheck", &DownloadableSubscription::GetLastCheck, &Downloa dableSubscription::SetLastCheck)
127 .property("hardExpiration", &DownloadableSubscription::GetHardExpiration , &DownloadableSubscription::SetHardExpiration) 127 .property("hardExpiration", &DownloadableSubscription::GetHardExpiration , &DownloadableSubscription::SetHardExpiration)
128 .property("softExpiration", &DownloadableSubscription::GetSoftExpiration , &DownloadableSubscription::SetSoftExpiration) 128 .property("softExpiration", &DownloadableSubscription::GetSoftExpiration , &DownloadableSubscription::SetSoftExpiration)
129 .property("lastDownload", &DownloadableSubscription::GetLastDownload, &D ownloadableSubscription::SetLastDownload) 129 .property("lastDownload", &DownloadableSubscription::GetLastDownload, &D ownloadableSubscription::SetLastDownload)
130 .property("downloadStatus", &DownloadableSubscription::GetDownloadStatus , &DownloadableSubscription::SetDownloadStatus) 130 .property("downloadStatus", &DownloadableSubscription::GetDownloadStatus , &DownloadableSubscription::SetDownloadStatus)
131 .property("lastSuccess", &DownloadableSubscription::GetLastSuccess, &Dow nloadableSubscription::SetLastSuccess) 131 .property("lastSuccess", &DownloadableSubscription::GetLastSuccess, &Dow nloadableSubscription::SetLastSuccess)
132 .property("errorCount", &DownloadableSubscription::GetErrorCount, &Downl oadableSubscription::SetErrorCount) 132 .property("errorCount", &DownloadableSubscription::GetErrorCount, &Downl oadableSubscription::SetErrorCount)
133 .property("dataRevision", &DownloadableSubscription::GetDataRevision, &D ownloadableSubscription::SetDataRevision) 133 .property("dataRevision", &DownloadableSubscription::GetDataRevision, &D ownloadableSubscription::SetDataRevision)
134 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersi on, &DownloadableSubscription::SetRequiredVersion) 134 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersi on, &DownloadableSubscription::SetRequiredVersion)
135 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &DownloadableSubscription::SetDownloadCount) 135 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &DownloadableSubscription::SetDownloadCount)
136 .function("parseDownload", &DownloadableSubscription::ParseDownload)
136 .function("serialize", &DownloadableSubscription::Serialize); 137 .function("serialize", &DownloadableSubscription::Serialize);
137 138
139 class_<DownloadableSubscription_Parser>("DownloadableSubscription_Parser")
140 .property("redirect", &DownloadableSubscription_Parser::GetRedirect)
141 .property("homepage", &DownloadableSubscription_Parser::GetHomepage)
142 .function("process", &DownloadableSubscription_Parser::Process)
143 .function("finalize", &DownloadableSubscription_Parser::Finalize);
144
138 singleton<FilterStorage>("FilterStorage", &FilterStorage::GetInstance) 145 singleton<FilterStorage>("FilterStorage", &FilterStorage::GetInstance)
139 .property("subscriptionCount", &FilterStorage::GetSubscriptionCount) 146 .property("subscriptionCount", &FilterStorage::GetSubscriptionCount)
140 .function("subscriptionAt", &FilterStorage::SubscriptionAt) 147 .function("subscriptionAt", &FilterStorage::SubscriptionAt)
141 .function("indexOfSubscription", &FilterStorage::IndexOfSubscription) 148 .function("indexOfSubscription", &FilterStorage::IndexOfSubscription)
142 .function("getSubscriptionForFilter", &FilterStorage::GetSubscriptionFor Filter) 149 .function("getSubscriptionForFilter", &FilterStorage::GetSubscriptionFor Filter)
143 .function("addSubscription", &FilterStorage::AddSubscription) 150 .function("addSubscription", &FilterStorage::AddSubscription)
144 .function("removeSubscription", &FilterStorage::RemoveSubscription) 151 .function("removeSubscription", &FilterStorage::RemoveSubscription)
145 .function("moveSubscription", &FilterStorage::MoveSubscription); 152 .function("moveSubscription", &FilterStorage::MoveSubscription);
146 153
147 class_<ElemHide_SelectorList>("ElemHide_SelectorList") 154 class_<ElemHide_SelectorList>("ElemHide_SelectorList")
(...skipping 26 matching lines...) Expand all
174 } 181 }
175 catch (const std::exception& e) 182 catch (const std::exception& e)
176 { 183 {
177 EM_ASM_ARGS( 184 EM_ASM_ARGS(
178 console.error("Error occurred generating JavaScript bindings: " + 185 console.error("Error occurred generating JavaScript bindings: " +
179 Module.AsciiToString($0)), e.what() 186 Module.AsciiToString($0)), e.what()
180 ); 187 );
181 return 1; 188 return 1;
182 } 189 }
183 } 190 }
OLDNEW
« no previous file with comments | « compiled/StringScanner.h ('k') | compiled/subscription/DownloadableSubscription.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld