Commit 05f0a9f8 authored by Sylvain Berfini's avatar Sylvain Berfini 🐮
Browse files

Fixed old JNI file by replacing every JNIEXPORT by extern C

parent 903831c4
......@@ -96,7 +96,7 @@ void linphone_android_log_handler(int prio, char *str) {
}
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreFactoryImpl__1setLogHandler(JNIEnv *env, jobject jfactory, jobject jhandler) {
extern "C" void Java_org_linphone_core_LinphoneCoreFactoryImpl__1setLogHandler(JNIEnv *env, jobject jfactory, jobject jhandler) {
if (handler_obj) {
env->DeleteGlobalRef(handler_obj);
handler_obj = NULL;
......@@ -163,7 +163,7 @@ extern "C" void setMediastreamerAndroidContext(JNIEnv *env, void *context) {
#endif /* __ANDROID__ */
JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *ajvm, void *reserved)
extern "C" jint JNI_OnLoad(JavaVM *ajvm, void *reserved)
{
#ifdef __ANDROID__
ms_set_jvm(ajvm);
......@@ -1720,11 +1720,11 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_migrateToMultiTransport(
* Method: createInfoMessage
* Signature: (J)J
*/
JNIEXPORT jlong JNICALL Java_org_linphone_core_LinphoneCoreImpl_createInfoMessage(JNIEnv *, jobject jobj, jlong lcptr){
extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_createInfoMessage(JNIEnv *, jobject jobj, jlong lcptr){
return (jlong) linphone_core_create_info_message((LinphoneCore*)lcptr);
}
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCallImpl_sendInfoMessage(JNIEnv *env, jobject jobj, jlong callptr, jlong infoptr){
extern "C" jint Java_org_linphone_core_LinphoneCallImpl_sendInfoMessage(JNIEnv *env, jobject jobj, jlong callptr, jlong infoptr){
return linphone_call_send_info_message((LinphoneCall*)callptr,(LinphoneInfoMessage*)infoptr);
}
......@@ -2176,7 +2176,7 @@ extern "C" jlongArray Java_org_linphone_core_LinphoneCoreImpl_listVideoPayloadTy
return jCodecs;
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setVideoCodecs(JNIEnv *env, jobject thiz, jlong lc, jlongArray jCodecs) {
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setVideoCodecs(JNIEnv *env, jobject thiz, jlong lc, jlongArray jCodecs) {
bctbx_list_t *pts = NULL;
int codecsCount = env->GetArrayLength(jCodecs);
jlong *codecs = env->GetLongArrayElements(jCodecs, NULL);
......@@ -2206,7 +2206,7 @@ extern "C" jlongArray Java_org_linphone_core_LinphoneCoreImpl_listAudioPayloadTy
return jCodecs;
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setAudioCodecs(JNIEnv *env, jobject thiz, jlong lc, jlongArray jCodecs) {
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setAudioCodecs(JNIEnv *env, jobject thiz, jlong lc, jlongArray jCodecs) {
bctbx_list_t *pts = NULL;
int codecsCount = env->GetArrayLength(jCodecs);
jlong *codecs = env->GetLongArrayElements(jCodecs, NULL);
......@@ -2478,7 +2478,7 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getPresenceInfo(JNIEnv *
* Method: setPresenceModel
* Signature: (JILjava/lang/String;J)V
*/
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setPresenceModel(JNIEnv *env, jobject jobj, jlong ptr, jlong modelPtr) {
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPresenceModel(JNIEnv *env, jobject jobj, jlong ptr, jlong modelPtr) {
LinphoneCore *lc = (LinphoneCore *)ptr;
LinphonePresenceModel *model = (LinphonePresenceModel *)modelPtr;
linphone_core_set_presence_model(lc, model);
......@@ -2489,7 +2489,7 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setPresenceModel(
* Method: getPresenceModel
* Signature: (J)Ljava/lang/Object;
*/
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_getPresenceModel(JNIEnv *env, jobject jobj, jlong ptr) {
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_getPresenceModel(JNIEnv *env, jobject jobj, jlong ptr) {
LinphoneCore *lc = (LinphoneCore *)ptr;
LinphonePresenceModel *model = linphone_core_get_presence_model(lc);
if (model == NULL) return NULL;
......@@ -2767,7 +2767,7 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setLimeEncryption(JNIEnv
* Method: disableChat
* Signature: (JI)V
*/
extern "C" JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_disableChat(JNIEnv *env, jobject jobj, jlong ptr, jint reason){
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_disableChat(JNIEnv *env, jobject jobj, jlong ptr, jint reason){
linphone_core_disable_chat((LinphoneCore*)ptr,(LinphoneReason)reason);
}
......@@ -2776,7 +2776,7 @@ extern "C" JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_disabl
* Method: enableChat
* Signature: (J)V
*/
extern "C" JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_enableChat(JNIEnv *env, jobject jobj, jlong ptr){
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableChat(JNIEnv *env, jobject jobj, jlong ptr){
linphone_core_enable_chat((LinphoneCore*)ptr);
}
......@@ -2785,7 +2785,7 @@ extern "C" JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_enable
* Method: chatEnabled
* Signature: (J)Z
*/
extern "C" JNIEXPORT jboolean JNICALL Java_org_linphone_core_LinphoneCoreImpl_chatEnabled(JNIEnv *env, jobject jobj, jlong ptr){
extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_chatEnabled(JNIEnv *env, jobject jobj, jlong ptr){
return (jboolean) linphone_core_chat_enabled((LinphoneCore*)ptr);
}
......@@ -2857,7 +2857,7 @@ extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getContactUriP
return params ? env->NewStringUTF(params) : NULL;
}
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_getNatPolicy(JNIEnv* env,jobject thiz,jlong proxyCfg) {
extern "C" jobject Java_org_linphone_core_LinphoneProxyConfigImpl_getNatPolicy(JNIEnv* env,jobject thiz,jlong proxyCfg) {
LinphoneNatPolicy *nat_policy = linphone_proxy_config_get_nat_policy((LinphoneProxyConfig *)proxyCfg);
return (nat_policy != NULL) ? getNatPolicy(env, nat_policy) : NULL;
}
......@@ -3021,7 +3021,7 @@ extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_delete(JNIEnv* env
* Method: getPassword
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getPassword
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getPassword
(JNIEnv *env , jobject, jlong auth_info) {
const char* passwd = linphone_auth_info_get_passwd((LinphoneAuthInfo*)auth_info);
if (passwd) {
......@@ -3035,7 +3035,7 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getPasswor
* Method: getRealm
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getRealm
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getRealm
(JNIEnv *env , jobject, jlong auth_info) {
const char* realm = linphone_auth_info_get_realm((LinphoneAuthInfo*)auth_info);
if (realm) {
......@@ -3050,7 +3050,7 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getRealm
* Method: getDomain
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getDomain
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getDomain
(JNIEnv *env , jobject, jlong auth_info) {
const char* domain = linphone_auth_info_get_domain((LinphoneAuthInfo*)auth_info);
if (domain) {
......@@ -3065,7 +3065,7 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getDomain
* Method: getUsername
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getUsername
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getUsername
(JNIEnv *env , jobject, jlong auth_info) {
const char* username = linphone_auth_info_get_username((LinphoneAuthInfo*)auth_info);
if (username) {
......@@ -3080,7 +3080,7 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getUsernam
* Method: setPassword
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setPassword
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setPassword
(JNIEnv *env, jobject, jlong auth_info, jstring jpassword) {
const char* password = GetStringUTFChars(env, jpassword);
linphone_auth_info_set_passwd((LinphoneAuthInfo*)auth_info,password);
......@@ -3092,7 +3092,7 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setPassword
* Method: setRealm
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setRealm
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setRealm
(JNIEnv *env, jobject, jlong auth_info, jstring jrealm) {
const char* realm = GetStringUTFChars(env, jrealm);
linphone_auth_info_set_realm((LinphoneAuthInfo*)auth_info,realm);
......@@ -3104,7 +3104,7 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setRealm
* Method: setDomain
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setDomain
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setDomain
(JNIEnv *env, jobject, jlong auth_info, jstring jdomain) {
const char* domain = GetStringUTFChars(env, jdomain);
linphone_auth_info_set_domain((LinphoneAuthInfo*)auth_info, domain);
......@@ -3116,7 +3116,7 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setDomain
* Method: setUsername
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setUsername
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setUsername
(JNIEnv *env, jobject, jlong auth_info, jstring jusername) {
const char* username = GetStringUTFChars(env, jusername);
linphone_auth_info_set_username((LinphoneAuthInfo*)auth_info,username);
......@@ -3128,7 +3128,7 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setUsername
* Method: setAuthUserId
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setUserId
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setUserId
(JNIEnv *env, jobject, jlong auth_info, jstring juserid) {
const char* userid = GetStringUTFChars(env, juserid);
linphone_auth_info_set_userid((LinphoneAuthInfo*)auth_info,userid);
......@@ -3140,7 +3140,7 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setUserId
* Method: getAuthUserId
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getUserId
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getUserId
(JNIEnv *env , jobject, jlong auth_info) {
const char* userid = linphone_auth_info_get_userid((LinphoneAuthInfo*)auth_info);
if (userid) {
......@@ -3155,7 +3155,7 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getUserId
* Method: setHa1
* Signature: (JLjava/lang/String;)V
*/
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setHa1
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setHa1
(JNIEnv *env, jobject, jlong auth_info, jstring jha1) {
const char* ha1 = GetStringUTFChars(env, jha1);
linphone_auth_info_set_ha1((LinphoneAuthInfo*)auth_info,ha1);
......@@ -3168,7 +3168,7 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setHa1
* Method: getHa1
* Signature: (J)Ljava/lang/String;
*/
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getHa1
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getHa1
(JNIEnv *env , jobject, jlong auth_info) {
const char* ha1 = linphone_auth_info_get_ha1((LinphoneAuthInfo*)auth_info);
if (ha1) {
......@@ -3178,35 +3178,35 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getHa1
}
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setTlsCertificate
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setTlsCertificate
(JNIEnv *env, jobject, jlong auth_info, jstring jcert) {
const char* cert = GetStringUTFChars(env, jcert);
linphone_auth_info_set_tls_cert((LinphoneAuthInfo*)auth_info,cert);
ReleaseStringUTFChars(env, jcert, cert);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setTlsKey
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setTlsKey
(JNIEnv *env, jobject, jlong auth_info, jstring jkey) {
const char* key = GetStringUTFChars(env, jkey);
linphone_auth_info_set_tls_key((LinphoneAuthInfo*)auth_info,key);
ReleaseStringUTFChars(env, jkey, key);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setTlsCertificatePath
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setTlsCertificatePath
(JNIEnv *env, jobject, jlong auth_info, jstring jpath) {
const char* path = GetStringUTFChars(env, jpath);
linphone_auth_info_set_tls_cert_path((LinphoneAuthInfo*)auth_info,path);
ReleaseStringUTFChars(env, jpath, path);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_setTlsKeyPath
extern "C" void Java_org_linphone_core_LinphoneAuthInfoImpl_setTlsKeyPath
(JNIEnv *env, jobject, jlong auth_info, jstring jpath) {
const char* path = GetStringUTFChars(env, jpath);
linphone_auth_info_set_tls_key_path((LinphoneAuthInfo*)auth_info,path);
ReleaseStringUTFChars(env, jpath, path);
}
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsCertificate
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsCertificate
(JNIEnv *env , jobject, jlong auth_info) {
const char* cert = linphone_auth_info_get_tls_cert((LinphoneAuthInfo*)auth_info);
if (cert) {
......@@ -3216,7 +3216,7 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsCert
}
}
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsKey
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsKey
(JNIEnv *env , jobject, jlong auth_info) {
const char* key = linphone_auth_info_get_tls_key((LinphoneAuthInfo*)auth_info);
if (key) {
......@@ -3226,7 +3226,7 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsKey
}
}
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsCertificatePath
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsCertificatePath
(JNIEnv *env , jobject, jlong auth_info) {
const char* path = linphone_auth_info_get_tls_cert_path((LinphoneAuthInfo*)auth_info);
if (path) {
......@@ -3236,7 +3236,7 @@ JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsCert
}
}
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsKeyPath
extern "C" jstring Java_org_linphone_core_LinphoneAuthInfoImpl_getTlsKeyPath
(JNIEnv *env , jobject, jlong auth_info) {
const char* path = linphone_auth_info_get_tls_key_path((LinphoneAuthInfo*)auth_info);
if (path) {
......@@ -3619,7 +3619,7 @@ extern "C" void Java_org_linphone_core_LinphoneCallImpl_finalize(JNIEnv* env
linphone_call_unref(call);
}
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCallImpl_getStats(JNIEnv* env
extern "C" jobject Java_org_linphone_core_LinphoneCallImpl_getStats(JNIEnv* env
,jobject thiz
,jlong ptr, jint type) {
LinphoneCall *call=(LinphoneCall*)ptr;
......@@ -3628,7 +3628,7 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCallImpl_getStats(JNIEn
return stats ? env->NewObject(ljb->callStatsClass, ljb->callStatsId, (jlong)stats) : NULL;
}
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCallImpl_getCore(JNIEnv* env
extern "C" jobject Java_org_linphone_core_LinphoneCallImpl_getCore(JNIEnv* env
,jobject thiz
,jlong ptr) {
LinphoneCall *call=(LinphoneCall*)ptr;
......@@ -3731,7 +3731,7 @@ extern "C" jint Java_org_linphone_core_LinphoneCallImpl_getState( JNIEnv* env
* Method: getTransferState
* Signature: (J)I
*/
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCallImpl_getTransferState(JNIEnv *, jobject jobj, jlong callptr){
extern "C" jint Java_org_linphone_core_LinphoneCallImpl_getTransferState(JNIEnv *, jobject jobj, jlong callptr){
LinphoneCall *call=(LinphoneCall*)callptr;
return linphone_call_get_transfer_state(call);
}
......@@ -3741,7 +3741,7 @@ JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCallImpl_getTransferState(
* Method: getTransfererCall
* Signature: (J)Ljava/lang/Object;
*/
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCallImpl_getTransfererCall(JNIEnv *env, jobject jCall, jlong callptr){
extern "C" jobject Java_org_linphone_core_LinphoneCallImpl_getTransfererCall(JNIEnv *env, jobject jCall, jlong callptr){
LinphoneCall *call=(LinphoneCall*)callptr;
LinphoneCall *ret=linphone_call_get_transferer_call(call);
return getCall(env,ret);
......@@ -3752,7 +3752,7 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCallImpl_getTransfererC
* Method: getTransferTargetCall
* Signature: (J)Ljava/lang/Object;
*/
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCallImpl_getTransferTargetCall(JNIEnv *env, jobject jCall, jlong callptr){
extern "C" jobject Java_org_linphone_core_LinphoneCallImpl_getTransferTargetCall(JNIEnv *env, jobject jCall, jlong callptr){
LinphoneCall *call=(LinphoneCall*)callptr;
LinphoneCall *ret=linphone_call_get_transfer_target_call(call);
return getCall(env,ret);
......@@ -4354,14 +4354,12 @@ extern "C" jobject Java_org_linphone_core_LinphoneFriendImpl_getPresenceModelFor
RETURN_USER_DATA_OBJECT("PresenceModelImpl", linphone_presence_model, model);
}
extern
/*
* Class: org_linphone_core_LinphoneFriendImpl
* Method: getPresenceModel
* Signature: (J)Ljava/lang/Object;
*/
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneFriendImpl_getPresenceModel(JNIEnv *env, jobject jobj, jlong ptr) {
extern "C" jobject Java_org_linphone_core_LinphoneFriendImpl_getPresenceModel(JNIEnv *env, jobject jobj, jlong ptr) {
LinphoneFriend *lf = (LinphoneFriend *)ptr;
LinphonePresenceModel *model = (LinphonePresenceModel *)linphone_friend_get_presence_model(lf);
if (model == NULL) return NULL;
......@@ -4510,10 +4508,10 @@ extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_deleteHistory(JNIEnv
,jlong ptr) {
linphone_chat_room_delete_history((LinphoneChatRoom*)ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneChatRoomImpl_compose(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_compose(JNIEnv *env, jobject thiz, jlong ptr) {
linphone_chat_room_compose((LinphoneChatRoom *)ptr);
}
JNIEXPORT jboolean JNICALL Java_org_linphone_core_LinphoneChatRoomImpl_isRemoteComposing(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" jboolean Java_org_linphone_core_LinphoneChatRoomImpl_isRemoteComposing(JNIEnv *env, jobject thiz, jlong ptr) {
return (jboolean)linphone_chat_room_is_remote_composing((LinphoneChatRoom *)ptr);
}
extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_deleteMessage(JNIEnv* env
......@@ -5028,16 +5026,16 @@ extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getFirewallPolicy(JNIEnv
return (jint)linphone_core_get_firewall_policy((LinphoneCore*)lc);
}
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_createNatPolicy(JNIEnv *env, jobject thiz, jlong lc) {
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_createNatPolicy(JNIEnv *env, jobject thiz, jlong lc) {
LinphoneNatPolicy *nat_policy = linphone_core_create_nat_policy((LinphoneCore *)lc);
return (nat_policy != NULL) ? getNatPolicy(env, nat_policy) : NULL;
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setNatPolicy(JNIEnv *env, jobject thiz, jlong lc, jlong jpolicy) {
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setNatPolicy(JNIEnv *env, jobject thiz, jlong lc, jlong jpolicy) {
linphone_core_set_nat_policy((LinphoneCore *)lc, (LinphoneNatPolicy *)jpolicy);
}
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_getNatPolicy(JNIEnv *env, jobject thiz, jlong lc) {
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_getNatPolicy(JNIEnv *env, jobject thiz, jlong lc) {
LinphoneNatPolicy *nat_policy = linphone_core_get_nat_policy((LinphoneCore *)lc);
return (nat_policy != NULL) ? getNatPolicy(env, nat_policy) : NULL;
}
......@@ -5162,7 +5160,7 @@ extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_addCustomHeader(JN
ReleaseStringUTFChars(env, jheader_value, header_value);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_addCustomSdpAttribute(JNIEnv *env, jobject thiz, jlong ptr, jstring jname, jstring jvalue) {
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_addCustomSdpAttribute(JNIEnv *env, jobject thiz, jlong ptr, jstring jname, jstring jvalue) {
const char *name = GetStringUTFChars(env, jname);
const char *value = GetStringUTFChars(env, jvalue);
linphone_call_params_add_custom_sdp_attribute((LinphoneCallParams *)ptr, name, value);
......@@ -5170,7 +5168,7 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_addCustomSd
ReleaseStringUTFChars(env, jvalue, value);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_addCustomSdpMediaAttribute(JNIEnv *env, jobject thiz, jlong ptr, jint jtype, jstring jname, jstring jvalue) {
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_addCustomSdpMediaAttribute(JNIEnv *env, jobject thiz, jlong ptr, jint jtype, jstring jname, jstring jvalue) {
const char *name = GetStringUTFChars(env, jname);
const char *value = GetStringUTFChars(env, jvalue);
linphone_call_params_add_custom_sdp_media_attribute((LinphoneCallParams *)ptr, (LinphoneStreamType)jtype, name, value);
......@@ -5178,25 +5176,25 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_addCustomSd
ReleaseStringUTFChars(env, jvalue, value);
}
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_getCustomSdpAttribute(JNIEnv *env, jobject thiz, jlong ptr, jstring jname) {
extern "C" jstring Java_org_linphone_core_LinphoneCallParamsImpl_getCustomSdpAttribute(JNIEnv *env, jobject thiz, jlong ptr, jstring jname) {
const char *name = GetStringUTFChars(env, jname);
const char *value = linphone_call_params_get_custom_sdp_attribute((LinphoneCallParams *)ptr, name);
ReleaseStringUTFChars(env, jname, name);
return value ? env->NewStringUTF(value) : NULL;
}
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_getCustomSdpMediaAttribute(JNIEnv *env, jobject thiz, jlong ptr, jint jtype, jstring jname) {
extern "C" jstring Java_org_linphone_core_LinphoneCallParamsImpl_getCustomSdpMediaAttribute(JNIEnv *env, jobject thiz, jlong ptr, jint jtype, jstring jname) {
const char *name = GetStringUTFChars(env, jname);
const char *value = linphone_call_params_get_custom_sdp_media_attribute((LinphoneCallParams *)ptr, (LinphoneStreamType)jtype, name);
ReleaseStringUTFChars(env, jname, name);
return value ? env->NewStringUTF(value) : NULL;
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_clearCustomSdpAttributes(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_clearCustomSdpAttributes(JNIEnv *env, jobject thiz, jlong ptr) {
linphone_call_params_clear_custom_sdp_attributes((LinphoneCallParams *)ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_clearCustomSdpMediaAttributes(JNIEnv *env, jobject thiz, jlong ptr, jint jtype) {
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_clearCustomSdpMediaAttributes(JNIEnv *env, jobject thiz, jlong ptr, jint jtype) {
linphone_call_params_clear_custom_sdp_media_attributes((LinphoneCallParams *)ptr, (LinphoneStreamType)jtype);
}
......@@ -5236,19 +5234,19 @@ extern "C" jfloat Java_org_linphone_core_LinphoneCallParamsImpl_getReceivedFrame
return (jfloat)linphone_call_params_get_received_framerate(params);
}
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_getAudioDirection(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" jint Java_org_linphone_core_LinphoneCallParamsImpl_getAudioDirection(JNIEnv *env, jobject thiz, jlong ptr) {
return (jint)linphone_call_params_get_audio_direction((LinphoneCallParams *)ptr);
}
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_getVideoDirection(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" jint Java_org_linphone_core_LinphoneCallParamsImpl_getVideoDirection(JNIEnv *env, jobject thiz, jlong ptr) {
return (jint)linphone_call_params_get_video_direction((LinphoneCallParams *)ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_setAudioDirection(JNIEnv *env, jobject thiz, jlong ptr, jint jdir) {
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_setAudioDirection(JNIEnv *env, jobject thiz, jlong ptr, jint jdir) {
linphone_call_params_set_audio_direction((LinphoneCallParams *)ptr, (LinphoneMediaDirection)jdir);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCallParamsImpl_setVideoDirection(JNIEnv *env, jobject thiz, jlong ptr, jint jdir) {
extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_setVideoDirection(JNIEnv *env, jobject thiz, jlong ptr, jint jdir) {
linphone_call_params_set_video_direction((LinphoneCallParams *)ptr, (LinphoneMediaDirection)jdir);
}
......@@ -5262,7 +5260,7 @@ extern "C" void Java_org_linphone_core_LinphoneCallParamsImpl_destroy(JNIEnv *en
* Method: createCallParams
* Signature: (JJ)J
*/
JNIEXPORT jlong JNICALL Java_org_linphone_core_LinphoneCoreImpl_createCallParams(JNIEnv *env, jobject jcore, jlong coreptr, jlong callptr){
extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_createCallParams(JNIEnv *env, jobject jcore, jlong coreptr, jlong callptr){
return (jlong)linphone_core_create_call_params((LinphoneCore*)coreptr, (LinphoneCall*)callptr);
}
......@@ -5320,7 +5318,7 @@ extern "C" float Java_org_linphone_core_LinphoneCoreImpl_getPreferredFramerate(J
return linphone_core_get_preferred_framerate((LinphoneCore *)lc);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneCoreImpl_setPreferredVideoSizeByName(JNIEnv *env, jobject thiz, jlong lc, jstring jName) {
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setPreferredVideoSizeByName(JNIEnv *env, jobject thiz, jlong lc, jstring jName) {
const char* cName = GetStringUTFChars(env, jName);
linphone_core_set_preferred_video_size_by_name((LinphoneCore *)lc, cName);
ReleaseStringUTFChars(env, jName, cName);
......@@ -5334,7 +5332,7 @@ extern "C" jintArray Java_org_linphone_core_LinphoneCoreImpl_getPreferredVideoSi
return arr;
}
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCoreImpl_getDownloadBandwidth(JNIEnv *env, jobject thiz, jlong lc) {
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getDownloadBandwidth(JNIEnv *env, jobject thiz, jlong lc) {
return (jint) linphone_core_get_download_bandwidth((LinphoneCore *)lc);
}
......@@ -5342,7 +5340,7 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setDownloadBandwidth(JNI
linphone_core_set_download_bandwidth((LinphoneCore *)lc, (int) bw);
}
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneCoreImpl_getUploadBandwidth(JNIEnv *env, jobject thiz, jlong lc) {
extern "C" jint Java_org_linphone_core_LinphoneCoreImpl_getUploadBandwidth(JNIEnv *env, jobject thiz, jlong lc) {
return (jint) linphone_core_get_upload_bandwidth((LinphoneCore *)lc);
}
......@@ -5394,41 +5392,41 @@ extern "C" jint Java_org_linphone_core_LinphoneProxyConfigImpl_getPrivacy(JNIEnv
return (int) linphone_proxy_config_get_privacy((LinphoneProxyConfig *) ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_enableAvpf(JNIEnv *env, jobject thiz, jlong ptr, jboolean enable) {
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_enableAvpf(JNIEnv *env, jobject thiz, jlong ptr, jboolean enable) {
linphone_proxy_config_enable_avpf((LinphoneProxyConfig *)ptr, (bool)enable);
}
JNIEXPORT jboolean JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_avpfEnabled(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" jboolean Java_org_linphone_core_LinphoneProxyConfigImpl_avpfEnabled(JNIEnv *env, jobject thiz, jlong ptr) {
return linphone_proxy_config_avpf_enabled((LinphoneProxyConfig *)ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setAvpfRRInterval(JNIEnv *env, jobject thiz, jlong ptr, jint interval) {
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setAvpfRRInterval(JNIEnv *env, jobject thiz, jlong ptr, jint interval) {
linphone_proxy_config_set_avpf_rr_interval((LinphoneProxyConfig *)ptr, (uint8_t)interval);
}
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_getAvpfRRInterval(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" jint Java_org_linphone_core_LinphoneProxyConfigImpl_getAvpfRRInterval(JNIEnv *env, jobject thiz, jlong ptr) {
return (jint)linphone_proxy_config_get_avpf_rr_interval((LinphoneProxyConfig *)ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_enableQualityReporting(JNIEnv *env, jobject thiz, jlong ptr, jboolean enable) {
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_enableQualityReporting(JNIEnv *env, jobject thiz, jlong ptr, jboolean enable) {
linphone_proxy_config_enable_quality_reporting((LinphoneProxyConfig *)ptr, (bool)enable);
}
JNIEXPORT jboolean JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_quality_reportingEnabled(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" jboolean Java_org_linphone_core_LinphoneProxyConfigImpl_quality_reportingEnabled(JNIEnv *env, jobject thiz, jlong ptr) {
return linphone_proxy_config_quality_reporting_enabled((LinphoneProxyConfig *)ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setQualityReportingInterval(JNIEnv *env, jobject thiz, jlong ptr, jint interval) {
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setQualityReportingInterval(JNIEnv *env, jobject thiz, jlong ptr, jint interval) {
linphone_proxy_config_set_quality_reporting_interval((LinphoneProxyConfig *)ptr, (uint8_t)interval);
}
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_getQualityReportingInterval(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" jint Java_org_linphone_core_LinphoneProxyConfigImpl_getQualityReportingInterval(JNIEnv *env, jobject thiz, jlong ptr) {
return (jint)linphone_proxy_config_get_quality_reporting_interval((LinphoneProxyConfig *)ptr);
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setQualityReportingCollector(JNIEnv *env, jobject thiz, jlong ptr, jstring jcollector) {
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setQualityReportingCollector(JNIEnv *env, jobject thiz, jlong ptr, jstring jcollector) {
if (jcollector){
const char *collector = GetStringUTFChars(env, jcollector);
linphone_proxy_config_set_quality_reporting_collector((LinphoneProxyConfig *)ptr, collector);
......@@ -5436,12 +5434,12 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setQuality
}
}
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_getQualityReportingCollector(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getQualityReportingCollector(JNIEnv *env, jobject thiz, jlong ptr) {
jstring jvalue = env->NewStringUTF(linphone_proxy_config_get_quality_reporting_collector((LinphoneProxyConfig *)ptr));
return jvalue;
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setRealm(JNIEnv *env, jobject thiz, jlong ptr, jstring jrealm) {
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setRealm(JNIEnv *env, jobject thiz, jlong ptr, jstring jrealm) {
if (jrealm){
const char *realm = GetStringUTFChars(env, jrealm);
linphone_proxy_config_set_realm((LinphoneProxyConfig *)ptr, realm);
......@@ -5449,12 +5447,12 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setRealm(J
}
}
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_getRealm(JNIEnv *env, jobject thiz, jlong ptr) {
extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getRealm(JNIEnv *env, jobject thiz, jlong ptr) {
jstring jvalue = env->NewStringUTF(linphone_proxy_config_get_realm((LinphoneProxyConfig *)ptr));
return jvalue;
}
JNIEXPORT jboolean JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_isPhoneNumber(JNIEnv *env, jobject thiz, jlong ptr, jstring jusername) {
extern "C" jboolean Java_org_linphone_core_LinphoneProxyConfigImpl_isPhoneNumber(JNIEnv *env, jobject thiz, jlong ptr, jstring jusername) {
if(jusername){
const char *username = GetStringUTFChars(env, jusername);
bool_t res = linphone_proxy_config_is_phone_number((LinphoneProxyConfig *)ptr, username);
......@@ -5465,7 +5463,7 @@ JNIEXPORT jboolean JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_isPhon
}
}
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setCustomHeader(JNIEnv *env, jobject thiz, jlong prt, jstring jname, jstring jvalue) {
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_setCustomHeader(JNIEnv *env, jobject thiz, jlong prt, jstring jname, jstring jvalue) {
const char *name = GetStringUTFChars(env, jname);
const char *value = GetStringUTFChars(env, jvalue);
linphone_proxy_config_set_custom_header((LinphoneProxyConfig*) prt, name, value);
......@@ -5473,7 +5471,7 @@ JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_setCustomH
ReleaseStringUTFChars(env, jvalue, value);
}
JNIEXPORT jstring JNICALL Java_org_linphone_core_LinphoneProxyConfigImpl_getCustomHeader(JNIEnv *env, jobject thiz, jlong ptr, jstring jname) {
extern "C" jstring Java_org_linphone_core_LinphoneProxyConfigImpl_getCustomHeader(JNIEnv *env, jobject thiz, jlong ptr, jstring jname) {
const char *name = GetStringUTFChars(env, jname);
const char *value = linphone_proxy_config_get_custom_header((LinphoneProxyConfig *)ptr, name);
ReleaseStringUTFChars(env, jname, name);
......@@ -6066,7 +6064,7 @@ static LinphoneContent *create_content_from_java_args(JNIEnv *env, LinphoneCore
* Method: subscribe
* Signature: (JJLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
*/
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_subscribe(JNIEnv *env, jobject jcore, jlong coreptr, jlong addrptr,
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_subscribe(JNIEnv *env, jobject jcore, jlong coreptr, jlong addrptr,
jstring jevname, jint expires, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
LinphoneCore *lc=(LinphoneCore*)coreptr;
LinphoneAddress *addr=(LinphoneAddress*)addrptr;
......@@ -6090,7 +6088,7 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_subscribe(JNIE
* Method: publish
* Signature: (JJLjava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;
*/
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_publish(JNIEnv *env, jobject jobj, jlong coreptr, jlong addrptr, jstring jevname, jint expires,
extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_publish(JNIEnv *env, jobject jobj, jlong coreptr, jlong addrptr, jstring jevname, jint expires,
jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
LinphoneCore *lc=(LinphoneCore*)coreptr;
LinphoneAddress *addr=(LinphoneAddress*)addrptr;
......@@ -6339,7 +6337,7 @@ static LinphoneBuffer* create_c_linphone_buffer_from_java_linphone_buffer(JNIEnv