13f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe/*
23f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe * Copyright (C) 2015 The Android Open Source Project
33f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe *
43f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe * Licensed under the Apache License, Version 2.0 (the "License");
53f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe * you may not use this file except in compliance with the License.
63f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe * You may obtain a copy of the License at
73f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe *
83f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe *      http://www.apache.org/licenses/LICENSE-2.0
93f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe *
103f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe * Unless required by applicable law or agreed to in writing, software
113f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe * distributed under the License is distributed on an "AS IS" BASIS,
123f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
133f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe * See the License for the specific language governing permissions and
143f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe * limitations under the License.
153f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe */
163f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe
173f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe#include "jni.h"
183f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe
193f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampenamespace art {
203f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe
213f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe// Simple empty method. We will check for correct registration with UnsatisfiedLinkError.
223f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampestatic void foo(JNIEnv*, jclass) {
233f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe}
243f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe
253f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampestatic JNINativeMethod gMethods[] = {
263f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe    { "foo", "()V", reinterpret_cast<void*>(foo) }
273f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe};
283f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe
293f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampeextern "C" JNIEXPORT jint JNICALL Java_Main_registerNatives(JNIEnv* env, jclass, jclass trg) {
303f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe  return env->RegisterNatives(trg, gMethods, 1);
313f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe}
323f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe
333f1dc56914177993b1b018bf21ce7d39d7feecdaAndreas Gampe}  // namespace art
34