本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例11: registerNatives
static int registerNatives(JNIEnv* env)
{
if (!registerNativeMethods(env, classPathName,
methods, NELEM(methods))) {
return JNI_FALSE;
}
return JNI_TRUE;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}