Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
f545d1d9
Commit
f545d1d9
authored
Oct 19, 2017
by
Sylvain Berfini
🐮
Browse files
Use create_core_2 in Java wrapper
parent
95ead058
Changes
2
Hide whitespace changes
Inline
Side-by-side
wrappers/java/java_class.mustache
View file @
f545d1d9
...
...
@@ -97,7 +97,7 @@ public {{#isLinphoneFactory}}abstract class{{/isLinphoneFactory}}{{#isNotLinphon
abstract public void setDebugMode(boolean enable, String tag);
abstract public Core createCore(CoreListener listener, String configPath, String factoryConfigPath);
abstract public Core createCore(CoreListener listener, String configPath, String factoryConfigPath
, Context context
);
{{/
isLinphoneFactory
}}
{{#
isLinphoneCore
}}
...
...
@@ -171,10 +171,10 @@ class {{classImplName}} {{#isLinphoneFactory}}extends{{/isLinphoneFactory}}{{#is
@Override
public native void setDebugMode(boolean enable, String tag);
private native Core createCore(Factory factory, CoreListener listener, String configPath, String factoryConfigPath);
private native Core createCore(Factory factory, CoreListener listener, String configPath, String factoryConfigPath
, Context context
);
@Override
public Core createCore(CoreListener listener, String configPath, String factoryConfigPath) {
return createCore(this, listener, configPath, factoryConfigPath);
public Core createCore(CoreListener listener, String configPath, String factoryConfigPath
, Context context
) {
return createCore(this, listener, configPath, factoryConfigPath
, context
);
}
{{/
isLinphoneFactory
}}
...
...
wrappers/java/jni.mustache
View file @
f545d1d9
...
...
@@ -363,7 +363,7 @@ jobject Java_{{jni_package}}CoreImpl_getMediastreamerFactory(JNIEnv *env, jobjec
return env->NewObject(ljb->ms_factory_class, ljb->ms_factory_class_constructor, (jlong)factory);
}
jobject Java_
{{
jni_package
}}
FactoryImpl_createCore(JNIEnv *env, jobject thiz, jobject jfactory, jobject jlistener, jstring jconfig_path, jstring jfactory_config_path) {
jobject Java_
{{
jni_package
}}
FactoryImpl_createCore(JNIEnv *env, jobject thiz, jobject jfactory, jobject jlistener, jstring jconfig_path, jstring jfactory_config_path
, jobject jcontext
) {
LinphoneFactory *cptr = linphone_factory_get();
SetObjectNativePtr(env, jfactory, (jlong)cptr); // Set the C factory ptr as Factory.nativePtr for next factory calls
...
...
@@ -409,7 +409,7 @@ jobject Java_{{jni_package}}FactoryImpl_createCore(JNIEnv *env, jobject thiz, jo
linphone_core_cbs_set_log_collection_upload_state_changed(cbs, linphone_core_on_log_collection_upload_state_changed);
linphone_core_cbs_set_dtmf_received(cbs, linphone_core_on_dtmf_received);
core = linphone_factory_create_core(linphone_factory_get(), cbs, config_path, factory_config_path);
core = linphone_factory_create_core
_2
(linphone_factory_get(), cbs, config_path, factory_config_path
, NULL, (void *)jcontext
);
ReleaseStringUTFChars(env, jconfig_path, config_path);
ReleaseStringUTFChars(env, jfactory_config_path, factory_config_path);
...
...
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