| 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 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/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 #include <AdblockPlus.h> | 18 #include <AdblockPlus.h> |
| 19 #include "Utils.h" | 19 #include "Utils.h" |
| 20 #include "JniJsValue.h" | |
| 21 | 20 |
| 22 static AdblockPlus::Subscription* GetSubscriptionPtr(jlong ptr) | 21 static AdblockPlus::Subscription* GetSubscriptionPtr(jlong ptr) |
| 23 { | 22 { |
| 24 return JniLongToTypePtr<AdblockPlus::Subscription>(ptr); | 23 return JniLongToTypePtr<AdblockPlus::Subscription>(ptr); |
| 25 } | 24 } |
| 26 | 25 |
| 27 static jboolean JNICALL JniIsDisabled(JNIEnv* env, jclass clazz, jlong ptr) | 26 static jboolean JNICALL JniIsDisabled(JNIEnv* env, jclass clazz, jlong ptr) |
| 28 { | 27 { |
| 29 try | 28 try |
| 30 { | 29 { |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 { (char*)"updateFilters", (char*)"(J)V", (void*)JniUpdateFilters }, | 117 { (char*)"updateFilters", (char*)"(J)V", (void*)JniUpdateFilters }, |
| 119 { (char*)"isUpdating", (char*)"(J)Z", (void*)JniIsUpdating }, | 118 { (char*)"isUpdating", (char*)"(J)Z", (void*)JniIsUpdating }, |
| 120 { (char*)"operatorEquals", (char*)"(JJ)Z", (void*)JniOperatorEquals }, | 119 { (char*)"operatorEquals", (char*)"(JJ)Z", (void*)JniOperatorEquals }, |
| 121 { (char*)"isAcceptableAds", (char*)"(J)Z", (void*)JniIsAcceptableAds }, | 120 { (char*)"isAcceptableAds", (char*)"(J)Z", (void*)JniIsAcceptableAds }, |
| 122 }; | 121 }; |
| 123 | 122 |
| 124 extern "C" JNIEXPORT void JNICALL Java_org_adblockplus_libadblockplus_Subscripti
on_registerNatives(JNIEnv *env, jclass clazz) | 123 extern "C" JNIEXPORT void JNICALL Java_org_adblockplus_libadblockplus_Subscripti
on_registerNatives(JNIEnv *env, jclass clazz) |
| 125 { | 124 { |
| 126 env->RegisterNatives(clazz, methods, sizeof(methods) / sizeof(methods[0])); | 125 env->RegisterNatives(clazz, methods, sizeof(methods) / sizeof(methods[0])); |
| 127 } | 126 } |
| OLD | NEW |