| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | |
| 3 * Copyright (C) 2006-present eyeo GmbH | |
| 4 * | |
| 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 | |
| 7 * published by the Free Software Foundation. | |
| 8 * | |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 12 * GNU General Public License for more details. | |
| 13 * | |
| 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/>. | |
| 16 */ | |
| 17 | |
| 18 #include "JniJsValue.h" | |
| 19 #include "JniFilter.h" | |
| 20 #include "JniLogSystem.h" | |
| 21 #include "JniCallbacks.h" | |
| 22 #include "JniNotification.h" | |
| 23 #include "JniWebRequest.h" | |
| 24 | |
| 25 jint JNI_OnLoad(JavaVM* vm, void* reserved) | |
| 26 { | |
| 27 JNIEnv* env; | |
| 28 if (vm->GetEnv(reinterpret_cast<void**>(&env), ABP_JNI_VERSION) != JNI_OK) | |
| 29 { | |
| 30 return JNI_ERR; | |
| 31 } | |
| 32 | |
| 33 JniJsValue_OnLoad(vm, env, reserved); | |
| 34 JniFilter_OnLoad(vm, env, reserved); | |
| 35 JniLogSystem_OnLoad(vm, env, reserved); | |
| 36 JniCallbacks_OnLoad(vm, env, reserved); | |
| 37 JniNotification_OnLoad(vm, env, reserved); | |
| 38 JniWebRequest_OnLoad(vm, env, reserved); | |
| 39 JniUtils_OnLoad(vm, env, reserved); | |
| 40 | |
| 41 return ABP_JNI_VERSION; | |
| 42 } | |
| 43 | |
| 44 void JNI_OnUnload(JavaVM* vm, void* reserved) | |
| 45 { | |
| 46 JNIEnv* env; | |
| 47 if (vm->GetEnv(reinterpret_cast<void**>(&env), ABP_JNI_VERSION) != JNI_OK) | |
| 48 { | |
| 49 return; | |
| 50 } | |
| 51 | |
| 52 JniJsValue_OnUnload(vm, env, reserved); | |
| 53 JniFilter_OnUnload(vm, env, reserved); | |
| 54 JniLogSystem_OnUnload(vm, env, reserved); | |
| 55 JniCallbacks_OnUnload(vm, env, reserved); | |
| 56 JniNotification_OnUnload(vm, env, reserved); | |
| 57 JniWebRequest_OnUnload(vm, env, reserved); | |
| 58 JniUtils_OnUnload(vm, env, reserved); | |
| 59 } | |
| OLD | NEW |