本文整理汇总了C++中registerNativeMethods函数的典型用法代码示例。如果您正苦于以下问题:C++ registerNativeMethods函数的具体用法?C++ registerNativeMethods怎么用?C++ registerNativeMethods使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了registerNativeMethods函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: registerNatives
/*
* Register native methods.
*/
static int registerNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, "com/android/im/imps/WbxmlParser",
parserMethods, sizeof(parserMethods) / sizeof(parserMethods[0])))
return JNI_FALSE;
if (!registerNativeMethods(env, "com/android/im/imps/WbxmlSerializer",
encoderMethods, sizeof(encoderMethods) / sizeof(encoderMethods[0])))
return JNI_FALSE;
return JNI_TRUE;
}
开发者ID:0omega,项目名称:platform_packages_apps_im,代码行数:15,代码来源:wbxml_jni.cpp
示例2: registerNatives
/*
* Register native methods for all classes we know about.
*/
static int registerNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, "android/drm/mobile1/DrmRawContent",
gDrmRawContentMethods, sizeof(gDrmRawContentMethods) / sizeof(gDrmRawContentMethods[0])))
return JNI_FALSE;
if (!registerNativeMethods(env, "android/drm/mobile1/DrmRights",
gDrmRightsMethods, sizeof(gDrmRightsMethods) / sizeof(gDrmRightsMethods[0])))
return JNI_FALSE;
if (!registerNativeMethods(env, "android/drm/mobile1/DrmRightsManager",
gDrmRightsManagerMethods, sizeof(gDrmRightsManagerMethods) / sizeof(gDrmRightsManagerMethods[0])))
return JNI_FALSE;
return JNI_TRUE;
}
开发者ID:Abhishekh-TEL,项目名称:pdroid,代码行数:19,代码来源:drm1_jni.c
示例3: registerNatives
/*
* Register native methods for all classes we know about.
*/
static int registerNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, QtNativeClassPathName, methods, sizeof(methods) / sizeof(methods[0])))
return JNI_FALSE;
return JNI_TRUE;
}
开发者ID:meetshah1995,项目名称:stellarium-finger,代码行数:10,代码来源:qtmain_android.cpp
示例4: registerNatives
/*
* Register native methods for all classes we know about.
*
* returns JNI_TRUE on success.
*/
static int registerNatives(JNIEnv* env)
{
static const char *classPathName = "net/momodalo/app/vimtouch/Exec";
if (!registerNativeMethods(env, classPathName, method_table,
ARRLEN(method_table)))
return JNI_FALSE;
/* get class */
jclass clazz = env->FindClass(classPathName);
class_Exec = (jclass)env->NewGlobalRef(clazz);
if (class_Exec == NULL) {
return -1;
}
method_Exec_showDialog = env->GetStaticMethodID(class_Exec, "showDialog", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V");
if (method_Exec_showDialog == NULL) {
LOGE("Can't find Exec.showDialog");
return -1;
}
method_Exec_getDialogState = env->GetStaticMethodID(class_Exec, "getDialogState", "()I");
if (method_Exec_getDialogState == NULL) {
LOGE("Can't find Exec.getDialogState");
return -1;
}
method_Exec_quit = env->GetStaticMethodID(class_Exec, "quit", "()V");
if (method_Exec_quit == NULL) {
LOGE("Can't find Exec.quit");
return -1;
}
method_Exec_getClipText = env->GetStaticMethodID(class_Exec, "getClipText", "()Ljava/lang/String;");
if (method_Exec_getClipText == NULL) {
LOGE("Can't find Exec.getClipText");
return -1;
}
method_Exec_setClipText = env->GetStaticMethodID(class_Exec, "setClipText", "(Ljava/lang/String;)V");
if (method_Exec_setClipText == NULL) {
LOGE("Can't find Exec.setClipText");
return -1;
}
method_Exec_setTabLabels = env->GetStaticMethodID(class_Exec, "setTabLabels", "([Ljava/lang/String;)V");
if (method_Exec_setTabLabels == NULL) {
LOGE("Can't find Exec.setTabLabels");
return -1;
}
method_Exec_setCurTab = env->GetStaticMethodID(class_Exec, "setCurTab", "(I)V");
if (method_Exec_setCurTab == NULL) {
LOGE("Can't find Exec.setCurTab");
return -1;
}
method_Exec_showTab = env->GetStaticMethodID(class_Exec, "showTab", "(I)V");
if (method_Exec_showTab == NULL) {
LOGE("Can't find Exec.showTab");
return -1;
}
return JNI_TRUE;
}
开发者ID:abscasey,项目名称:vimtouch,代码行数:65,代码来源:termExec.cpp
示例5: registerNatives
/*
* Register native methods for all classes we know about.
*
* returns JNI_TRUE on success.
*/
static int registerNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, classPathName, method_table,
sizeof(method_table) / sizeof(method_table[0]))) {
return JNI_FALSE;
}
/* get class */
jclass clazz = env->FindClass(classPathName);
class_Exec = (jclass)env->NewGlobalRef(clazz);
if (class_Exec == NULL) {
return -1;
}
method_Exec_showDialog = env->GetStaticMethodID(class_Exec, "showDialog", "(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)V");
if (method_Exec_showDialog == NULL) {
LOGE("Can't find Exec.showDialog");
return -1;
}
method_Exec_getDialogState = env->GetStaticMethodID(class_Exec, "getDialogState", "()I");
if (method_Exec_getDialogState == NULL) {
LOGE("Can't find Exec.getDialogState");
return -1;
}
return JNI_TRUE;
}
开发者ID:Smileyt,项目名称:vimtouch,代码行数:34,代码来源:termExec.cpp
示例6: registerNatives
static int registerNatives(JNIEnv* env) {
if (!registerNativeMethods(env, "com/jni/DynamicRegisterMethod", gmethods,
sizeof(gmethods) / sizeof(gmethods[0]))) {
return JNI_FALSE;
}
return JNI_TRUE;
}
开发者ID:EricChen2013,项目名称:android-3,代码行数:7,代码来源:dynamicRegisterMethod.c
示例7: registerNatives
/*
* Register native methods for all classes we know about.
*/
static int registerNatives(JNIEnv* env) {
if (!registerNativeMethods(env, JNIREG_CLASS, gMethods,
sizeof(gMethods) / sizeof(gMethods[0])))
return JNI_FALSE;
return JNI_TRUE;
}
开发者ID:hai046,项目名称:JNIFrame,代码行数:10,代码来源:NDKIMP.cpp
示例8: init_Exec
int init_Exec(JNIEnv *env) {
if (!registerNativeMethods(env, classPathName, method_table,
sizeof(method_table) / sizeof(method_table[0]))) {
return JNI_FALSE;
}
return JNI_TRUE;
}
开发者ID:AaronDP,项目名称:tea_adbshell,代码行数:8,代码来源:termExec.cpp
示例9: registerNatives
/*
* Register native methods for all classes we know about.
*/
static int registerNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, "sbt/android/mill/helloworldjni/HelloWorldAndroidJNI$",
HelloWorldMethods, sizeof(HelloWorldMethods) / sizeof(HelloWorldMethods[0])))
return JNI_FALSE;
return JNI_TRUE;
}
开发者ID:sbt-android-mill,项目名称:sbt-android-mill,代码行数:11,代码来源:HelloWorldAndroidJNI.c
示例10: register_convert_pipeline
int register_convert_pipeline(JNIEnv *env) {
LOGV("register_convert_pipeline:");
if (registerNativeMethods(env,
"com/serenegiant/usb/ConvertPipeline",
methods, NUM_ARRAY_ELEMENTS(methods)) < 0) {
return -1;
}
return 0;
}
开发者ID:AntonioMA,项目名称:UVCCamera,代码行数:9,代码来源:ConvertPipeline.cpp
示例11: registerNatives
static int registerNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, classPathName,
methods, NELEM(methods))) {
return JNI_FALSE;
}
return JNI_TRUE;
}
开发者ID:kuangzt,项目名称:Practice4Android,代码行数:9,代码来源:nmath.c
示例12: registerNatives
static int registerNatives(JNIEnv *env)
{
if (!registerNativeMethods(env, CALLBACK_BANG_CLASS,
gMethods, sizeof(gMethods) / sizeof(gMethods[0]))) {
return JNI_FALSE;
}
return JNI_TRUE;
}
开发者ID:bigclean,项目名称:moc,代码行数:9,代码来源:j_moc.c
示例13: registerMpoNatives
/*
* Register native methods for all classes we know about.
*
* returns JNI_TRUE on success.
*/
int registerMpoNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, classPathName,
methods, sizeof(methods) / sizeof(methods[0]))) {
return JNI_FALSE;
}
return JNI_TRUE;
}
开发者ID:rombaby,项目名称:MT6735_Longcheer,代码行数:14,代码来源:com_mediatek_mpodecoder.cpp
示例14: registerNatives
/*
* Register native methods for all classes we know about.
*
* returns JNI_TRUE on success.
*/
static int registerNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, CLASS_PATH_NAME, method_table,
sizeof(method_table) / sizeof(method_table[0]))) {
return JNI_FALSE;
}
return JNI_TRUE;
}
开发者ID:shawn-zhang,项目名称:NetworkUtils,代码行数:14,代码来源:os.cpp
示例15: register_uvccamera
int register_uvccamera(JNIEnv *env) {
LOGV("register_uvccamera:");
if (registerNativeMethods(env,
"com/serenegiant/usb/UVCCamera",
methods, NUM_ARRAY_ELEMENTS(methods)) < 0) {
return -1;
}
return 0;
}
开发者ID:Volcanoscar,项目名称:UVCCameraDemo,代码行数:9,代码来源:serenegiant_usb_UVCCamera.cpp
示例16: JNI_OnLoad
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) {
JNIEnv* env = NULL;
if ((*vm)->GetEnv(vm, (void**) &env, JNI_VERSION_1_4) != JNI_OK) {
return -1;
}
if(!registerNativeMethods(env, "lewa/os/Shell", gNativeMethods, sizeof(gNativeMethods) / sizeof(gNativeMethods[0]))) {
return -1;
}
return JNI_VERSION_1_4;
}
开发者ID:xufeifandj,项目名称:My-Launcher,代码行数:10,代码来源:lewa_shell.c
示例17: registerNatives
static int registerNatives(JNIEnv* env) {
if (!registerNativeMethods(
env,
kHandlerClassName,
methods,
sizeof(methods) / sizeof(methods[0]))) {
return JNI_FALSE;
}
return JNI_TRUE;
}
开发者ID:kunny,项目名称:fresco,代码行数:10,代码来源:webp_bitmapfactory.cpp
示例18: registerNatives
/*
* Register native methods for all classes we know about.
*
* returns JNI_TRUE on success.
*/
static int registerNatives(JNIEnv* env)
{
// ע���²��ŵĺ���
if (!registerNativeMethods(env, classPathNameJniChannelPlay,
methodsJniChannelPlay, sizeof(methodsJniChannelPlay) / sizeof(methodsJniChannelPlay[0]))) {
return JNI_FALSE;
}
return JNI_TRUE;
}
开发者ID:cg8530,项目名称:WorkSplace,代码行数:16,代码来源:JNILoader.cpp
示例19: JNI_OnLoad
jint JNI_OnLoad(JavaVM* vm, void* reserved) {
JNIEnv* env;
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
return -1;
}
if (!registerNativeMethods(env, kClassPathName,
kMethods, sizeof(kMethods) / sizeof(kMethods[0]))) {
return -1;
}
return JNI_VERSION_1_6;
}
开发者ID:b-project,项目名称:Messaging,代码行数:11,代码来源:GifTranscoder.cpp
示例20: JNI_OnLoad
jint JNI_OnLoad(JavaVM *vm, void *reserved) {
LOGI("call JNI_OnLoad");
JNIEnv *env = NULL;
if (vm->GetEnv((void **) &env, JNI_VERSION_1_4) != JNI_OK) { //判断 JNI 版本是否为JNI_VERSION_1_4
return JNI_EVERSION;
}
registerNativeMethods(env, className, jni_Methods_table, sizeof(jni_Methods_table) / sizeof(JNINativeMethod));
return JNI_VERSION_1_4;
}
开发者ID:navyifanr,项目名称:AndroidTrainingDemo,代码行数:13,代码来源:dynamic-register-jni.cpp
注:本文中的registerNativeMethods函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论