OLD | NEW |
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 20 matching lines...) Expand all Loading... |
31 #include "../filter/ElemHideException.h" | 31 #include "../filter/ElemHideException.h" |
32 #include "../filter/ElemHideEmulationFilter.h" | 32 #include "../filter/ElemHideEmulationFilter.h" |
33 #include "../subscription/Subscription.h" | 33 #include "../subscription/Subscription.h" |
34 #include "../subscription/DownloadableSubscription.h" | 34 #include "../subscription/DownloadableSubscription.h" |
35 #include "../subscription/UserDefinedSubscription.h" | 35 #include "../subscription/UserDefinedSubscription.h" |
36 #include "../storage/FilterStorage.h" | 36 #include "../storage/FilterStorage.h" |
37 #include "../ElemHide.h" | 37 #include "../ElemHide.h" |
38 #include "../ElemHideEmulation.h" | 38 #include "../ElemHideEmulation.h" |
39 #include "../FilterNotifier.h" | 39 #include "../FilterNotifier.h" |
40 | 40 |
| 41 ABP_NS_USING |
| 42 |
41 int main() | 43 int main() |
42 { | 44 { |
43 try | 45 try |
44 { | 46 { |
45 class_<Filter>("Filter") | 47 class_<Filter>("Filter") |
46 .property("text", &Filter::GetText) | 48 .property("text", &Filter::GetText) |
47 .function("serialize", &Filter::Serialize) | 49 .function("serialize", &Filter::Serialize) |
48 .class_function("fromText", &Filter::FromText) | 50 .class_function("fromText", &Filter::FromText) |
49 .subclass_differentiator(&Filter::mType, { | 51 .subclass_differentiator(&Filter::mType, { |
50 {Filter::Type::INVALID, "InvalidFilter"}, | 52 {Filter::Type::INVALID, "InvalidFilter"}, |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 } | 178 } |
177 catch (const std::exception& e) | 179 catch (const std::exception& e) |
178 { | 180 { |
179 EM_ASM_ARGS( | 181 EM_ASM_ARGS( |
180 console.error("Error occurred generating JavaScript bindings: " + | 182 console.error("Error occurred generating JavaScript bindings: " + |
181 Module.AsciiToString($0)), e.what() | 183 Module.AsciiToString($0)), e.what() |
182 ); | 184 ); |
183 return 1; | 185 return 1; |
184 } | 186 } |
185 } | 187 } |
OLD | NEW |