当前位置: 首页>>代码示例>>C++>>正文


C++ registerNativeMethods函数代码示例

本文整理汇总了C++中registerNativeMethods函数的典型用法代码示例。如果您正苦于以下问题:C++ registerNativeMethods函数的具体用法?C++ registerNativeMethods怎么用?C++ registerNativeMethods使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了registerNativeMethods函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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


注:本文中的registerNativeMethods函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。