Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in / Register
Toggle navigation
J
jami-daemon
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
118
Issues
118
List
Boards
Labels
Milestones
Security & Compliance
Security & Compliance
Dependency List
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
savoirfairelinux
jami-daemon
Commits
8ae44ea7
Commit
8ae44ea7
authored
May 31, 2017
by
Adrien Béraud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unneeded file
Change-Id: I0c3f35056e43047fa23ca97ef34b6a4db7a4a079
parent
cd37f099
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
73 deletions
+0
-73
bin/nodejs/ringservice.c.template
bin/nodejs/ringservice.c.template
+0
-73
No files found.
bin/nodejs/ringservice.c.template
deleted
100644 → 0
View file @
cd37f099
#include "logger.h"
JavaVM *gJavaVM;
const char *kringservicePath = "cx/ring/daemon/RingserviceJNI";
void deinitClassHelper(JNIEnv *env, jobject obj) {
RING_INFO("deinitClassHelper");
/* delete cached object instances */
env->DeleteGlobalRef(obj);
RING_INFO("deinitClassHelper: object %x deleted", obj);
}
JNIEXPORT jint JNI_OnLoad(JavaVM *vm, void *reserved) {
JNIEnv *env;
jclass clazz;
jint r;
RING_INFO("JNI_OnLoad");
//Assume it is c++
r = vm->GetEnv ((void **) &env, JNI_VERSION_1_6);
if (r != JNI_OK) {
RING_ERR("JNI_OnLoad: failed to get the environment using GetEnv()");
return -1;
}
RING_INFO("JNI_Onload: GetEnv %p", env);
clazz = env->FindClass (kringservicePath);
if (!clazz) {
RING_ERR("JNI_Onload: whoops, %s class not found!", kringservicePath);
}
gJavaVM = vm;
RING_INFO("JNI_Onload: JavaVM %p", gJavaVM);
/* put instances of class object we need into cache */
//initClassHelper(env, kManagerPath, &gManagerObject);
JNINativeMethod methods[] = {
$defs
};
r = env->RegisterNatives (clazz, methods, (int) (sizeof(methods) / sizeof(methods[0])));
return JNI_VERSION_1_6;
}
void JNI_OnUnLoad(JavaVM* vm, void* reserved) {
JNIEnv* env;
jclass clazz;
RING_INFO("JNI_OnUnLoad");
/* get env */
if (vm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6) != JNI_OK) {
RING_ERR("JNI_OnUnLoad: failed to get the environment using GetEnv()");
return;
}
RING_INFO("JNI_OnUnLoad: GetEnv %p", env);
/* Get jclass with env->FindClass */
clazz = env->FindClass(kringservicePath);
if (!clazz) {
RING_ERR("JNI_OnUnLoad: whoops, %s class not found!", kringservicePath);
}
/* remove instances of class object we need into cache */
//deinitClassHelper(env, gManagerObject);
env->UnregisterNatives(clazz);
RING_INFO("JNI_OnUnLoad: Native functions unregistered");
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment