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

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

Issue 29630576: Issue 5146 - Part 2: Process http response in C++ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Rebased Created Aug. 14, 2018, 12:45 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 .property("errorCount", &DownloadableSubscription::GetErrorCount, &Downl oadableSubscription::SetErrorCount) 134 .property("errorCount", &DownloadableSubscription::GetErrorCount, &Downl oadableSubscription::SetErrorCount)
135 .property("dataRevision", &DownloadableSubscription::GetDataRevision, &D ownloadableSubscription::SetDataRevision) 135 .property("dataRevision", &DownloadableSubscription::GetDataRevision, &D ownloadableSubscription::SetDataRevision)
136 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersi on, &DownloadableSubscription::SetRequiredVersion) 136 .property("requiredVersion", &DownloadableSubscription::GetRequiredVersi on, &DownloadableSubscription::SetRequiredVersion)
137 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &DownloadableSubscription::SetDownloadCount) 137 .property("downloadCount", &DownloadableSubscription::GetDownloadCount, &DownloadableSubscription::SetDownloadCount)
138 .class_function("parseDownload", &DownloadableSubscription::ParseDownloa d) 138 .class_function("parseDownload", &DownloadableSubscription::ParseDownloa d)
139 .function("serialize", &DownloadableSubscription::Serialize); 139 .function("serialize", &DownloadableSubscription::Serialize);
140 140
141 class_<DownloadableSubscription_Parser>("DownloadableSubscription_Parser") 141 class_<DownloadableSubscription_Parser>("DownloadableSubscription_Parser")
142 .property("redirect", &DownloadableSubscription_Parser::GetRedirect) 142 .property("redirect", &DownloadableSubscription_Parser::GetRedirect)
143 .property("homepage", &DownloadableSubscription_Parser::GetHomepage) 143 .property("homepage", &DownloadableSubscription_Parser::GetHomepage)
144 .property("error", &DownloadableSubscription_Parser::GetError)
144 .function("process", &DownloadableSubscription_Parser::Process) 145 .function("process", &DownloadableSubscription_Parser::Process)
145 .function("finalize", &DownloadableSubscription_Parser::Finalize); 146 .function("finalize", &DownloadableSubscription_Parser::Finalize);
146 147
147 singleton<FilterStorage>("FilterStorage", &FilterStorage::GetInstance) 148 singleton<FilterStorage>("FilterStorage", &FilterStorage::GetInstance)
148 .property("subscriptionCount", &FilterStorage::GetSubscriptionCount) 149 .property("subscriptionCount", &FilterStorage::GetSubscriptionCount)
149 .function("subscriptionAt", &FilterStorage::SubscriptionAt) 150 .function("subscriptionAt", &FilterStorage::SubscriptionAt)
150 .function("indexOfSubscription", &FilterStorage::IndexOfSubscription) 151 .function("indexOfSubscription", &FilterStorage::IndexOfSubscription)
151 .function("getSubscriptionForFilter", &FilterStorage::GetSubscriptionFor Filter) 152 .function("getSubscriptionForFilter", &FilterStorage::GetSubscriptionFor Filter)
152 .function("addSubscription", &FilterStorage::AddSubscription) 153 .function("addSubscription", &FilterStorage::AddSubscription)
153 .function("removeSubscription", &FilterStorage::RemoveSubscription) 154 .function("removeSubscription", &FilterStorage::RemoveSubscription)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 187 }
187 catch (const std::exception& e) 188 catch (const std::exception& e)
188 { 189 {
189 EM_ASM_ARGS( 190 EM_ASM_ARGS(
190 console.error("Error occurred generating JavaScript bindings: " + 191 console.error("Error occurred generating JavaScript bindings: " +
191 Module.AsciiToString($0)), e.what() 192 Module.AsciiToString($0)), e.what()
192 ); 193 );
193 return 1; 194 return 1;
194 } 195 }
195 } 196 }
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