mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 11:38:08 +00:00
Merge branch 'dev_sal' of belledonne-communications.com:linphone-private into dev_sal
This commit is contained in:
commit
83c6536e77
4 changed files with 56 additions and 1 deletions
|
|
@ -238,6 +238,14 @@ SipSetup *linphone_proxy_config_get_sip_setup(LinphoneProxyConfig *cfg);
|
|||
* normalize a human readable phone number into a basic string. 888-444-222 becomes 888444222
|
||||
*/
|
||||
int linphone_proxy_config_normalize_number(LinphoneProxyConfig *proxy, const char *username, char *result, size_t result_len);
|
||||
/*
|
||||
* attached a user data to a proxy config
|
||||
*/
|
||||
void linphone_proxy_config_set_user_data(LinphoneProxyConfig *cr, void * ud);
|
||||
/*
|
||||
* get user data to a proxy config. return null if any
|
||||
*/
|
||||
void * linphone_proxy_config_get_user_data(LinphoneProxyConfig *cr);
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
|
|
|||
|
|
@ -193,6 +193,10 @@ extern "C" int Java_org_linphone_core_LinphoneCoreImpl_addProxyConfig( JNIEnv*
|
|||
,jobject thiz
|
||||
,jlong lc
|
||||
,jlong pc) {
|
||||
LinphoneProxyConfig* proxy = (LinphoneProxyConfig*)pc;
|
||||
linphone_proxy_config_set_user_data(proxy
|
||||
,env->NewGlobalRef((jobject)linphone_proxy_config_get_user_data(proxy)));
|
||||
|
||||
return linphone_core_add_proxy_config((LinphoneCore*)lc,(LinphoneProxyConfig*)pc);
|
||||
}
|
||||
|
||||
|
|
@ -219,6 +223,12 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_invite( JNIEnv* env
|
|||
linphone_core_invite((LinphoneCore*)lc,uri);
|
||||
env->ReleaseStringUTFChars(juri, uri);
|
||||
}
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_inviteAddress( JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
,jlong to) {
|
||||
linphone_core_invite_address((LinphoneCore*)lc,(LinphoneAddress*)to);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_terminateCall( JNIEnv* env
|
||||
,jobject thiz
|
||||
|
|
@ -281,10 +291,29 @@ extern "C" float Java_org_linphone_core_LinphoneCoreImpl_getSoftPlayLevel( JNIEn
|
|||
return linphone_core_get_soft_play_level((LinphoneCore*)lc);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_muteMic( JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
,jboolean isMuted) {
|
||||
linphone_core_mute_mic((LinphoneCore*)lc,isMuted);
|
||||
}
|
||||
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneCoreImpl_interpretUrl( JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc
|
||||
,jstring jurl) {
|
||||
const char* url = env->GetStringUTFChars(jurl, NULL);
|
||||
jlong result = (jlong)linphone_core_interpret_url((LinphoneCore*)lc,url);
|
||||
env->ReleaseStringUTFChars(jurl, url);
|
||||
return result;
|
||||
}
|
||||
|
||||
//ProxyConfig
|
||||
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneProxyConfigImpl_newLinphoneProxyConfig(JNIEnv* env,jobject thiz) {
|
||||
return (jlong) linphone_proxy_config_new();
|
||||
LinphoneProxyConfig* proxy = linphone_proxy_config_new();
|
||||
linphone_proxy_config_set_user_data(proxy,thiz);
|
||||
return (jlong) proxy;
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneProxyConfigImpl_delete(JNIEnv* env,jobject thiz,jlong ptr) {
|
||||
|
|
@ -437,6 +466,15 @@ extern "C" jstring Java_org_linphone_core_LinphoneAddressImpl_toUri(JNIEnv* env
|
|||
ms_free(uri);
|
||||
return juri;
|
||||
}
|
||||
extern "C" void Java_org_linphone_core_LinphoneAddressImpl_setDisplayName(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong address
|
||||
,jstring jdisplayName) {
|
||||
const char* displayName = env->GetStringUTFChars(jdisplayName, NULL);
|
||||
linphone_address_set_display_name((LinphoneAddress*)address,displayName);
|
||||
env->ReleaseStringUTFChars(jdisplayName, displayName);
|
||||
}
|
||||
|
||||
|
||||
//CallLog
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneCallLogImpl_getFrom(JNIEnv* env
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@ struct _LinphoneProxyConfig
|
|||
bool_t registered;
|
||||
bool_t publish;
|
||||
bool_t dial_escape_plus;
|
||||
void* user_data;
|
||||
};
|
||||
|
||||
struct _LinphoneAuthInfo
|
||||
|
|
|
|||
|
|
@ -737,5 +737,13 @@ void linphone_account_creator_destroy(LinphoneAccountCreator *obj){
|
|||
}
|
||||
}
|
||||
|
||||
void linphone_proxy_config_set_user_data(LinphoneProxyConfig *cr, void * ud) {
|
||||
cr->user_data=ud;
|
||||
}
|
||||
|
||||
void * linphone_proxy_config_get_user_data(LinphoneProxyConfig *cr) {
|
||||
return cr->user_data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue