mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-25 02:08:32 +00:00
Merge remote-tracking branch 'origin/master' into dev_vcard
Conflicts: build/android/liblinphone_tester.mk coreapi/friend.c coreapi/friendlist.c coreapi/linphonecore_jni.cc
This commit is contained in:
commit
db7c875468
54 changed files with 2967 additions and 492 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -98,3 +98,4 @@ tester/stereo-record.wav
|
||||||
git-clang-format.diff
|
git-clang-format.diff
|
||||||
*.log
|
*.log
|
||||||
.bc_tester_utils.tmp
|
.bc_tester_utils.tmp
|
||||||
|
tools/lp-test-ecc
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ common_SRC_FILES := \
|
||||||
tunnel_tester.c \
|
tunnel_tester.c \
|
||||||
upnp_tester.c \
|
upnp_tester.c \
|
||||||
multicast_call_tester.c \
|
multicast_call_tester.c \
|
||||||
vcard_tester.c
|
vcard_tester.c \
|
||||||
|
complex_sip_call_tester.c \
|
||||||
|
|
||||||
common_C_INCLUDES += \
|
common_C_INCLUDES += \
|
||||||
$(LOCAL_PATH) \
|
$(LOCAL_PATH) \
|
||||||
|
|
|
||||||
|
|
@ -187,12 +187,12 @@
|
||||||
${project}/../../gtk/gtkrc.mac
|
${project}/../../gtk/gtkrc.mac
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/rings/oldphone.wav">
|
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/rings/oldphone-mono.wav">
|
||||||
${prefix:linphone}/share/sounds/linphone/rings/oldphone.wav
|
${prefix:linphone}/share/sounds/linphone/rings/oldphone-mono.wav
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/rings/toy-mono.wav">
|
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/toy-mono.wav">
|
||||||
${prefix:linphone}/share/sounds/linphone/rings/toy-mono.wav
|
${prefix:linphone}/share/sounds/linphone/toy-mono.wav
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/ringback.wav">
|
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/ringback.wav">
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ AC_CONFIG_MACRO_DIR([m4])
|
||||||
dnl do not put anythingelse before AC_PROG_CC unless checking if macro still work for clang
|
dnl do not put anythingelse before AC_PROG_CC unless checking if macro still work for clang
|
||||||
AC_PROG_CXX(["xcrun clang++" g++])
|
AC_PROG_CXX(["xcrun clang++" g++])
|
||||||
AC_PROG_CC(["xcrun clang" gcc])
|
AC_PROG_CC(["xcrun clang" gcc])
|
||||||
|
AC_PROG_OBJC(["xcrun clang" gcc])
|
||||||
|
|
||||||
gl_LD_OUTPUT_DEF
|
gl_LD_OUTPUT_DEF
|
||||||
|
|
||||||
|
|
@ -595,6 +596,8 @@ AC_ARG_WITH(ffmpeg,
|
||||||
[ ffmpegdir=/usr ]
|
[ ffmpegdir=/usr ]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AM_CONDITIONAL([BUILD_MACOS], [test "x$build_macos" = "xyes"])
|
||||||
|
|
||||||
if test "$video" = "true"; then
|
if test "$video" = "true"; then
|
||||||
|
|
||||||
if test "$enable_x11" = "true"; then
|
if test "$enable_x11" = "true"; then
|
||||||
|
|
|
||||||
|
|
@ -110,122 +110,126 @@ void sal_process_incoming_message(SalOp *op,const belle_sip_request_event_t *eve
|
||||||
|
|
||||||
from_header=belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_from_t);
|
from_header=belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_from_t);
|
||||||
content_type=belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_content_type_t);
|
content_type=belle_sip_message_get_header_by_type(BELLE_SIP_MESSAGE(req),belle_sip_header_content_type_t);
|
||||||
/* check if we have a xml/cipher message to be decrypted */
|
|
||||||
if (content_type && (cipher_xml=is_cipher_xml(content_type))) {
|
|
||||||
/* access the zrtp cache to get keys needed to decipher the message */
|
|
||||||
LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op));
|
|
||||||
FILE *CACHEFD = fopen(lc->zrtp_secrets_cache, "rb+");
|
|
||||||
if (CACHEFD == NULL) {
|
|
||||||
ms_warning("Unable to access ZRTP ZID cache to decrypt message");
|
|
||||||
goto error;
|
|
||||||
} else {
|
|
||||||
size_t cacheSize;
|
|
||||||
char *cacheString;
|
|
||||||
int retval;
|
|
||||||
xmlDocPtr cacheXml;
|
|
||||||
|
|
||||||
cacheString=ms_load_file_content(CACHEFD, &cacheSize);
|
if (content_type){
|
||||||
if (!cacheString){
|
|
||||||
ms_warning("Unable to load content of ZRTP ZID cache to decrypt message");
|
/* check if we have a xml/cipher message to be decrypted */
|
||||||
goto error;
|
if ((cipher_xml=is_cipher_xml(content_type))) {
|
||||||
}
|
/* access the zrtp cache to get keys needed to decipher the message */
|
||||||
cacheString[cacheSize] = '\0';
|
LinphoneCore *lc=(LinphoneCore *)sal_get_user_pointer(sal_op_get_sal(op));
|
||||||
cacheSize += 1;
|
FILE *CACHEFD = fopen(lc->zrtp_secrets_cache, "rb+");
|
||||||
fclose(CACHEFD);
|
if (CACHEFD == NULL) {
|
||||||
cacheXml = xmlParseDoc((xmlChar*)cacheString);
|
ms_warning("Unable to access ZRTP ZID cache to decrypt message");
|
||||||
ms_free(cacheString);
|
|
||||||
retval = lime_decryptMultipartMessage(cacheXml, (uint8_t *)belle_sip_message_get_body(BELLE_SIP_MESSAGE(req)), &decryptedMessage);
|
|
||||||
if (retval != 0) {
|
|
||||||
ms_warning("Unable to decrypt message, reason : %s - op [%p]", lime_error_code_to_string(retval), op);
|
|
||||||
free(decryptedMessage);
|
|
||||||
xmlFreeDoc(cacheXml);
|
|
||||||
errcode = 488;
|
|
||||||
goto error;
|
goto error;
|
||||||
} else {
|
} else {
|
||||||
/* dump updated cache to a string */
|
size_t cacheSize;
|
||||||
xmlChar *xmlStringOutput;
|
char *cacheString;
|
||||||
int xmlStringLength;
|
int retval;
|
||||||
xmlDocDumpFormatMemoryEnc(cacheXml, &xmlStringOutput, &xmlStringLength, "UTF-8", 0);
|
xmlDocPtr cacheXml;
|
||||||
/* write it to the cache file */
|
|
||||||
CACHEFD = fopen(lc->zrtp_secrets_cache, "wb+");
|
cacheString=ms_load_file_content(CACHEFD, &cacheSize);
|
||||||
if (fwrite(xmlStringOutput, 1, xmlStringLength, CACHEFD)<=0){
|
if (!cacheString){
|
||||||
ms_warning("Fail to write cache");
|
ms_warning("Unable to load content of ZRTP ZID cache to decrypt message");
|
||||||
|
goto error;
|
||||||
}
|
}
|
||||||
xmlFree(xmlStringOutput);
|
cacheString[cacheSize] = '\0';
|
||||||
|
cacheSize += 1;
|
||||||
fclose(CACHEFD);
|
fclose(CACHEFD);
|
||||||
|
cacheXml = xmlParseDoc((xmlChar*)cacheString);
|
||||||
|
ms_free(cacheString);
|
||||||
|
retval = lime_decryptMultipartMessage(cacheXml, (uint8_t *)belle_sip_message_get_body(BELLE_SIP_MESSAGE(req)), &decryptedMessage);
|
||||||
|
if (retval != 0) {
|
||||||
|
ms_warning("Unable to decrypt message, reason : %s - op [%p]", lime_error_code_to_string(retval), op);
|
||||||
|
free(decryptedMessage);
|
||||||
|
xmlFreeDoc(cacheXml);
|
||||||
|
errcode = 488;
|
||||||
|
goto error;
|
||||||
|
} else {
|
||||||
|
/* dump updated cache to a string */
|
||||||
|
xmlChar *xmlStringOutput;
|
||||||
|
int xmlStringLength;
|
||||||
|
xmlDocDumpFormatMemoryEnc(cacheXml, &xmlStringOutput, &xmlStringLength, "UTF-8", 0);
|
||||||
|
/* write it to the cache file */
|
||||||
|
CACHEFD = fopen(lc->zrtp_secrets_cache, "wb+");
|
||||||
|
if (fwrite(xmlStringOutput, 1, xmlStringLength, CACHEFD)<=0){
|
||||||
|
ms_warning("Fail to write cache");
|
||||||
|
}
|
||||||
|
xmlFree(xmlStringOutput);
|
||||||
|
fclose(CACHEFD);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlFreeDoc(cacheXml);
|
||||||
}
|
}
|
||||||
|
|
||||||
xmlFreeDoc(cacheXml);
|
|
||||||
}
|
}
|
||||||
|
external_body=is_external_body(content_type);
|
||||||
|
plain_text=is_plain_text(content_type);
|
||||||
|
rcs_filetransfer = is_rcs_filetransfer(content_type);
|
||||||
|
|
||||||
}
|
if (external_body || plain_text || rcs_filetransfer || decryptedMessage!=NULL) {
|
||||||
|
SalMessage salmsg;
|
||||||
|
char message_id[256]={0};
|
||||||
|
|
||||||
rcs_filetransfer=is_rcs_filetransfer(content_type);
|
if (op->pending_server_trans) belle_sip_object_unref(op->pending_server_trans);
|
||||||
if (content_type && ((plain_text=is_plain_text(content_type))
|
op->pending_server_trans=server_transaction;
|
||||||
|| (external_body=is_external_body(content_type))
|
belle_sip_object_ref(op->pending_server_trans);
|
||||||
|| (decryptedMessage!=NULL)
|
|
||||||
|| rcs_filetransfer)) {
|
|
||||||
SalMessage salmsg;
|
|
||||||
char message_id[256]={0};
|
|
||||||
|
|
||||||
if (op->pending_server_trans) belle_sip_object_unref(op->pending_server_trans);
|
address=belle_sip_header_address_create(belle_sip_header_address_get_displayname(BELLE_SIP_HEADER_ADDRESS(from_header))
|
||||||
op->pending_server_trans=server_transaction;
|
,belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(from_header)));
|
||||||
belle_sip_object_ref(op->pending_server_trans);
|
from=belle_sip_object_to_string(BELLE_SIP_OBJECT(address));
|
||||||
|
snprintf(message_id,sizeof(message_id)-1,"%s%i"
|
||||||
|
,belle_sip_header_call_id_get_call_id(call_id)
|
||||||
|
,belle_sip_header_cseq_get_seq_number(cseq));
|
||||||
|
salmsg.from=from;
|
||||||
|
/* if we just deciphered a message, use the deciphered part(which can be a rcs xml body pointing to the file to retreive from server)*/
|
||||||
|
if (cipher_xml) {
|
||||||
|
salmsg.text = (char *)decryptedMessage;
|
||||||
|
} else { /* message body wasn't ciphered */
|
||||||
|
salmsg.text=(plain_text||rcs_filetransfer)?belle_sip_message_get_body(BELLE_SIP_MESSAGE(req)):NULL;
|
||||||
|
}
|
||||||
|
salmsg.url=NULL;
|
||||||
|
salmsg.content_type = NULL;
|
||||||
|
if (rcs_filetransfer) { /* if we have a rcs file transfer, set the type, message body (stored in salmsg.text) contains all needed information to retrieve the file */
|
||||||
|
salmsg.content_type = "application/vnd.gsma.rcs-ft-http+xml";
|
||||||
|
}
|
||||||
|
if (external_body && belle_sip_parameters_get_parameter(BELLE_SIP_PARAMETERS(content_type),"URL")) {
|
||||||
|
size_t url_length=strlen(belle_sip_parameters_get_parameter(BELLE_SIP_PARAMETERS(content_type),"URL"));
|
||||||
|
salmsg.url = ms_strdup(belle_sip_parameters_get_parameter(BELLE_SIP_PARAMETERS(content_type),"URL")+1); /* skip first "*/
|
||||||
|
((char*)salmsg.url)[url_length-2]='\0'; /*remove trailing "*/
|
||||||
|
}
|
||||||
|
salmsg.message_id=message_id;
|
||||||
|
salmsg.time=date ? belle_sip_header_date_get_time(date) : time(NULL);
|
||||||
|
op->base.root->callbacks.text_received(op,&salmsg);
|
||||||
|
|
||||||
address=belle_sip_header_address_create(belle_sip_header_address_get_displayname(BELLE_SIP_HEADER_ADDRESS(from_header))
|
free(decryptedMessage);
|
||||||
,belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(from_header)));
|
belle_sip_object_unref(address);
|
||||||
from=belle_sip_object_to_string(BELLE_SIP_OBJECT(address));
|
belle_sip_free(from);
|
||||||
snprintf(message_id,sizeof(message_id)-1,"%s%i"
|
if (salmsg.url) ms_free((char*)salmsg.url);
|
||||||
,belle_sip_header_call_id_get_call_id(call_id)
|
} else if (is_im_iscomposing(content_type)) {
|
||||||
,belle_sip_header_cseq_get_seq_number(cseq));
|
SalIsComposing saliscomposing;
|
||||||
salmsg.from=from;
|
address=belle_sip_header_address_create(belle_sip_header_address_get_displayname(BELLE_SIP_HEADER_ADDRESS(from_header))
|
||||||
/* if we just deciphered a message, use the deciphered part(which can be a rcs xml body pointing to the file to retreive from server)*/
|
,belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(from_header)));
|
||||||
if (cipher_xml) {
|
from=belle_sip_object_to_string(BELLE_SIP_OBJECT(address));
|
||||||
salmsg.text = (char *)decryptedMessage;
|
saliscomposing.from=from;
|
||||||
} else { /* message body wasn't ciphered */
|
saliscomposing.text=belle_sip_message_get_body(BELLE_SIP_MESSAGE(req));
|
||||||
salmsg.text=(plain_text||rcs_filetransfer)?belle_sip_message_get_body(BELLE_SIP_MESSAGE(req)):NULL;
|
op->base.root->callbacks.is_composing_received(op,&saliscomposing);
|
||||||
|
resp = belle_sip_response_create_from_request(req,200);
|
||||||
|
belle_sip_server_transaction_send_response(server_transaction,resp);
|
||||||
|
belle_sip_object_unref(address);
|
||||||
|
belle_sip_free(from);
|
||||||
|
}else{
|
||||||
|
ms_error("Unsupported MESSAGE (content-type not recognized)");
|
||||||
|
errcode = 415;
|
||||||
|
goto error;
|
||||||
}
|
}
|
||||||
salmsg.url=NULL;
|
}else {
|
||||||
salmsg.content_type = NULL;
|
ms_error("Unsupported MESSAGE (no Content-Type)");
|
||||||
if (rcs_filetransfer) { /* if we have a rcs file transfer, set the type, message body (stored in salmsg.text) contains all needed information to retrieve the file */
|
goto error;
|
||||||
salmsg.content_type = "application/vnd.gsma.rcs-ft-http+xml";
|
|
||||||
}
|
|
||||||
if (external_body && belle_sip_parameters_get_parameter(BELLE_SIP_PARAMETERS(content_type),"URL")) {
|
|
||||||
size_t url_length=strlen(belle_sip_parameters_get_parameter(BELLE_SIP_PARAMETERS(content_type),"URL"));
|
|
||||||
salmsg.url = ms_strdup(belle_sip_parameters_get_parameter(BELLE_SIP_PARAMETERS(content_type),"URL")+1); /* skip first "*/
|
|
||||||
((char*)salmsg.url)[url_length-2]='\0'; /*remove trailing "*/
|
|
||||||
}
|
|
||||||
salmsg.message_id=message_id;
|
|
||||||
salmsg.time=date ? belle_sip_header_date_get_time(date) : time(NULL);
|
|
||||||
op->base.root->callbacks.text_received(op,&salmsg);
|
|
||||||
|
|
||||||
free(decryptedMessage);
|
|
||||||
belle_sip_object_unref(address);
|
|
||||||
belle_sip_free(from);
|
|
||||||
if (salmsg.url) ms_free((char*)salmsg.url);
|
|
||||||
} else if (content_type && is_im_iscomposing(content_type)) {
|
|
||||||
SalIsComposing saliscomposing;
|
|
||||||
address=belle_sip_header_address_create(belle_sip_header_address_get_displayname(BELLE_SIP_HEADER_ADDRESS(from_header))
|
|
||||||
,belle_sip_header_address_get_uri(BELLE_SIP_HEADER_ADDRESS(from_header)));
|
|
||||||
from=belle_sip_object_to_string(BELLE_SIP_OBJECT(address));
|
|
||||||
saliscomposing.from=from;
|
|
||||||
saliscomposing.text=belle_sip_message_get_body(BELLE_SIP_MESSAGE(req));
|
|
||||||
op->base.root->callbacks.is_composing_received(op,&saliscomposing);
|
|
||||||
resp = belle_sip_response_create_from_request(req,200);
|
|
||||||
belle_sip_server_transaction_send_response(server_transaction,resp);
|
|
||||||
belle_sip_object_unref(address);
|
|
||||||
belle_sip_free(from);
|
|
||||||
} else {
|
|
||||||
ms_error("Unsupported MESSAGE (content-type not recognized)");
|
|
||||||
resp = belle_sip_response_create_from_request(req,415);
|
|
||||||
add_message_accept((belle_sip_message_t*)resp);
|
|
||||||
belle_sip_server_transaction_send_response(server_transaction,resp);
|
|
||||||
sal_op_release(op);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
error:
|
error:
|
||||||
resp = belle_sip_response_create_from_request(req, errcode);
|
resp = belle_sip_response_create_from_request(req, errcode);
|
||||||
|
add_message_accept((belle_sip_message_t*)resp);
|
||||||
belle_sip_server_transaction_send_response(server_transaction,resp);
|
belle_sip_server_transaction_send_response(server_transaction,resp);
|
||||||
sal_op_release(op);
|
sal_op_release(op);
|
||||||
}
|
}
|
||||||
|
|
@ -241,6 +245,7 @@ int sal_message_send(SalOp *op, const char *from, const char *to, const char* co
|
||||||
size_t content_length = msg?strlen(msg):0;
|
size_t content_length = msg?strlen(msg):0;
|
||||||
time_t curtime=time(NULL);
|
time_t curtime=time(NULL);
|
||||||
uint8_t *multipartEncryptedMessage = NULL;
|
uint8_t *multipartEncryptedMessage = NULL;
|
||||||
|
const char *body;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
if (op->dialog){
|
if (op->dialog){
|
||||||
|
|
@ -321,7 +326,11 @@ int sal_message_send(SalOp *op, const char *from, const char *to, const char* co
|
||||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),BELLE_SIP_HEADER(belle_sip_header_content_type_parse(content_type_raw)));
|
belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),BELLE_SIP_HEADER(belle_sip_header_content_type_parse(content_type_raw)));
|
||||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),BELLE_SIP_HEADER(belle_sip_header_content_length_create(content_length)));
|
belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),BELLE_SIP_HEADER(belle_sip_header_content_length_create(content_length)));
|
||||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),BELLE_SIP_HEADER(belle_sip_header_date_create_from_time(&curtime)));
|
belle_sip_message_add_header(BELLE_SIP_MESSAGE(req),BELLE_SIP_HEADER(belle_sip_header_date_create_from_time(&curtime)));
|
||||||
belle_sip_message_set_body(BELLE_SIP_MESSAGE(req),(multipartEncryptedMessage==NULL)?msg:(const char *)multipartEncryptedMessage,content_length);
|
body = (multipartEncryptedMessage==NULL) ? msg : (char*) multipartEncryptedMessage;
|
||||||
|
if (body){
|
||||||
|
/*don't call set_body() with null argument because it resets content type and content length*/
|
||||||
|
belle_sip_message_set_body(BELLE_SIP_MESSAGE(req), body, content_length);
|
||||||
|
}
|
||||||
retval = sal_op_send_request(op,req);
|
retval = sal_op_send_request(op,req);
|
||||||
free(multipartEncryptedMessage);
|
free(multipartEncryptedMessage);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
linphone
|
linphone
|
||||||
Copyright (C) 2012 Belledonne Communications, Grenoble, France
|
Copyright (C) 2012 Belledonne Communications, Grenoble, France
|
||||||
|
|
@ -125,7 +126,7 @@ static void add_rtcp_fb_attributes(belle_sdp_media_description_t *media_desc, co
|
||||||
uint16_t trr_int = 0;
|
uint16_t trr_int = 0;
|
||||||
|
|
||||||
general_trr_int = is_rtcp_fb_trr_int_the_same_for_all_payloads(stream, &trr_int);
|
general_trr_int = is_rtcp_fb_trr_int_the_same_for_all_payloads(stream, &trr_int);
|
||||||
if (general_trr_int == TRUE) {
|
if (general_trr_int == TRUE && trr_int != 0) {
|
||||||
add_rtcp_fb_trr_int_attribute(media_desc, -1, trr_int);
|
add_rtcp_fb_trr_int_attribute(media_desc, -1, trr_int);
|
||||||
}
|
}
|
||||||
if (stream->rtcp_fb.generic_nack_enabled == TRUE) {
|
if (stream->rtcp_fb.generic_nack_enabled == TRUE) {
|
||||||
|
|
@ -143,7 +144,7 @@ static void add_rtcp_fb_attributes(belle_sdp_media_description_t *media_desc, co
|
||||||
avpf_params = payload_type_get_avpf_params(pt);
|
avpf_params = payload_type_get_avpf_params(pt);
|
||||||
|
|
||||||
/* Add trr-int if not set generally. */
|
/* Add trr-int if not set generally. */
|
||||||
if (general_trr_int != TRUE) {
|
if (general_trr_int != TRUE && trr_int != 0) {
|
||||||
add_rtcp_fb_trr_int_attribute(media_desc, payload_type_get_number(pt), avpf_params.trr_interval);
|
add_rtcp_fb_trr_int_attribute(media_desc, payload_type_get_number(pt), avpf_params.trr_interval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -629,13 +630,14 @@ static void apply_rtcp_fb_attribute_to_payload(belle_sdp_rtcp_fb_attribute_t *fb
|
||||||
payload_type_set_avpf_params(pt, avpf_params);
|
payload_type_set_avpf_params(pt, avpf_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sdp_parse_rtcp_fb_parameters(belle_sdp_media_description_t *media_desc, SalStreamDescription *stream) {
|
static bool_t sdp_parse_rtcp_fb_parameters(belle_sdp_media_description_t *media_desc, SalStreamDescription *stream) {
|
||||||
belle_sip_list_t *it;
|
belle_sip_list_t *it;
|
||||||
belle_sdp_attribute_t *attribute;
|
belle_sdp_attribute_t *attribute;
|
||||||
belle_sdp_rtcp_fb_attribute_t *fb_attribute;
|
belle_sdp_rtcp_fb_attribute_t *fb_attribute;
|
||||||
MSList *pt_it;
|
MSList *pt_it;
|
||||||
PayloadType *pt;
|
PayloadType *pt;
|
||||||
int8_t pt_num;
|
int8_t pt_num;
|
||||||
|
bool_t retval = FALSE;
|
||||||
|
|
||||||
/* Handle rtcp-fb attributes that concern all payload types. */
|
/* Handle rtcp-fb attributes that concern all payload types. */
|
||||||
for (it = belle_sdp_media_description_get_attributes(media_desc); it != NULL; it = it->next) {
|
for (it = belle_sdp_media_description_get_attributes(media_desc); it != NULL; it = it->next) {
|
||||||
|
|
@ -646,6 +648,7 @@ static void sdp_parse_rtcp_fb_parameters(belle_sdp_media_description_t *media_de
|
||||||
for (pt_it = stream->payloads; pt_it != NULL; pt_it = pt_it->next) {
|
for (pt_it = stream->payloads; pt_it != NULL; pt_it = pt_it->next) {
|
||||||
pt = (PayloadType *)pt_it->data;
|
pt = (PayloadType *)pt_it->data;
|
||||||
apply_rtcp_fb_attribute_to_payload(fb_attribute, stream, pt);
|
apply_rtcp_fb_attribute_to_payload(fb_attribute, stream, pt);
|
||||||
|
retval = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -659,12 +662,14 @@ static void sdp_parse_rtcp_fb_parameters(belle_sdp_media_description_t *media_de
|
||||||
pt_num = belle_sdp_rtcp_fb_attribute_get_id(fb_attribute);
|
pt_num = belle_sdp_rtcp_fb_attribute_get_id(fb_attribute);
|
||||||
for (pt_it = stream->payloads; pt_it != NULL; pt_it = pt_it->next) {
|
for (pt_it = stream->payloads; pt_it != NULL; pt_it = pt_it->next) {
|
||||||
pt = (PayloadType *)pt_it->data;
|
pt = (PayloadType *)pt_it->data;
|
||||||
|
retval = TRUE;
|
||||||
if (payload_type_get_number(pt) == (int)pt_num) {
|
if (payload_type_get_number(pt) == (int)pt_num) {
|
||||||
apply_rtcp_fb_attribute_to_payload(fb_attribute, stream, pt);
|
apply_rtcp_fb_attribute_to_payload(fb_attribute, stream, pt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sal_init_rtcp_xr_description(OrtpRtcpXrConfiguration *config) {
|
static void sal_init_rtcp_xr_description(OrtpRtcpXrConfiguration *config) {
|
||||||
|
|
@ -727,6 +732,7 @@ static SalStreamDescription * sdp_to_stream_description(SalMediaDescription *md,
|
||||||
belle_sip_list_t *custom_attribute_it;
|
belle_sip_list_t *custom_attribute_it;
|
||||||
const char* value;
|
const char* value;
|
||||||
const char *mtype,*proto;
|
const char *mtype,*proto;
|
||||||
|
bool_t has_avpf_attributes;
|
||||||
|
|
||||||
stream=&md->streams[md->nb_streams];
|
stream=&md->streams[md->nb_streams];
|
||||||
media=belle_sdp_media_description_get_media ( media_desc );
|
media=belle_sdp_media_description_get_media ( media_desc );
|
||||||
|
|
@ -831,11 +837,16 @@ static SalStreamDescription * sdp_to_stream_description(SalMediaDescription *md,
|
||||||
/* Get ICE candidate attributes if any */
|
/* Get ICE candidate attributes if any */
|
||||||
sdp_parse_media_ice_parameters(media_desc, stream);
|
sdp_parse_media_ice_parameters(media_desc, stream);
|
||||||
|
|
||||||
|
has_avpf_attributes = sdp_parse_rtcp_fb_parameters(media_desc, stream);
|
||||||
|
|
||||||
/* Get RTCP-FB attributes if any */
|
/* Get RTCP-FB attributes if any */
|
||||||
if (sal_stream_description_has_avpf(stream) || sal_stream_description_has_implicit_avpf(stream)) {
|
if (sal_stream_description_has_avpf(stream)) {
|
||||||
enable_avpf_for_stream(stream);
|
enable_avpf_for_stream(stream);
|
||||||
sdp_parse_rtcp_fb_parameters(media_desc, stream);
|
|
||||||
}
|
}
|
||||||
|
else if (has_avpf_attributes ){
|
||||||
|
|
||||||
|
stream->implicit_rtcp_fb = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Get RTCP-XR attributes if any */
|
/* Get RTCP-XR attributes if any */
|
||||||
stream->rtcp_xr = md->rtcp_xr; // Use session parameters if no stream parameters are defined
|
stream->rtcp_xr = md->rtcp_xr; // Use session parameters if no stream parameters are defined
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ void* linphone_friend_get_user_data(const LinphoneFriend *lf){
|
||||||
}
|
}
|
||||||
|
|
||||||
bool_t linphone_friend_in_list(const LinphoneFriend *lf){
|
bool_t linphone_friend_in_list(const LinphoneFriend *lf){
|
||||||
return lf->lc!=NULL;
|
return lf->in_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result){
|
void linphone_core_interpret_friend_uri(LinphoneCore *lc, const char *uri, char **result){
|
||||||
|
|
@ -528,7 +528,7 @@ void linphone_friend_edit(LinphoneFriend *fr) {
|
||||||
|
|
||||||
void linphone_friend_done(LinphoneFriend *fr) {
|
void linphone_friend_done(LinphoneFriend *fr) {
|
||||||
ms_return_if_fail(fr);
|
ms_return_if_fail(fr);
|
||||||
if (!fr->lc) return;
|
if (!fr->lc || !fr->in_list) return;
|
||||||
linphone_friend_apply(fr, fr->lc);
|
linphone_friend_apply(fr, fr->lc);
|
||||||
linphone_friend_save(fr, fr->lc);
|
linphone_friend_save(fr, fr->lc);
|
||||||
}
|
}
|
||||||
|
|
@ -548,7 +548,7 @@ void linphone_core_add_friend(LinphoneCore *lc, LinphoneFriend *lf) {
|
||||||
lc->subscribers = ms_list_remove(lc->subscribers, lf);
|
lc->subscribers = ms_list_remove(lc->subscribers, lf);
|
||||||
linphone_friend_unref(lf);
|
linphone_friend_unref(lf);
|
||||||
}
|
}
|
||||||
lf->lc = lc;
|
lf->lc = lc; /*I would prefer this to be done in linphone_friend_list_add_friend()*/
|
||||||
if (linphone_core_ready(lc)) linphone_friend_apply(lf, lc);
|
if (linphone_core_ready(lc)) linphone_friend_apply(lf, lc);
|
||||||
else lf->commit = TRUE;
|
else lf->commit = TRUE;
|
||||||
linphone_friend_save(lf, lc);
|
linphone_friend_save(lf, lc);
|
||||||
|
|
|
||||||
|
|
@ -291,7 +291,10 @@ void linphone_friend_list_set_rls_uri(LinphoneFriendList *list, const char *rls_
|
||||||
}
|
}
|
||||||
|
|
||||||
LinphoneFriendListStatus linphone_friend_list_add_friend(LinphoneFriendList *list, LinphoneFriend *lf) {
|
LinphoneFriendListStatus linphone_friend_list_add_friend(LinphoneFriendList *list, LinphoneFriend *lf) {
|
||||||
if ((lf->lc != NULL) || (lf->uri == NULL)) return LinphoneFriendListInvalidFriend;
|
if (lf->uri == NULL || lf->in_list) {
|
||||||
|
ms_error("linphone_friend_list_add_friend(): invalid friend");
|
||||||
|
return LinphoneFriendListInvalidFriend;
|
||||||
|
}
|
||||||
if (ms_list_find(list->friends, lf) != NULL) {
|
if (ms_list_find(list->friends, lf) != NULL) {
|
||||||
char *tmp = NULL;
|
char *tmp = NULL;
|
||||||
const LinphoneAddress *addr = linphone_friend_get_address(lf);
|
const LinphoneAddress *addr = linphone_friend_get_address(lf);
|
||||||
|
|
@ -299,6 +302,7 @@ LinphoneFriendListStatus linphone_friend_list_add_friend(LinphoneFriendList *lis
|
||||||
ms_warning("Friend %s already in list [%s], ignored.", tmp ? tmp : "unknown", list->display_name);
|
ms_warning("Friend %s already in list [%s], ignored.", tmp ? tmp : "unknown", list->display_name);
|
||||||
if (tmp) ms_free(tmp);
|
if (tmp) ms_free(tmp);
|
||||||
} else {
|
} else {
|
||||||
|
lf->in_list = TRUE;
|
||||||
return linphone_friend_list_import_friend(list, lf);
|
return linphone_friend_list_import_friend(list, lf);
|
||||||
}
|
}
|
||||||
return LinphoneFriendListOK;
|
return LinphoneFriendListOK;
|
||||||
|
|
@ -318,7 +322,8 @@ LinphoneFriendListStatus linphone_friend_list_remove_friend(LinphoneFriendList *
|
||||||
linphone_core_remove_friend_from_db(lf->lc, lf);
|
linphone_core_remove_friend_from_db(lf->lc, lf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
linphone_friend_unref((LinphoneFriend *)elem->data);
|
lf->in_list = FALSE;
|
||||||
|
linphone_friend_unref(lf);
|
||||||
list->friends = ms_list_remove_link(list->friends, elem);
|
list->friends = ms_list_remove_link(list->friends, elem);
|
||||||
return LinphoneFriendListOK;
|
return LinphoneFriendListOK;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define LINPHONE_FRIENDLIST_H_
|
#define LINPHONE_FRIENDLIST_H_
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef IN_LINPHONE
|
||||||
#include "linphonefriend.h"
|
#include "linphonefriend.h"
|
||||||
#include "linphonepresence.h"
|
#include "linphonepresence.h"
|
||||||
|
#else
|
||||||
|
#include "linphone/linphonefriend.h"
|
||||||
|
#include "linphone/linphonepresence.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup real_time_text Real Time Text Sender
|
* @defgroup real_time_text_sender Real Time Text Sender
|
||||||
* @ingroup tutorials
|
* @ingroup tutorials
|
||||||
This program just send chat message in real time to dest uri. Use realtimetext_receiver to receive message.
|
This program just send chat message in real time to dest uri. Use realtimetext_receiver to receive message.
|
||||||
usage: ./realtimetext_sender sip:localhost:5060
|
usage: ./realtimetext_sender sip:localhost:5060
|
||||||
|
|
|
||||||
|
|
@ -1452,6 +1452,7 @@ void linphone_call_fix_call_parameters(LinphoneCall *call, SalMediaDescription *
|
||||||
if (rmd) {
|
if (rmd) {
|
||||||
linphone_call_compute_streams_indexes(call, rmd);
|
linphone_call_compute_streams_indexes(call, rmd);
|
||||||
linphone_call_update_biggest_desc(call, rmd);
|
linphone_call_update_biggest_desc(call, rmd);
|
||||||
|
call->params->implicit_rtcp_fb &= sal_media_description_has_implicit_avpf(rmd);
|
||||||
}
|
}
|
||||||
rcp = linphone_call_get_remote_params(call);
|
rcp = linphone_call_get_remote_params(call);
|
||||||
if (rcp){
|
if (rcp){
|
||||||
|
|
@ -1767,9 +1768,8 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
||||||
break;
|
break;
|
||||||
case LinphoneMediaEncryptionNone:
|
case LinphoneMediaEncryptionNone:
|
||||||
call->current_params->media_encryption=LinphoneMediaEncryptionNone;
|
call->current_params->media_encryption=LinphoneMediaEncryptionNone;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
call->current_params->avpf_enabled = linphone_call_all_streams_avpf_enabled(call) && sal_media_description_has_avpf(md);
|
call->current_params->avpf_enabled = linphone_call_all_streams_avpf_enabled(call) && sal_media_description_has_avpf(md);
|
||||||
if (call->current_params->avpf_enabled == TRUE) {
|
if (call->current_params->avpf_enabled == TRUE) {
|
||||||
call->current_params->avpf_rr_interval = linphone_call_get_avpf_rr_interval(call);
|
call->current_params->avpf_rr_interval = linphone_call_get_avpf_rr_interval(call);
|
||||||
|
|
@ -1780,6 +1780,7 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
||||||
const char *rtp_addr;
|
const char *rtp_addr;
|
||||||
|
|
||||||
SalStreamDescription *sd=sal_media_description_find_best_stream(md,SalAudio);
|
SalStreamDescription *sd=sal_media_description_find_best_stream(md,SalAudio);
|
||||||
|
|
||||||
call->current_params->audio_dir=sd ? media_direction_from_sal_stream_dir(sd->dir) : LinphoneMediaDirectionInactive;
|
call->current_params->audio_dir=sd ? media_direction_from_sal_stream_dir(sd->dir) : LinphoneMediaDirectionInactive;
|
||||||
if (call->current_params->audio_dir != LinphoneMediaDirectionInactive) {
|
if (call->current_params->audio_dir != LinphoneMediaDirectionInactive) {
|
||||||
rtp_addr = sd->rtp_addr[0]!='\0' ? sd->rtp_addr : call->resultdesc->addr;
|
rtp_addr = sd->rtp_addr[0]!='\0' ? sd->rtp_addr : call->resultdesc->addr;
|
||||||
|
|
@ -1788,6 +1789,7 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
||||||
call->current_params->audio_multicast_enabled = FALSE;
|
call->current_params->audio_multicast_enabled = FALSE;
|
||||||
|
|
||||||
sd=sal_media_description_find_best_stream(md,SalVideo);
|
sd=sal_media_description_find_best_stream(md,SalVideo);
|
||||||
|
call->current_params->implicit_rtcp_fb = sd ? sal_stream_description_has_implicit_avpf(sd): FALSE;
|
||||||
call->current_params->video_dir=sd ? media_direction_from_sal_stream_dir(sd->dir) : LinphoneMediaDirectionInactive;
|
call->current_params->video_dir=sd ? media_direction_from_sal_stream_dir(sd->dir) : LinphoneMediaDirectionInactive;
|
||||||
if (call->current_params->video_dir != LinphoneMediaDirectionInactive) {
|
if (call->current_params->video_dir != LinphoneMediaDirectionInactive) {
|
||||||
rtp_addr = sd->rtp_addr[0]!='\0' ? sd->rtp_addr : call->resultdesc->addr;
|
rtp_addr = sd->rtp_addr[0]!='\0' ? sd->rtp_addr : call->resultdesc->addr;
|
||||||
|
|
@ -1795,7 +1797,8 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
||||||
} else
|
} else
|
||||||
call->current_params->video_multicast_enabled = FALSE;
|
call->current_params->video_multicast_enabled = FALSE;
|
||||||
|
|
||||||
sd=sal_media_description_find_best_stream(md,SalText);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return call->current_params;
|
return call->current_params;
|
||||||
|
|
@ -2043,10 +2046,11 @@ void linphone_call_enable_camera (LinphoneCall *call, bool_t enable){
|
||||||
void linphone_call_send_vfu_request(LinphoneCall *call) {
|
void linphone_call_send_vfu_request(LinphoneCall *call) {
|
||||||
#ifdef VIDEO_ENABLED
|
#ifdef VIDEO_ENABLED
|
||||||
const LinphoneCallParams *current_params = linphone_call_get_current_params(call);
|
const LinphoneCallParams *current_params = linphone_call_get_current_params(call);
|
||||||
if (current_params->avpf_enabled && call->videostream && media_stream_get_state((const MediaStream *)call->videostream) == MSStreamStarted) {
|
if ((current_params->avpf_enabled || current_params->implicit_rtcp_fb )&& call->videostream && media_stream_get_state((const MediaStream *)call->videostream) == MSStreamStarted) { // || sal_media_description_has_implicit_avpf((const SalMediaDescription *)call->resultdesc)
|
||||||
ms_message("Request Full Intra Request on call [%p]", call);
|
ms_message("Request Full Intra Request on call [%p]", call);
|
||||||
video_stream_send_fir(call->videostream);
|
video_stream_send_fir(call->videostream);
|
||||||
} else if (call->core->sip_conf.vfu_with_info) {
|
} else if (call->core->sip_conf.vfu_with_info) {
|
||||||
|
ms_message("Request SIP INFO FIR on call [%p]", call);
|
||||||
if (LinphoneCallStreamsRunning == linphone_call_get_state(call))
|
if (LinphoneCallStreamsRunning == linphone_call_get_state(call))
|
||||||
sal_call_send_vfu_request(call->op);
|
sal_call_send_vfu_request(call->op);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -116,11 +116,13 @@ static void toggle_video_preview(LinphoneCore *lc, bool_t val);
|
||||||
#define SOUNDS_PREFIX
|
#define SOUNDS_PREFIX
|
||||||
#endif
|
#endif
|
||||||
/* relative path where is stored local ring*/
|
/* relative path where is stored local ring*/
|
||||||
#define LOCAL_RING SOUNDS_PREFIX "rings/oldphone.wav"
|
#define LOCAL_RING SOUNDS_PREFIX "rings/oldphone-mono.wav"
|
||||||
|
#define LOCAL_RING_MKV SOUNDS_PREFIX "rings/notes_of_the_optimistic.mkv"
|
||||||
/* same for remote ring (ringback)*/
|
/* same for remote ring (ringback)*/
|
||||||
#define REMOTE_RING SOUNDS_PREFIX "ringback.wav"
|
#define REMOTE_RING SOUNDS_PREFIX "ringback.wav"
|
||||||
#define HOLD_MUSIC SOUNDS_PREFIX "rings/toy-mono.wav"
|
|
||||||
|
|
||||||
|
#define HOLD_MUSIC SOUNDS_PREFIX "toy-mono.wav"
|
||||||
|
#define HOLD_MUSIC_MKV SOUNDS_PREFIX "dont_wait_too_long.mkv"
|
||||||
|
|
||||||
extern SalCallbacks linphone_sal_callbacks;
|
extern SalCallbacks linphone_sal_callbacks;
|
||||||
|
|
||||||
|
|
@ -815,6 +817,20 @@ static void build_sound_devices_table(LinphoneCore *lc){
|
||||||
if (old!=NULL) ms_free(old);
|
if (old!=NULL) ms_free(old);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *get_default_local_ring(LinphoneCore * lc){
|
||||||
|
if (linphone_core_file_format_supported(lc, "mkv")){
|
||||||
|
return PACKAGE_SOUND_DIR "/" LOCAL_RING_MKV;
|
||||||
|
}
|
||||||
|
return PACKAGE_SOUND_DIR "/" LOCAL_RING;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *get_default_onhold_music(LinphoneCore * lc){
|
||||||
|
if (linphone_core_file_format_supported(lc, "mkv")){
|
||||||
|
return PACKAGE_SOUND_DIR "/" HOLD_MUSIC_MKV;
|
||||||
|
}
|
||||||
|
return PACKAGE_SOUND_DIR "/" HOLD_MUSIC;
|
||||||
|
}
|
||||||
|
|
||||||
static void sound_config_read(LinphoneCore *lc)
|
static void sound_config_read(LinphoneCore *lc)
|
||||||
{
|
{
|
||||||
int tmp;
|
int tmp;
|
||||||
|
|
@ -870,15 +886,11 @@ static void sound_config_read(LinphoneCore *lc)
|
||||||
linphone_core_set_sound_source(lc,tmpbuf[0]);
|
linphone_core_set_sound_source(lc,tmpbuf[0]);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
|
tmpbuf = get_default_local_ring(lc);
|
||||||
tmpbuf=lp_config_get_string(lc->config,"sound","local_ring",tmpbuf);
|
tmpbuf=lp_config_get_string(lc->config,"sound","local_ring",tmpbuf);
|
||||||
if (ortp_file_exist(tmpbuf)==-1) {
|
if (ortp_file_exist(tmpbuf)==-1) {
|
||||||
ms_warning("%s does not exist",tmpbuf);
|
ms_warning("%s does not exist",tmpbuf);
|
||||||
tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
|
tmpbuf = get_default_local_ring(lc);
|
||||||
}
|
|
||||||
if (strstr(tmpbuf,".wav")==NULL){
|
|
||||||
/* it currently uses old sound files, so replace them */
|
|
||||||
tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
|
|
||||||
}
|
}
|
||||||
linphone_core_set_ring(lc,tmpbuf);
|
linphone_core_set_ring(lc,tmpbuf);
|
||||||
|
|
||||||
|
|
@ -893,7 +905,7 @@ static void sound_config_read(LinphoneCore *lc)
|
||||||
}
|
}
|
||||||
linphone_core_set_ringback(lc,tmpbuf);
|
linphone_core_set_ringback(lc,tmpbuf);
|
||||||
|
|
||||||
linphone_core_set_play_file(lc,lp_config_get_string(lc->config,"sound","hold_music",PACKAGE_SOUND_DIR "/" HOLD_MUSIC));
|
linphone_core_set_play_file(lc,lp_config_get_string(lc->config,"sound","hold_music", get_default_onhold_music(lc)));
|
||||||
lc->sound_conf.latency=0;
|
lc->sound_conf.latency=0;
|
||||||
#ifndef __ios
|
#ifndef __ios
|
||||||
tmp=TRUE;
|
tmp=TRUE;
|
||||||
|
|
|
||||||
|
|
@ -140,9 +140,7 @@ enum _LinphoneStreamType {
|
||||||
**/
|
**/
|
||||||
typedef enum _LinphoneStreamType LinphoneStreamType;
|
typedef enum _LinphoneStreamType LinphoneStreamType;
|
||||||
/**
|
/**
|
||||||
* Function returning a humain readable value for LinphoneStreamType.
|
* Function returning a human readable value for LinphoneStreamType.
|
||||||
* @param LinphoneStreamType
|
|
||||||
* @returns
|
|
||||||
* @ingroup initializing
|
* @ingroup initializing
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
|
@ -1065,7 +1063,7 @@ LINPHONE_PUBLIC const char *linphone_registration_state_to_string(LinphoneRegist
|
||||||
typedef struct _LinphoneAuthInfo LinphoneAuthInfo;
|
typedef struct _LinphoneAuthInfo LinphoneAuthInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a #LinphoneAuthInfo object with supplied information.
|
* Creates a #_LinphoneAuthInfo object with supplied information.
|
||||||
* The object can be created empty, that is with all arguments set to NULL.
|
* The object can be created empty, that is with all arguments set to NULL.
|
||||||
* Username, userid, password, realm and domain can be set later using specific methods.
|
* Username, userid, password, realm and domain can be set later using specific methods.
|
||||||
* At the end, username and passwd (or ha1) are required.
|
* At the end, username and passwd (or ha1) are required.
|
||||||
|
|
@ -1075,7 +1073,7 @@ typedef struct _LinphoneAuthInfo LinphoneAuthInfo;
|
||||||
* @param ha1 The ha1-encrypted password if password is not given in clear text.
|
* @param ha1 The ha1-encrypted password if password is not given in clear text.
|
||||||
* @param realm The authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.
|
* @param realm The authentication domain (which can be larger than the sip domain. Unfortunately many SIP servers don't use this parameter.
|
||||||
* @param domain The SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
|
* @param domain The SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
|
||||||
* @return A #LinphoneAuthInfo object. linphone_auth_info_destroy() must be used to destroy it when no longer needed. The LinphoneCore makes a copy of LinphoneAuthInfo
|
* @return A #_LinphoneAuthInfo object. linphone_auth_info_destroy() must be used to destroy it when no longer needed. The LinphoneCore makes a copy of LinphoneAuthInfo
|
||||||
* passed through linphone_core_add_auth_info().
|
* passed through linphone_core_add_auth_info().
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *userid,
|
LINPHONE_PUBLIC LinphoneAuthInfo *linphone_auth_info_new(const char *username, const char *userid,
|
||||||
|
|
@ -1084,42 +1082,42 @@ LINPHONE_PUBLIC LinphoneAuthInfo *linphone_auth_info_new(const char *username, c
|
||||||
/**
|
/**
|
||||||
* @addtogroup authentication
|
* @addtogroup authentication
|
||||||
* Instantiates a new auth info with values from source.
|
* Instantiates a new auth info with values from source.
|
||||||
* @param[in] source The #LinphoneAuthInfo object to be cloned
|
* @param[in] source The #_LinphoneAuthInfo object to be cloned
|
||||||
* @return The newly created #LinphoneAuthInfo object.
|
* @return The newly created #_LinphoneAuthInfo object.
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC LinphoneAuthInfo *linphone_auth_info_clone(const LinphoneAuthInfo* source);
|
LINPHONE_PUBLIC LinphoneAuthInfo *linphone_auth_info_clone(const LinphoneAuthInfo* source);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the password.
|
* Sets the password.
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @param[in] passwd The password.
|
* @param[in] passwd The password.
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
|
LINPHONE_PUBLIC void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the username.
|
* Sets the username.
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @param[in] username The username.
|
* @param[in] username The username.
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username);
|
LINPHONE_PUBLIC void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the userid.
|
* Sets the userid.
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @param[in] userid The userid.
|
* @param[in] userid The userid.
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid);
|
LINPHONE_PUBLIC void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the realm.
|
* Sets the realm.
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @param[in] realm The realm.
|
* @param[in] realm The realm.
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC void linphone_auth_info_set_realm(LinphoneAuthInfo *info, const char *realm);
|
LINPHONE_PUBLIC void linphone_auth_info_set_realm(LinphoneAuthInfo *info, const char *realm);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the domain for which this authentication is valid.
|
* Sets the domain for which this authentication is valid.
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @param[in] domain The domain.
|
* @param[in] domain The domain.
|
||||||
* This should not be necessary because realm is supposed to be unique and sufficient.
|
* This should not be necessary because realm is supposed to be unique and sufficient.
|
||||||
* However, many SIP servers don't set realm correctly, then domain has to be used to distinguish between several SIP account bearing the same username.
|
* However, many SIP servers don't set realm correctly, then domain has to be used to distinguish between several SIP account bearing the same username.
|
||||||
|
|
@ -1128,7 +1126,7 @@ LINPHONE_PUBLIC void linphone_auth_info_set_domain(LinphoneAuthInfo *info, const
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the ha1.
|
* Sets the ha1.
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @param[in] ha1 The ha1.
|
* @param[in] ha1 The ha1.
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC void linphone_auth_info_set_ha1(LinphoneAuthInfo *info, const char *ha1);
|
LINPHONE_PUBLIC void linphone_auth_info_set_ha1(LinphoneAuthInfo *info, const char *ha1);
|
||||||
|
|
@ -1136,7 +1134,7 @@ LINPHONE_PUBLIC void linphone_auth_info_set_ha1(LinphoneAuthInfo *info, const ch
|
||||||
/**
|
/**
|
||||||
* Gets the username.
|
* Gets the username.
|
||||||
*
|
*
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @return The username.
|
* @return The username.
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC const char *linphone_auth_info_get_username(const LinphoneAuthInfo *info);
|
LINPHONE_PUBLIC const char *linphone_auth_info_get_username(const LinphoneAuthInfo *info);
|
||||||
|
|
@ -1144,7 +1142,7 @@ LINPHONE_PUBLIC const char *linphone_auth_info_get_username(const LinphoneAuthIn
|
||||||
/**
|
/**
|
||||||
* Gets the password.
|
* Gets the password.
|
||||||
*
|
*
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @return The password.
|
* @return The password.
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC const char *linphone_auth_info_get_passwd(const LinphoneAuthInfo *info);
|
LINPHONE_PUBLIC const char *linphone_auth_info_get_passwd(const LinphoneAuthInfo *info);
|
||||||
|
|
@ -1152,7 +1150,7 @@ LINPHONE_PUBLIC const char *linphone_auth_info_get_passwd(const LinphoneAuthInfo
|
||||||
/**
|
/**
|
||||||
* Gets the userid.
|
* Gets the userid.
|
||||||
*
|
*
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @return The userid.
|
* @return The userid.
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC const char *linphone_auth_info_get_userid(const LinphoneAuthInfo *info);
|
LINPHONE_PUBLIC const char *linphone_auth_info_get_userid(const LinphoneAuthInfo *info);
|
||||||
|
|
@ -1160,7 +1158,7 @@ LINPHONE_PUBLIC const char *linphone_auth_info_get_userid(const LinphoneAuthInfo
|
||||||
/**
|
/**
|
||||||
* Gets the realm.
|
* Gets the realm.
|
||||||
*
|
*
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @return The realm.
|
* @return The realm.
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC const char *linphone_auth_info_get_realm(const LinphoneAuthInfo *info);
|
LINPHONE_PUBLIC const char *linphone_auth_info_get_realm(const LinphoneAuthInfo *info);
|
||||||
|
|
@ -1168,7 +1166,7 @@ LINPHONE_PUBLIC const char *linphone_auth_info_get_realm(const LinphoneAuthInfo
|
||||||
/**
|
/**
|
||||||
* Gets the domain.
|
* Gets the domain.
|
||||||
*
|
*
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @return The domain.
|
* @return The domain.
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC const char *linphone_auth_info_get_domain(const LinphoneAuthInfo *info);
|
LINPHONE_PUBLIC const char *linphone_auth_info_get_domain(const LinphoneAuthInfo *info);
|
||||||
|
|
@ -1176,7 +1174,7 @@ LINPHONE_PUBLIC const char *linphone_auth_info_get_domain(const LinphoneAuthInfo
|
||||||
/**
|
/**
|
||||||
* Gets the ha1.
|
* Gets the ha1.
|
||||||
*
|
*
|
||||||
* @param[in] info The #LinphoneAuthInfo object
|
* @param[in] info The #_LinphoneAuthInfo object
|
||||||
* @return The ha1.
|
* @return The ha1.
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC const char *linphone_auth_info_get_ha1(const LinphoneAuthInfo *info);
|
LINPHONE_PUBLIC const char *linphone_auth_info_get_ha1(const LinphoneAuthInfo *info);
|
||||||
|
|
@ -1192,8 +1190,10 @@ LINPHONE_PUBLIC LinphoneAuthInfo * linphone_auth_info_new_from_config_file(LpCon
|
||||||
|
|
||||||
#ifdef IN_LINPHONE
|
#ifdef IN_LINPHONE
|
||||||
#include "account_creator.h"
|
#include "account_creator.h"
|
||||||
|
#include "friendlist.h"
|
||||||
#else
|
#else
|
||||||
#include "linphone/account_creator.h"
|
#include "linphone/account_creator.h"
|
||||||
|
#include "linphone/friendlist.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1379,7 +1379,13 @@ LINPHONE_PUBLIC void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_file_transfer_message(LinphoneChatRoom *cr, const LinphoneContent* initial_content);
|
LINPHONE_PUBLIC LinphoneChatMessage* linphone_chat_room_create_file_transfer_message(LinphoneChatRoom *cr, const LinphoneContent* initial_content);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* get peer address \link linphone_core_get_chat_room() associated to \endlink this #LinphoneChatRoom
|
||||||
|
* @param cr #LinphoneChatRoom object
|
||||||
|
* @return #LinphoneAddress peer address
|
||||||
|
*/
|
||||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_room_get_peer_address(LinphoneChatRoom *cr);
|
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_room_get_peer_address(LinphoneChatRoom *cr);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send a message to peer member of this chat room.
|
* Send a message to peer member of this chat room.
|
||||||
* @deprecated Use linphone_chat_room_send_chat_message() instead.
|
* @deprecated Use linphone_chat_room_send_chat_message() instead.
|
||||||
|
|
@ -1543,7 +1549,7 @@ LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_from_address(co
|
||||||
/**
|
/**
|
||||||
* Set destination of the message
|
* Set destination of the message
|
||||||
* @param[in] message #LinphoneChatMessage obj
|
* @param[in] message #LinphoneChatMessage obj
|
||||||
* @param[in] to #LinphoneAddress destination of this message (copied)
|
* @param[in] addr #LinphoneAddress destination of this message (copied)
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC void linphone_chat_message_set_to_address(LinphoneChatMessage* message, const LinphoneAddress* addr);
|
LINPHONE_PUBLIC void linphone_chat_message_set_to_address(LinphoneChatMessage* message, const LinphoneAddress* addr);
|
||||||
/** @deprecated Use linphone_chat_message_get_to_address() instead. */
|
/** @deprecated Use linphone_chat_message_get_to_address() instead. */
|
||||||
|
|
@ -1631,11 +1637,7 @@ LINPHONE_PUBLIC void linphone_chat_message_set_user_data(LinphoneChatMessage* me
|
||||||
* Returns the chatroom this message belongs to.
|
* Returns the chatroom this message belongs to.
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC LinphoneChatRoom* linphone_chat_message_get_chat_room(LinphoneChatMessage *msg);
|
LINPHONE_PUBLIC LinphoneChatRoom* linphone_chat_message_get_chat_room(LinphoneChatMessage *msg);
|
||||||
/**
|
|
||||||
* get peer address \link linphone_core_get_chat_room() associated to \endlink this #LinphoneChatRoom
|
|
||||||
* @param cr #LinphoneChatRoom object
|
|
||||||
* @return #LinphoneAddress peer address
|
|
||||||
*/
|
|
||||||
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_peer_address(LinphoneChatMessage *msg);
|
LINPHONE_PUBLIC const LinphoneAddress* linphone_chat_message_get_peer_address(LinphoneChatMessage *msg);
|
||||||
/**
|
/**
|
||||||
* Returns the origin address of a message if it was a outgoing message, or the destination address if it was an incoming message.
|
* Returns the origin address of a message if it was a outgoing message, or the destination address if it was an incoming message.
|
||||||
|
|
@ -1692,8 +1694,6 @@ LINPHONE_PUBLIC void linphone_chat_message_set_file_transfer_filepath(LinphoneCh
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC const char * linphone_chat_message_get_file_transfer_filepath(LinphoneChatMessage *msg);
|
LINPHONE_PUBLIC const char * linphone_chat_message_get_file_transfer_filepath(LinphoneChatMessage *msg);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fulfill a chat message char by char. Message linked to a Real Time Text Call send char in realtime following RFC 4103/T.140
|
* Fulfill a chat message char by char. Message linked to a Real Time Text Call send char in realtime following RFC 4103/T.140
|
||||||
* To commit a message, use #linphone_chat_room_send_message
|
* To commit a message, use #linphone_chat_room_send_message
|
||||||
|
|
@ -2122,7 +2122,7 @@ LINPHONE_PUBLIC LinphoneCoreVTable *linphone_core_get_current_vtable(LinphoneCor
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy a vtable.
|
* Destroy a vtable.
|
||||||
* @param vtable to be destroyed
|
* @param table to be destroyed
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC void linphone_core_v_table_destroy(LinphoneCoreVTable* table);
|
LINPHONE_PUBLIC void linphone_core_v_table_destroy(LinphoneCoreVTable* table);
|
||||||
|
|
||||||
|
|
@ -2307,6 +2307,10 @@ LINPHONE_PUBLIC void linphone_core_serialize_logs(void);
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC const char *linphone_core_get_version(void);
|
LINPHONE_PUBLIC const char *linphone_core_get_version(void);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return liblinphone's user agent as a string.
|
||||||
|
**/
|
||||||
LINPHONE_PUBLIC const char *linphone_core_get_user_agent(LinphoneCore *lc);
|
LINPHONE_PUBLIC const char *linphone_core_get_user_agent(LinphoneCore *lc);
|
||||||
/**
|
/**
|
||||||
* @deprecated Use #linphone_core_get_user_agent instead.
|
* @deprecated Use #linphone_core_get_user_agent instead.
|
||||||
|
|
@ -2337,7 +2341,7 @@ LINPHONE_PUBLIC LINPHONE_DEPRECATED const char *linphone_core_get_user_agent_ver
|
||||||
* @see linphone_core_new_with_config
|
* @see linphone_core_new_with_config
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
|
LINPHONE_PUBLIC LinphoneCore *linphone_core_new(const LinphoneCoreVTable *vtable,
|
||||||
const char *config_path, const char *factory_config, void* userdata);
|
const char *config_path, const char *factory_config_path, void* userdata);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a LinphoneCore object with a given LpConfig.
|
* Instantiates a LinphoneCore object with a given LpConfig.
|
||||||
|
|
@ -2362,16 +2366,14 @@ LINPHONE_PUBLIC void linphone_core_iterate(LinphoneCore *lc);
|
||||||
* add a listener to be notified of linphone core events. Once events are received, registered vtable are invoked in order.
|
* add a listener to be notified of linphone core events. Once events are received, registered vtable are invoked in order.
|
||||||
* @param vtable a LinphoneCoreVTable structure holding your application callbacks. Object is owned by linphone core until linphone_core_remove_listener.
|
* @param vtable a LinphoneCoreVTable structure holding your application callbacks. Object is owned by linphone core until linphone_core_remove_listener.
|
||||||
* @param lc object
|
* @param lc object
|
||||||
* @param string identifying the device, can be EMEI or UDID
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC void linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable);
|
LINPHONE_PUBLIC void linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable);
|
||||||
/**
|
/**
|
||||||
* @ingroup initializing
|
* @ingroup initializing
|
||||||
* remove a listener registred by linphone_core_add_listener.
|
* remove a listener registred by linphone_core_add_listener.
|
||||||
* @param vtable a LinphoneCoreVTable structure holding your application callbacks
|
|
||||||
* @param lc object
|
* @param lc object
|
||||||
* @param string identifying the device, can be EMEI or UDID
|
* @param vtable a LinphoneCoreVTable structure holding your application callbacks
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC void linphone_core_remove_listener(LinphoneCore *lc, const LinphoneCoreVTable *vtable);
|
LINPHONE_PUBLIC void linphone_core_remove_listener(LinphoneCore *lc, const LinphoneCoreVTable *vtable);
|
||||||
|
|
@ -2895,7 +2897,7 @@ LINPHONE_PUBLIC void linphone_core_set_default_proxy_config(LinphoneCore *lc, Li
|
||||||
* @param[in] ha1 String containing a ha1 hash of the password (optional, either passwd or ha1 must be set)
|
* @param[in] ha1 String containing a ha1 hash of the password (optional, either passwd or ha1 must be set)
|
||||||
* @param[in] realm String used to discriminate different SIP authentication domains (optional)
|
* @param[in] realm String used to discriminate different SIP authentication domains (optional)
|
||||||
* @param[in] domain String containing the SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
|
* @param[in] domain String containing the SIP domain for which this authentication information is valid, if it has to be restricted for a single SIP domain.
|
||||||
* @return #LinphoneAuthInfo with default values set
|
* @return #_LinphoneAuthInfo with default values set
|
||||||
* @ingroup authentication
|
* @ingroup authentication
|
||||||
*/
|
*/
|
||||||
LINPHONE_PUBLIC LinphoneAuthInfo * linphone_core_create_auth_info(LinphoneCore *lc, const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain);
|
LINPHONE_PUBLIC LinphoneAuthInfo * linphone_core_create_auth_info(LinphoneCore *lc, const char *username, const char *userid, const char *passwd, const char *ha1, const char *realm, const char *domain);
|
||||||
|
|
@ -2913,7 +2915,7 @@ LINPHONE_PUBLIC const MSList *linphone_core_get_auth_info_list(const LinphoneCor
|
||||||
* @param realm the authentication 'realm' (optional)
|
* @param realm the authentication 'realm' (optional)
|
||||||
* @param username the SIP username to be authenticated (mandatory)
|
* @param username the SIP username to be authenticated (mandatory)
|
||||||
* @param domain the SIP domain name (optional)
|
* @param domain the SIP domain name (optional)
|
||||||
* @return a #LinphoneAuthInfo
|
* @return a #_LinphoneAuthInfo
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC const LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const char *realm, const char *username, const char *sip_domain);
|
LINPHONE_PUBLIC const LinphoneAuthInfo *linphone_core_find_auth_info(LinphoneCore *lc, const char *realm, const char *username, const char *sip_domain);
|
||||||
|
|
||||||
|
|
@ -4035,6 +4037,15 @@ LINPHONE_PUBLIC const char * linphone_core_get_file_transfer_server(LinphoneCore
|
||||||
**/
|
**/
|
||||||
LINPHONE_PUBLIC const char ** linphone_core_get_supported_file_formats(LinphoneCore *core);
|
LINPHONE_PUBLIC const char ** linphone_core_get_supported_file_formats(LinphoneCore *core);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether a specific file format is supported.
|
||||||
|
* @see linphone_core_get_supported_file_formats
|
||||||
|
* @param lc the core
|
||||||
|
* @param the format extension (wav, mkv).
|
||||||
|
* @ingroup media_paramaters
|
||||||
|
**/
|
||||||
|
LINPHONE_PUBLIC bool_t linphone_core_file_format_supported(LinphoneCore *lc, const char *fmt);
|
||||||
|
|
||||||
LINPHONE_PUBLIC void linphone_core_add_supported_tag(LinphoneCore *core, const char *tag);
|
LINPHONE_PUBLIC void linphone_core_add_supported_tag(LinphoneCore *core, const char *tag);
|
||||||
|
|
||||||
LINPHONE_PUBLIC void linphone_core_remove_supported_tag(LinphoneCore *core, const char *tag);
|
LINPHONE_PUBLIC void linphone_core_remove_supported_tag(LinphoneCore *core, const char *tag);
|
||||||
|
|
@ -4057,7 +4068,7 @@ LINPHONE_PUBLIC int linphone_core_get_avpf_rr_interval(const LinphoneCore *lc);
|
||||||
LINPHONE_PUBLIC int linphone_core_set_audio_multicast_addr(LinphoneCore *core, const char* ip);
|
LINPHONE_PUBLIC int linphone_core_set_audio_multicast_addr(LinphoneCore *core, const char* ip);
|
||||||
/**
|
/**
|
||||||
* Use to set multicast address to be used for video stream.
|
* Use to set multicast address to be used for video stream.
|
||||||
* @param core #LinphoneCore
|
* @param lc #LinphoneCore
|
||||||
* @param ip an ipv4/6 multicast address
|
* @param ip an ipv4/6 multicast address
|
||||||
* @return 0 in case of success
|
* @return 0 in case of success
|
||||||
* @ingroup media_parameters
|
* @ingroup media_parameters
|
||||||
|
|
|
||||||
|
|
@ -3114,6 +3114,17 @@ extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_setRLSUri(JNIEnv*
|
||||||
env->ReleaseStringUTFChars(jrlsUri, uri);
|
env->ReleaseStringUTFChars(jrlsUri, uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" jlong Java_org_linphone_core_LinphoneFriendListImpl_findFriendByUri(JNIEnv* env
|
||||||
|
,jobject thiz
|
||||||
|
,jlong friendListptr
|
||||||
|
,jstring juri) {
|
||||||
|
const char* uri = env->GetStringUTFChars(juri, NULL);
|
||||||
|
LinphoneFriend* lResult;
|
||||||
|
lResult = linphone_friend_list_find_friend_by_uri((LinphoneFriendList*)friendListptr,uri);
|
||||||
|
env->ReleaseStringUTFChars(juri, uri);
|
||||||
|
return (jlong)lResult;
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_addFriend(JNIEnv* env
|
extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_addFriend(JNIEnv* env
|
||||||
,jobject thiz
|
,jobject thiz
|
||||||
,jlong friendListptr
|
,jlong friendListptr
|
||||||
|
|
@ -3377,10 +3388,25 @@ extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_markAsRead(JNIEnv*
|
||||||
|
|
||||||
|
|
||||||
extern "C" jlong Java_org_linphone_core_LinphoneChatRoomImpl_createFileTransferMessage(JNIEnv* env, jobject thiz, jlong ptr, jstring jname, jstring jtype, jstring jsubtype, jint data_size) {
|
extern "C" jlong Java_org_linphone_core_LinphoneChatRoomImpl_createFileTransferMessage(JNIEnv* env, jobject thiz, jlong ptr, jstring jname, jstring jtype, jstring jsubtype, jint data_size) {
|
||||||
LinphoneContent content = {0};
|
LinphoneCore *lc = linphone_chat_room_get_core((LinphoneChatRoom*) ptr);
|
||||||
|
LinphoneContent * content = linphone_core_create_content(lc);
|
||||||
LinphoneChatMessage *message = NULL;
|
LinphoneChatMessage *message = NULL;
|
||||||
|
const char *tmp;
|
||||||
|
|
||||||
message = linphone_chat_room_create_file_transfer_message((LinphoneChatRoom *)ptr, &content);
|
linphone_content_set_type(content, tmp = env->GetStringUTFChars(jtype, NULL));
|
||||||
|
env->ReleaseStringUTFChars(jtype, tmp);
|
||||||
|
|
||||||
|
linphone_content_set_subtype(content, tmp = env->GetStringUTFChars(jsubtype, NULL));
|
||||||
|
env->ReleaseStringUTFChars(jsubtype, tmp);
|
||||||
|
|
||||||
|
linphone_content_set_name(content, tmp = env->GetStringUTFChars(jname, NULL));
|
||||||
|
env->ReleaseStringUTFChars(jname, tmp);
|
||||||
|
|
||||||
|
linphone_content_set_size(content, data_size);
|
||||||
|
|
||||||
|
message = linphone_chat_room_create_file_transfer_message((LinphoneChatRoom *)ptr, content);
|
||||||
|
|
||||||
|
linphone_content_unref(content);
|
||||||
|
|
||||||
return (jlong) message;
|
return (jlong) message;
|
||||||
}
|
}
|
||||||
|
|
@ -4756,6 +4782,34 @@ extern "C" jstring Java_org_linphone_core_LinphoneCoreImpl_getUpnpExternalIpaddr
|
||||||
return jvalue;
|
return jvalue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LinphoneContent *create_content_from_java_args(JNIEnv *env, LinphoneCore *lc, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding, jstring jname){
|
||||||
|
LinphoneContent *content = NULL;
|
||||||
|
if (jtype){
|
||||||
|
content = linphone_core_create_content(lc);
|
||||||
|
void *data = (void*)env->GetByteArrayElements(jdata,NULL);
|
||||||
|
const char *tmp;
|
||||||
|
|
||||||
|
linphone_content_set_type(content, tmp = env->GetStringUTFChars(jtype, NULL));
|
||||||
|
env->ReleaseStringUTFChars(jtype, tmp);
|
||||||
|
|
||||||
|
linphone_content_set_subtype(content, tmp = env->GetStringUTFChars(jsubtype, NULL));
|
||||||
|
env->ReleaseStringUTFChars(jsubtype, tmp);
|
||||||
|
|
||||||
|
if (jname){
|
||||||
|
linphone_content_set_name(content, tmp = env->GetStringUTFChars(jname, NULL));
|
||||||
|
env->ReleaseStringUTFChars(jname, tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (jencoding){
|
||||||
|
linphone_content_set_encoding(content, tmp = env->GetStringUTFChars(jencoding,NULL));
|
||||||
|
env->ReleaseStringUTFChars(jencoding, tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
linphone_content_set_buffer(content, data, env->GetArrayLength(jdata));
|
||||||
|
env->ReleaseByteArrayElements(jdata,(jbyte*)data,JNI_ABORT);
|
||||||
|
}
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Class: org_linphone_core_LinphoneCoreImpl
|
* Class: org_linphone_core_LinphoneCoreImpl
|
||||||
|
|
@ -4766,15 +4820,14 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_subscribe(JNIE
|
||||||
jstring jevname, jint expires, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
jstring jevname, jint expires, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
||||||
LinphoneCore *lc=(LinphoneCore*)coreptr;
|
LinphoneCore *lc=(LinphoneCore*)coreptr;
|
||||||
LinphoneAddress *addr=(LinphoneAddress*)addrptr;
|
LinphoneAddress *addr=(LinphoneAddress*)addrptr;
|
||||||
LinphoneContent content={0};
|
LinphoneContent * content = create_content_from_java_args(env, (LinphoneCore*)coreptr, jtype, jsubtype, jdata, jencoding, NULL);
|
||||||
LinphoneEvent *ev;
|
LinphoneEvent *ev;
|
||||||
jobject jev=NULL;
|
jobject jev=NULL;
|
||||||
const char *evname=env->GetStringUTFChars(jevname,NULL);
|
const char *evname=env->GetStringUTFChars(jevname,NULL);
|
||||||
|
|
||||||
ev=linphone_core_subscribe(lc,addr,evname,expires,linphone_content_get_type(&content) ? &content : NULL);
|
|
||||||
if (jtype){
|
ev=linphone_core_subscribe(lc,addr,evname,expires, content);
|
||||||
env->ReleaseByteArrayElements(jdata,(jbyte*)linphone_content_get_user_data(&content),JNI_ABORT);
|
if (content) linphone_content_unref(content);
|
||||||
}
|
|
||||||
env->ReleaseStringUTFChars(jevname,evname);
|
env->ReleaseStringUTFChars(jevname,evname);
|
||||||
if (ev){
|
if (ev){
|
||||||
jev=getEvent(env,ev);
|
jev=getEvent(env,ev);
|
||||||
|
|
@ -4791,17 +4844,13 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_publish(JNIEnv
|
||||||
jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
||||||
LinphoneCore *lc=(LinphoneCore*)coreptr;
|
LinphoneCore *lc=(LinphoneCore*)coreptr;
|
||||||
LinphoneAddress *addr=(LinphoneAddress*)addrptr;
|
LinphoneAddress *addr=(LinphoneAddress*)addrptr;
|
||||||
LinphoneContent content={0};
|
LinphoneContent * content = create_content_from_java_args(env, (LinphoneCore*)coreptr, jtype, jsubtype, jdata, jencoding, NULL);
|
||||||
LinphoneEvent *ev;
|
LinphoneEvent *ev;
|
||||||
jobject jev=NULL;
|
jobject jev=NULL;
|
||||||
const char *evname=env->GetStringUTFChars(jevname,NULL);
|
const char *evname=env->GetStringUTFChars(jevname,NULL);
|
||||||
|
|
||||||
ev=linphone_core_subscribe(lc,addr,evname,expires,linphone_content_get_type(&content) ? &content : NULL);
|
ev=linphone_core_publish(lc,addr,evname,expires, content);
|
||||||
|
if (content) linphone_content_unref(content);
|
||||||
if (jtype){
|
|
||||||
env->ReleaseByteArrayElements(jdata,(jbyte*)linphone_content_get_user_data(&content),JNI_ABORT);
|
|
||||||
|
|
||||||
}
|
|
||||||
env->ReleaseStringUTFChars(jevname,evname);
|
env->ReleaseStringUTFChars(jevname,evname);
|
||||||
if (ev){
|
if (ev){
|
||||||
jev=getEvent(env,ev);
|
jev=getEvent(env,ev);
|
||||||
|
|
@ -4943,24 +4992,35 @@ static jobject create_java_linphone_content(JNIEnv *env, const LinphoneContent *
|
||||||
jstring jtype, jsubtype, jencoding, jname;
|
jstring jtype, jsubtype, jencoding, jname;
|
||||||
jbyteArray jdata = NULL;
|
jbyteArray jdata = NULL;
|
||||||
jint jsize = 0;
|
jint jsize = 0;
|
||||||
|
const char *tmp;
|
||||||
|
void *data;
|
||||||
|
|
||||||
contentClass = (jclass)env->FindClass("org/linphone/core/LinphoneContentImpl");
|
contentClass = (jclass)env->FindClass("org/linphone/core/LinphoneContentImpl");
|
||||||
ctor = env->GetMethodID(contentClass,"<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[BLjava/lang/String;I)V");
|
ctor = env->GetMethodID(contentClass,"<init>", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[BLjava/lang/String;I)V");
|
||||||
|
|
||||||
jtype = env->NewStringUTF(linphone_content_get_type(icontent));
|
jtype = env->NewStringUTF(linphone_content_get_type(icontent));
|
||||||
jsubtype = env->NewStringUTF(linphone_content_get_subtype(icontent));
|
jsubtype = env->NewStringUTF(linphone_content_get_subtype(icontent));
|
||||||
jencoding = linphone_content_get_encoding(icontent) ? env->NewStringUTF(linphone_content_get_encoding(icontent)) : NULL;
|
jencoding = ((tmp = linphone_content_get_encoding(icontent))) ? env->NewStringUTF(tmp) : NULL;
|
||||||
jname = linphone_content_get_name(icontent) ? env->NewStringUTF(linphone_content_get_name(icontent)) : NULL;
|
jname = ((tmp = linphone_content_get_name(icontent))) ? env->NewStringUTF(tmp) : NULL;
|
||||||
jsize = (jint) linphone_content_get_size(icontent);
|
jsize = (jint) linphone_content_get_size(icontent);
|
||||||
|
|
||||||
if (linphone_content_get_user_data(icontent)){
|
data = linphone_content_get_buffer(icontent);
|
||||||
|
if (data){
|
||||||
jdata = env->NewByteArray(linphone_content_get_size(icontent));
|
jdata = env->NewByteArray(linphone_content_get_size(icontent));
|
||||||
env->SetByteArrayRegion(jdata, 0, linphone_content_get_size(icontent), (jbyte*)linphone_content_get_user_data(icontent));
|
env->SetByteArrayRegion(jdata, 0, linphone_content_get_size(icontent), (jbyte*)data);
|
||||||
}
|
}
|
||||||
|
|
||||||
jobject jobj = env->NewObject(contentClass, ctor, jname, jtype, jsubtype, jdata, jencoding, jsize);
|
jobject jobj = env->NewObject(contentClass, ctor, jname, jtype, jsubtype, jdata, jencoding, jsize);
|
||||||
|
|
||||||
env->DeleteLocalRef(contentClass);
|
env->DeleteLocalRef(contentClass);
|
||||||
|
env->DeleteLocalRef(jtype);
|
||||||
|
env->DeleteLocalRef(jsubtype);
|
||||||
|
if (jencoding) {
|
||||||
|
env->DeleteLocalRef(jencoding);
|
||||||
|
}
|
||||||
|
if (jname) {
|
||||||
|
env->DeleteLocalRef(jname);
|
||||||
|
}
|
||||||
|
|
||||||
return jobj;
|
return jobj;
|
||||||
}
|
}
|
||||||
|
|
@ -5030,9 +5090,22 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneInfoMessageImpl_getCont
|
||||||
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
||||||
*/
|
*/
|
||||||
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneInfoMessageImpl_setContent(JNIEnv *env, jobject jobj, jlong infoptr, jstring jtype, jstring jsubtype, jstring jdata){
|
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneInfoMessageImpl_setContent(JNIEnv *env, jobject jobj, jlong infoptr, jstring jtype, jstring jsubtype, jstring jdata){
|
||||||
LinphoneContent content={0};
|
LinphoneInfoMessage *infomsg = (LinphoneInfoMessage*) infoptr;
|
||||||
|
LinphoneContent * content = linphone_content_new();
|
||||||
|
const char *tmp;
|
||||||
|
|
||||||
linphone_info_message_set_content((LinphoneInfoMessage*)infoptr,&content);
|
linphone_content_set_type(content, tmp = env->GetStringUTFChars(jtype,NULL));
|
||||||
|
env->ReleaseStringUTFChars(jtype, tmp);
|
||||||
|
|
||||||
|
linphone_content_set_type(content, tmp = env->GetStringUTFChars(jsubtype,NULL));
|
||||||
|
env->ReleaseStringUTFChars(jsubtype, tmp);
|
||||||
|
|
||||||
|
|
||||||
|
linphone_content_set_string_buffer(content, tmp = env->GetStringUTFChars(jdata,NULL));
|
||||||
|
env->ReleaseStringUTFChars(jdata, tmp);
|
||||||
|
|
||||||
|
linphone_info_message_set_content((LinphoneInfoMessage*)infoptr, content);
|
||||||
|
linphone_content_unref(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -5132,13 +5205,16 @@ JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_denySubscription
|
||||||
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
|
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
|
||||||
*/
|
*/
|
||||||
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_notify(JNIEnv *env, jobject jobj, jlong evptr, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_notify(JNIEnv *env, jobject jobj, jlong evptr, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
||||||
LinphoneContent content={0};
|
LinphoneContent * content = create_content_from_java_args(env, linphone_event_get_core((LinphoneEvent *)evptr),
|
||||||
|
jtype, jsubtype, jdata, jencoding, NULL);
|
||||||
LinphoneEvent *ev=(LinphoneEvent*)evptr;
|
LinphoneEvent *ev=(LinphoneEvent*)evptr;
|
||||||
jint err;
|
jint err;
|
||||||
|
|
||||||
|
err=linphone_event_notify(ev, content);
|
||||||
|
|
||||||
err=linphone_event_notify(ev,linphone_content_get_type(&content) ? &content : NULL);
|
if (content){
|
||||||
|
linphone_content_unref(content);
|
||||||
|
}
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5148,12 +5224,14 @@ JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_notify(JNIEnv *e
|
||||||
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
|
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
|
||||||
*/
|
*/
|
||||||
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_updateSubscribe(JNIEnv *env, jobject jobj, jlong evptr, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_updateSubscribe(JNIEnv *env, jobject jobj, jlong evptr, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
||||||
LinphoneContent content={0};
|
LinphoneContent * content = create_content_from_java_args(env, linphone_event_get_core((LinphoneEvent *)evptr),
|
||||||
|
jtype, jsubtype, jdata, jencoding, NULL);
|
||||||
LinphoneEvent *ev=(LinphoneEvent*)evptr;
|
LinphoneEvent *ev=(LinphoneEvent*)evptr;
|
||||||
jint err;
|
jint err;
|
||||||
|
|
||||||
err=linphone_event_update_subscribe(ev,linphone_content_get_type(&content) ? &content : NULL);
|
err=linphone_event_update_subscribe(ev, content);
|
||||||
|
|
||||||
|
if (content) linphone_content_unref(content);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5163,12 +5241,14 @@ JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_updateSubscribe(
|
||||||
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
|
* Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
|
||||||
*/
|
*/
|
||||||
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_updatePublish(JNIEnv *env, jobject jobj, jlong evptr, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_updatePublish(JNIEnv *env, jobject jobj, jlong evptr, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding){
|
||||||
LinphoneContent content={0};
|
LinphoneContent * content = create_content_from_java_args(env, linphone_event_get_core((LinphoneEvent *)evptr),
|
||||||
|
jtype, jsubtype, jdata, jencoding, NULL);
|
||||||
LinphoneEvent *ev=(LinphoneEvent*)evptr;
|
LinphoneEvent *ev=(LinphoneEvent*)evptr;
|
||||||
jint err;
|
jint err;
|
||||||
|
|
||||||
err=linphone_event_update_publish(ev,linphone_content_get_type(&content) ? &content : NULL);
|
err=linphone_event_update_publish(ev, content);
|
||||||
|
|
||||||
|
if (content) linphone_content_unref(content);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5233,9 +5313,12 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_createSubscrib
|
||||||
return jevent;
|
return jevent;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneEventImpl_sendSubscribe(JNIEnv *env, jobject thiz, jlong jevent, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding) {
|
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneEventImpl_sendSubscribe(JNIEnv *env, jobject thiz, jlong eventptr, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding) {
|
||||||
LinphoneContent content = {0};
|
LinphoneContent *content = create_content_from_java_args(env, linphone_event_get_core((LinphoneEvent*)eventptr),
|
||||||
linphone_event_send_subscribe((LinphoneEvent*) jevent, linphone_content_get_type(&content)? &content : NULL);
|
jtype, jsubtype, jdata, jencoding, NULL);
|
||||||
|
|
||||||
|
linphone_event_send_subscribe((LinphoneEvent*) eventptr, content);
|
||||||
|
if (content) linphone_content_unref(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_createPublish(JNIEnv *env, jobject thiz, jlong jcore, jlong jaddr, jstring jeventname, jint expires) {
|
JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_createPublish(JNIEnv *env, jobject thiz, jlong jcore, jlong jaddr, jstring jeventname, jint expires) {
|
||||||
|
|
@ -5253,11 +5336,11 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_createPublish(
|
||||||
return jevent;
|
return jevent;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneEventImpl_sendPublish(JNIEnv *env, jobject thiz, jlong jevent, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding) {
|
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneEventImpl_sendPublish(JNIEnv *env, jobject thiz, jlong eventptr, jstring jtype, jstring jsubtype, jbyteArray jdata, jstring jencoding) {
|
||||||
LinphoneContent content = {0};
|
LinphoneContent *content = create_content_from_java_args(env, linphone_event_get_core((LinphoneEvent*)eventptr),
|
||||||
linphone_event_send_publish((LinphoneEvent*) jevent, linphone_content_get_type(&content)? &content : NULL);
|
jtype, jsubtype, jdata, jencoding, NULL);
|
||||||
|
linphone_event_send_publish((LinphoneEvent*) eventptr, content);
|
||||||
|
if (content) linphone_content_unref(content);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneEventImpl_addCustomHeader(JNIEnv *env, jobject thiz, jlong jevent, jstring jname, jstring jvalue) {
|
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneEventImpl_addCustomHeader(JNIEnv *env, jobject thiz, jlong jevent, jstring jname, jstring jvalue) {
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ void linphone_sql_request_all(sqlite3* db,const char *stmt, LinphoneCore* lc){
|
||||||
}
|
}
|
||||||
|
|
||||||
static int linphone_chat_message_store_content(LinphoneChatMessage *msg) {
|
static int linphone_chat_message_store_content(LinphoneChatMessage *msg) {
|
||||||
LinphoneCore *lc = linphone_chat_room_get_lc(msg->chat_room);
|
LinphoneCore *lc = linphone_chat_room_get_core(msg->chat_room);
|
||||||
int id = -1;
|
int id = -1;
|
||||||
if (lc->db) {
|
if (lc->db) {
|
||||||
LinphoneContent *content = msg->file_transfer_information;
|
LinphoneContent *content = msg->file_transfer_information;
|
||||||
|
|
@ -273,7 +273,7 @@ static int linphone_chat_message_store_content(LinphoneChatMessage *msg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int linphone_chat_message_store(LinphoneChatMessage *msg){
|
unsigned int linphone_chat_message_store(LinphoneChatMessage *msg){
|
||||||
LinphoneCore *lc=linphone_chat_room_get_lc(msg->chat_room);
|
LinphoneCore *lc=linphone_chat_room_get_core(msg->chat_room);
|
||||||
int id = 0;
|
int id = 0;
|
||||||
|
|
||||||
if (lc->db){
|
if (lc->db){
|
||||||
|
|
@ -330,7 +330,7 @@ void linphone_chat_message_store_appdata(LinphoneChatMessage* msg){
|
||||||
}
|
}
|
||||||
|
|
||||||
void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr){
|
void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr){
|
||||||
LinphoneCore *lc=linphone_chat_room_get_lc(cr);
|
LinphoneCore *lc=linphone_chat_room_get_core(cr);
|
||||||
int read=1;
|
int read=1;
|
||||||
char *peer;
|
char *peer;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
@ -351,7 +351,7 @@ void linphone_chat_room_mark_as_read(LinphoneChatRoom *cr){
|
||||||
}
|
}
|
||||||
|
|
||||||
void linphone_chat_room_update_url(LinphoneChatRoom *cr, LinphoneChatMessage *msg) {
|
void linphone_chat_room_update_url(LinphoneChatRoom *cr, LinphoneChatMessage *msg) {
|
||||||
LinphoneCore *lc=linphone_chat_room_get_lc(cr);
|
LinphoneCore *lc=linphone_chat_room_get_core(cr);
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
||||||
if (lc->db==NULL) return ;
|
if (lc->db==NULL) return ;
|
||||||
|
|
@ -362,7 +362,7 @@ void linphone_chat_room_update_url(LinphoneChatRoom *cr, LinphoneChatMessage *ms
|
||||||
}
|
}
|
||||||
|
|
||||||
static int linphone_chat_room_get_messages_count(LinphoneChatRoom *cr, bool_t unread_only){
|
static int linphone_chat_room_get_messages_count(LinphoneChatRoom *cr, bool_t unread_only){
|
||||||
LinphoneCore *lc=linphone_chat_room_get_lc(cr);
|
LinphoneCore *lc=linphone_chat_room_get_core(cr);
|
||||||
int numrows=0;
|
int numrows=0;
|
||||||
char *peer;
|
char *peer;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
@ -433,7 +433,7 @@ void linphone_chat_room_delete_history(LinphoneChatRoom *cr){
|
||||||
}
|
}
|
||||||
|
|
||||||
MSList *linphone_chat_room_get_history_range(LinphoneChatRoom *cr, int startm, int endm){
|
MSList *linphone_chat_room_get_history_range(LinphoneChatRoom *cr, int startm, int endm){
|
||||||
LinphoneCore *lc=linphone_chat_room_get_lc(cr);
|
LinphoneCore *lc=linphone_chat_room_get_core(cr);
|
||||||
MSList *ret;
|
MSList *ret;
|
||||||
char *buf,*buf2;
|
char *buf,*buf2;
|
||||||
char *peer;
|
char *peer;
|
||||||
|
|
|
||||||
|
|
@ -1824,6 +1824,14 @@ const char ** linphone_core_get_supported_file_formats(LinphoneCore *core){
|
||||||
return core->supported_formats;
|
return core->supported_formats;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool_t linphone_core_file_format_supported(LinphoneCore *lc, const char *fmt){
|
||||||
|
const char **formats=linphone_core_get_supported_file_formats(lc);
|
||||||
|
for(;*formats!=NULL;++formats){
|
||||||
|
if (strcasecmp(*formats,fmt)==0) return TRUE;
|
||||||
|
}
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
bool_t linphone_core_symmetric_rtp_enabled(LinphoneCore*lc){
|
bool_t linphone_core_symmetric_rtp_enabled(LinphoneCore*lc){
|
||||||
return lp_config_get_int(lc->config,"rtp","symmetric",1);
|
return lp_config_get_int(lc->config,"rtp","symmetric",1);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -434,6 +434,7 @@ static void initiate_outgoing(const SalStreamDescription *local_offer,
|
||||||
result->dtls_role = SalDtlsRoleInvalid;
|
result->dtls_role = SalDtlsRoleInvalid;
|
||||||
}
|
}
|
||||||
result->rtcp_mux = remote_answer->rtcp_mux && local_offer->rtcp_mux;
|
result->rtcp_mux = remote_answer->rtcp_mux && local_offer->rtcp_mux;
|
||||||
|
result->implicit_rtcp_fb = local_offer->implicit_rtcp_fb && remote_answer->implicit_rtcp_fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -502,6 +503,7 @@ static void initiate_incoming(const SalStreamDescription *local_cap,
|
||||||
result->dtls_role = SalDtlsRoleInvalid;
|
result->dtls_role = SalDtlsRoleInvalid;
|
||||||
}
|
}
|
||||||
result->rtcp_mux = remote_offer->rtcp_mux && local_cap->rtcp_mux;
|
result->rtcp_mux = remote_offer->rtcp_mux && local_cap->rtcp_mux;
|
||||||
|
result->implicit_rtcp_fb = local_cap->implicit_rtcp_fb && remote_offer->implicit_rtcp_fb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1447,6 +1447,7 @@ void linphone_core_add_subscriber(LinphoneCore *lc, const char *subscriber, SalO
|
||||||
char *tmp;
|
char *tmp;
|
||||||
|
|
||||||
if (fl==NULL) return ;
|
if (fl==NULL) return ;
|
||||||
|
fl->lc = lc;
|
||||||
linphone_friend_add_incoming_subscription(fl, op);
|
linphone_friend_add_incoming_subscription(fl, op);
|
||||||
linphone_friend_set_inc_subscribe_policy(fl,LinphoneSPAccept);
|
linphone_friend_set_inc_subscribe_policy(fl,LinphoneSPAccept);
|
||||||
fl->inc_subscribe_pending=TRUE;
|
fl->inc_subscribe_pending=TRUE;
|
||||||
|
|
|
||||||
|
|
@ -662,6 +662,7 @@ struct _LinphoneFriend{
|
||||||
struct _LinphoneCore *lc;
|
struct _LinphoneCore *lc;
|
||||||
BuddyInfo *info;
|
BuddyInfo *info;
|
||||||
char *refkey;
|
char *refkey;
|
||||||
|
bool_t in_list;
|
||||||
bool_t subscribe;
|
bool_t subscribe;
|
||||||
bool_t subscribe_active;
|
bool_t subscribe_active;
|
||||||
bool_t inc_subscribe_pending;
|
bool_t inc_subscribe_pending;
|
||||||
|
|
|
||||||
|
|
@ -266,6 +266,16 @@ bool_t sal_media_description_has_avpf(const SalMediaDescription *md) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool_t sal_media_description_has_implicit_avpf(const SalMediaDescription *md) {
|
||||||
|
int i;
|
||||||
|
if (md->nb_streams == 0) return FALSE;
|
||||||
|
for (i = 0; i < SAL_MEDIA_DESCRIPTION_MAX_STREAMS; i++) {
|
||||||
|
if (!sal_stream_description_active(&md->streams[i])) continue;
|
||||||
|
if (sal_stream_description_has_implicit_avpf(&md->streams[i]) != TRUE) return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
bool_t sal_media_description_has_srtp(const SalMediaDescription *md) {
|
bool_t sal_media_description_has_srtp(const SalMediaDescription *md) {
|
||||||
int i;
|
int i;
|
||||||
if (md->nb_streams == 0) return FALSE;
|
if (md->nb_streams == 0) return FALSE;
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,12 @@ set(SOURCE_FILES
|
||||||
utils.c
|
utils.c
|
||||||
videowindow.c
|
videowindow.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(OBJC_FILES)
|
||||||
|
if (APPLE)
|
||||||
|
list(APPEND OBJC_FILES mac.m)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_ASSISTANT)
|
if(ENABLE_ASSISTANT)
|
||||||
list(APPEND SOURCE_FILES setupwizard.c)
|
list(APPEND SOURCE_FILES setupwizard.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -78,11 +84,14 @@ if(WIN32)
|
||||||
list(APPEND SOURCE_FILES linphone.rc)
|
list(APPEND SOURCE_FILES linphone.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
apply_compile_flags(SOURCE_FILES "CPP" "C")
|
apply_compile_flags(SOURCE_FILES "CPP" "C")
|
||||||
|
apply_compile_flags(OBJC_FILES "CPP" "OBJC")
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
add_executable(linphone-gtk WIN32 ${SOURCE_FILES})
|
add_executable(linphone-gtk WIN32 ${SOURCE_FILES})
|
||||||
else()
|
else()
|
||||||
add_executable(linphone-gtk ${SOURCE_FILES})
|
add_executable(linphone-gtk ${SOURCE_FILES} ${OBJC_FILES})
|
||||||
endif()
|
endif()
|
||||||
set_target_properties(linphone-gtk PROPERTIES OUTPUT_NAME linphone LINKER_LANGUAGE CXX)
|
set_target_properties(linphone-gtk PROPERTIES OUTPUT_NAME linphone LINKER_LANGUAGE CXX)
|
||||||
target_include_directories(linphone-gtk PUBLIC ${GTK2_INCLUDE_DIRS} ${INTL_INCLUDE_DIRS})
|
target_include_directories(linphone-gtk PUBLIC ${GTK2_INCLUDE_DIRS} ${INTL_INCLUDE_DIRS})
|
||||||
|
|
@ -104,6 +113,10 @@ if(GTKMACINTEGRATION_FOUND)
|
||||||
target_include_directories(linphone-gtk PUBLIC ${GTKMACINTEGRATION_INCLUDE_DIRS})
|
target_include_directories(linphone-gtk PUBLIC ${GTKMACINTEGRATION_INCLUDE_DIRS})
|
||||||
target_link_libraries(linphone-gtk ${GTKMACINTEGRATION_LIBRARIES})
|
target_link_libraries(linphone-gtk ${GTKMACINTEGRATION_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
if(APPLE)
|
||||||
|
target_link_libraries(linphone-gtk "-framework Cocoa")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
install(TARGETS linphone-gtk
|
install(TARGETS linphone-gtk
|
||||||
RUNTIME DESTINATION bin
|
RUNTIME DESTINATION bin
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,7 @@ linphone_SOURCES+= \
|
||||||
status_notifier.h
|
status_notifier.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
linphone_LDADD= $(top_builddir)/coreapi/liblinphone.la \
|
linphone_LDADD= $(top_builddir)/coreapi/liblinphone.la \
|
||||||
$(LIBGTK_LIBS) $(NOTIFY1_LIBS) $(NOTIFY4_LIBS) $(LIBGTKMAC_LIBS) $(INTLLIBS) $(SQLITE3_LIBS) $(BELLESIP_LIBS)
|
$(LIBGTK_LIBS) $(NOTIFY1_LIBS) $(NOTIFY4_LIBS) $(LIBGTKMAC_LIBS) $(INTLLIBS) $(SQLITE3_LIBS) $(BELLESIP_LIBS)
|
||||||
|
|
||||||
|
|
@ -92,17 +93,20 @@ endif
|
||||||
uidir=$(datadir)/linphone
|
uidir=$(datadir)/linphone
|
||||||
dist_ui_DATA=$(UI_FILES) $(PIXMAPS) $(top_srcdir)/COPYING
|
dist_ui_DATA=$(UI_FILES) $(PIXMAPS) $(top_srcdir)/COPYING
|
||||||
|
|
||||||
|
if BUILD_MACOS
|
||||||
|
linphone_SOURCES+=mac.m
|
||||||
|
linphone_LDFLAGS+=-framework Cocoa
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
AM_CFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ -I$(top_builddir)/coreapi/ \
|
AM_CPPFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ -I$(top_builddir)/coreapi/ \
|
||||||
$(MEDIASTREAMER_CFLAGS) \
|
$(MEDIASTREAMER_CFLAGS) \
|
||||||
$(ORTP_CFLAGS) $(BELLESIP_CFLAGS) \
|
$(ORTP_CFLAGS) $(BELLESIP_CFLAGS) \
|
||||||
$(STRICT_OPTIONS) $(STRICT_OPTIONS_CC) $(LIBGTK_CFLAGS) $(LIBGTKMAC_CFLAGS) $(IPV6_CFLAGS) \
|
$(STRICT_OPTIONS) $(STRICT_OPTIONS_CC) $(LIBGTK_CFLAGS) $(LIBGTKMAC_CFLAGS) $(IPV6_CFLAGS) \
|
||||||
$(TUNNEL_CFLAGS) \
|
$(TUNNEL_CFLAGS) \
|
||||||
$(SQLITE3_CFLAGS)
|
$(SQLITE3_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
version_date.h: $(top_srcdir)/configure.ac
|
version_date.h: $(top_srcdir)/configure.ac
|
||||||
echo "#define LINPHONE_VERSION_DATE \"$(VERSION)-`date +%y%m%d`\"" > $@
|
echo "#define LINPHONE_VERSION_DATE \"$(VERSION)-`date +%y%m%d`\"" > $@
|
||||||
|
|
||||||
|
|
|
||||||
12
gtk/chat.c
12
gtk/chat.c
|
|
@ -81,6 +81,12 @@ char *linphone_gtk_message_storage_get_db_file(const char *filename){
|
||||||
return db_file;
|
return db_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void linphone_gtk_mark_chat_read(LinphoneChatRoom *cr) {
|
||||||
|
linphone_chat_room_mark_as_read(cr);
|
||||||
|
#ifdef __APPLE__
|
||||||
|
linphone_gtk_update_badge_count();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void linphone_gtk_quit_chatroom(LinphoneChatRoom *cr) {
|
void linphone_gtk_quit_chatroom(LinphoneChatRoom *cr) {
|
||||||
GtkWidget *main_window=linphone_gtk_get_main_window ();
|
GtkWidget *main_window=linphone_gtk_get_main_window ();
|
||||||
|
|
@ -91,7 +97,7 @@ void linphone_gtk_quit_chatroom(LinphoneChatRoom *cr) {
|
||||||
|
|
||||||
g_return_if_fail(w!=NULL);
|
g_return_if_fail(w!=NULL);
|
||||||
gtk_notebook_remove_page(GTK_NOTEBOOK(nb),gtk_notebook_page_num(GTK_NOTEBOOK(nb),w));
|
gtk_notebook_remove_page(GTK_NOTEBOOK(nb),gtk_notebook_page_num(GTK_NOTEBOOK(nb),w));
|
||||||
linphone_chat_room_mark_as_read(cr);
|
linphone_gtk_mark_chat_read(cr);
|
||||||
g_object_set_data(G_OBJECT(friendlist),"chatview",NULL);
|
g_object_set_data(G_OBJECT(friendlist),"chatview",NULL);
|
||||||
from=g_object_get_data(G_OBJECT(w),"from_message");
|
from=g_object_get_data(G_OBJECT(w),"from_message");
|
||||||
if (from){
|
if (from){
|
||||||
|
|
@ -280,7 +286,7 @@ void linphone_gtk_compose_text(void) {
|
||||||
LinphoneChatRoom *cr=g_object_get_data(G_OBJECT(w),"cr");
|
LinphoneChatRoom *cr=g_object_get_data(G_OBJECT(w),"cr");
|
||||||
if (cr) {
|
if (cr) {
|
||||||
linphone_chat_room_compose(cr);
|
linphone_chat_room_compose(cr);
|
||||||
linphone_chat_room_mark_as_read(cr);
|
linphone_gtk_mark_chat_read(cr);
|
||||||
linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(friendlist));
|
linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(friendlist));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -394,7 +400,7 @@ static gboolean link_event_handler(GtkTextTag *tag, GObject *text_view,GdkEvent
|
||||||
}
|
}
|
||||||
g_free(uri);
|
g_free(uri);
|
||||||
|
|
||||||
linphone_chat_room_mark_as_read(chat_room);
|
linphone_gtk_mark_chat_read(chat_room);
|
||||||
linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(friendlist));
|
linphone_gtk_friend_list_update_button_display(GTK_TREE_VIEW(friendlist));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
||||||
|
|
@ -308,7 +308,7 @@ void linphone_gtk_notebook_tab_select(GtkNotebook *notebook,GtkWidget *page,guin
|
||||||
if(gtk_notebook_page_num(notebook,page)==gtk_notebook_page_num(notebook,chat_view)){
|
if(gtk_notebook_page_num(notebook,page)==gtk_notebook_page_num(notebook,chat_view)){
|
||||||
cr=g_object_get_data(G_OBJECT(chat_view),"cr");
|
cr=g_object_get_data(G_OBJECT(chat_view),"cr");
|
||||||
if(cr!=NULL){
|
if(cr!=NULL){
|
||||||
linphone_chat_room_mark_as_read(cr);
|
linphone_gtk_mark_chat_read(cr);
|
||||||
linphone_gtk_show_friends();
|
linphone_gtk_show_friends();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -346,7 +346,7 @@ void linphone_gtk_chat_selected(GtkWidget *item){
|
||||||
} else {
|
} else {
|
||||||
linphone_gtk_load_chatroom(cr,uri,page);
|
linphone_gtk_load_chatroom(cr,uri,page);
|
||||||
}
|
}
|
||||||
linphone_chat_room_mark_as_read(cr);
|
linphone_gtk_mark_chat_read(cr);
|
||||||
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,page));
|
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,page));
|
||||||
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(page,"text_entry"));
|
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(page,"text_entry"));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -361,3 +361,8 @@ LINPHONE_PUBLIC bool_t linphone_gtk_is_friend(LinphoneCore *lc, const char *cont
|
||||||
LINPHONE_PUBLIC gboolean linphone_gtk_auto_answer_enabled(void);
|
LINPHONE_PUBLIC gboolean linphone_gtk_auto_answer_enabled(void);
|
||||||
LINPHONE_PUBLIC void linphone_gtk_update_status_bar_icons(void);
|
LINPHONE_PUBLIC void linphone_gtk_update_status_bar_icons(void);
|
||||||
LINPHONE_PUBLIC void linphone_gtk_enable_auto_answer(GtkToggleButton *checkbox, gpointer user_data);
|
LINPHONE_PUBLIC void linphone_gtk_enable_auto_answer(GtkToggleButton *checkbox, gpointer user_data);
|
||||||
|
|
||||||
|
LINPHONE_PUBLIC void linphone_gtk_mark_chat_read(LinphoneChatRoom *cr);
|
||||||
|
#ifdef __APPLE__
|
||||||
|
LINPHONE_PUBLIC void linphone_gtk_update_badge_count();
|
||||||
|
#endif
|
||||||
|
|
|
||||||
47
gtk/mac.m
Normal file
47
gtk/mac.m
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
/*
|
||||||
|
linphone, gtk-glade interface.
|
||||||
|
Copyright (C) 2008 Simon MORLAT (simon.morlat@linphone.org)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU General Public License
|
||||||
|
as published by the Free Software Foundation; either version 2
|
||||||
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef __APPLE__
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "linphone.h"
|
||||||
|
|
||||||
|
|
||||||
|
static int unread_messages_count() {
|
||||||
|
LinphoneCore* lc = linphone_gtk_get_core();
|
||||||
|
int count = 0;
|
||||||
|
const MSList *rooms = linphone_core_get_chat_rooms(lc);
|
||||||
|
const MSList *item = rooms;
|
||||||
|
while (item) {
|
||||||
|
LinphoneChatRoom *room = (LinphoneChatRoom *)item->data;
|
||||||
|
if (room) {
|
||||||
|
count += linphone_chat_room_get_unread_messages_count(room);
|
||||||
|
}
|
||||||
|
item = item->next;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
void linphone_gtk_update_badge_count() {
|
||||||
|
int count = unread_messages_count();
|
||||||
|
NSString* badgeStr = (count > 0) ? [NSString stringWithFormat:@"%d", count] : @"";
|
||||||
|
[[NSApp dockTile] setBadgeLabel:badgeStr];
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1557,6 +1557,9 @@ void linphone_gtk_status_icon_set_blinking(gboolean val) {
|
||||||
if(icon) {
|
if(icon) {
|
||||||
linphone_status_icon_enable_blinking(icon, val);
|
linphone_status_icon_enable_blinking(icon, val);
|
||||||
}
|
}
|
||||||
|
#ifdef __APPLE__
|
||||||
|
linphone_gtk_update_badge_count();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void linphone_gtk_options_activate(GtkWidget *item){
|
void linphone_gtk_options_activate(GtkWidget *item){
|
||||||
|
|
@ -1974,6 +1977,12 @@ static void linphone_gtk_check_soundcards(void){
|
||||||
}
|
}
|
||||||
|
|
||||||
static void linphone_gtk_quit_core(void){
|
static void linphone_gtk_quit_core(void){
|
||||||
|
#ifdef HAVE_GTK_OSX
|
||||||
|
{
|
||||||
|
GtkosxApplication *theMacApp = gtkosx_application_get();
|
||||||
|
gtkosx_application_set_menu_bar(theMacApp,NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
linphone_gtk_unmonitor_usb();
|
linphone_gtk_unmonitor_usb();
|
||||||
g_source_remove_by_user_data(linphone_gtk_get_core());
|
g_source_remove_by_user_data(linphone_gtk_get_core());
|
||||||
#ifdef BUILD_WIZARD
|
#ifdef BUILD_WIZARD
|
||||||
|
|
|
||||||
|
|
@ -318,6 +318,7 @@ bool_t sal_stream_description_has_implicit_avpf(const SalStreamDescription *sd);
|
||||||
bool_t sal_stream_description_has_srtp(const SalStreamDescription *sd);
|
bool_t sal_stream_description_has_srtp(const SalStreamDescription *sd);
|
||||||
bool_t sal_stream_description_has_dtls(const SalStreamDescription *sd);
|
bool_t sal_stream_description_has_dtls(const SalStreamDescription *sd);
|
||||||
bool_t sal_media_description_has_avpf(const SalMediaDescription *md);
|
bool_t sal_media_description_has_avpf(const SalMediaDescription *md);
|
||||||
|
bool_t sal_media_description_has_implicit_avpf(const SalMediaDescription *md);
|
||||||
bool_t sal_media_description_has_srtp(const SalMediaDescription *md);
|
bool_t sal_media_description_has_srtp(const SalMediaDescription *md);
|
||||||
bool_t sal_media_description_has_dtls(const SalMediaDescription *md);
|
bool_t sal_media_description_has_dtls(const SalMediaDescription *md);
|
||||||
int sal_media_description_get_nb_active_streams(const SalMediaDescription *md);
|
int sal_media_description_get_nb_active_streams(const SalMediaDescription *md);
|
||||||
|
|
|
||||||
|
|
@ -23,5 +23,6 @@ public interface LinphoneFriendList {
|
||||||
public void setRLSUri(String uri);
|
public void setRLSUri(String uri);
|
||||||
public void addFriend(LinphoneFriend friend);
|
public void addFriend(LinphoneFriend friend);
|
||||||
public void updateSubscriptions(LinphoneProxyConfig proxyConfig,boolean onlyWhenRegistered);
|
public void updateSubscriptions(LinphoneProxyConfig proxyConfig,boolean onlyWhenRegistered);
|
||||||
|
public LinphoneFriend findFriendByUri(String uri);
|
||||||
long getNativePtr();
|
long getNativePtr();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,8 @@ import java.io.IOException;
|
||||||
|
|
||||||
import org.linphone.core.LinphoneCall.State;
|
import org.linphone.core.LinphoneCall.State;
|
||||||
import org.linphone.core.LinphoneCoreListener;
|
import org.linphone.core.LinphoneCoreListener;
|
||||||
|
import org.linphone.core.LinphoneProxyConfigImpl;
|
||||||
|
|
||||||
import org.linphone.mediastream.Log;
|
import org.linphone.mediastream.Log;
|
||||||
import org.linphone.mediastream.Version;
|
import org.linphone.mediastream.Version;
|
||||||
import org.linphone.mediastream.video.AndroidVideoWindowImpl;
|
import org.linphone.mediastream.video.AndroidVideoWindowImpl;
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable {
|
||||||
private native void addFriend(long nativePtr,long friendPtr);
|
private native void addFriend(long nativePtr,long friendPtr);
|
||||||
private native void updateSubscriptions(long nativePtr,long proxyConfigPtr,boolean onlyWhenRegistered);
|
private native void updateSubscriptions(long nativePtr,long proxyConfigPtr,boolean onlyWhenRegistered);
|
||||||
private native Object getCore(long ptr);
|
private native Object getCore(long ptr);
|
||||||
|
private native LinphoneFriend findFriendByUri(long nativePtr,String uri);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
protected LinphoneFriendListImpl(LinphoneCoreImpl core) {
|
protected LinphoneFriendListImpl(LinphoneCoreImpl core) {
|
||||||
|
|
@ -57,6 +59,14 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LinphoneFriend findFriendByUri(String uri) {
|
||||||
|
synchronized(getSyncObject()){
|
||||||
|
return findFriendByUri(nativePtr,uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*reserved for JNI */
|
/*reserved for JNI */
|
||||||
protected LinphoneFriendListImpl(long aNativePtr) {
|
protected LinphoneFriendListImpl(long aNativePtr) {
|
||||||
nativePtr = aNativePtr;
|
nativePtr = aNativePtr;
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,8 @@ set(SOUND_FILES
|
||||||
hello8000.wav
|
hello8000.wav
|
||||||
incoming_chat.wav
|
incoming_chat.wav
|
||||||
ringback.wav
|
ringback.wav
|
||||||
|
dont_wait_too_long.mkv
|
||||||
|
toy-mono.wav
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES ${SOUND_FILES}
|
install(FILES ${SOUND_FILES}
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,20 @@
|
||||||
|
|
||||||
SUBDIRS=C fr it ja cs xml
|
SUBDIRS=C fr it ja cs xml
|
||||||
|
|
||||||
LINPHONE_SOUNDS=ringback.wav hello8000.wav hello16000.wav incoming_chat.wav
|
LINPHONE_ONHOLD_MUSIC= toy-mono.wav \
|
||||||
LINPHONE_RINGS=rings/orig.wav \
|
dont_wait_too_long.mkv
|
||||||
rings/oldphone.wav \
|
|
||||||
rings/oldphone-mono.wav \
|
LINPHONE_SOUNDS=ringback.wav hello8000.wav hello16000.wav incoming_chat.wav $(LINPHONE_ONHOLD_MUSIC)
|
||||||
rings/oldphone-mono-30s.caf \
|
|
||||||
rings/rock.wav \
|
LINPHONE_RINGS= \
|
||||||
rings/bigben.wav \
|
rings/oldphone-mono.wav \
|
||||||
rings/toy-mono.wav \
|
rings/oldphone-mono-30s.caf \
|
||||||
rings/sweet.wav \
|
rings/four_hands_together.mkv \
|
||||||
rings/synth.wav \
|
rings/house_keeping.mkv \
|
||||||
rings/tapping.wav
|
rings/its_a_game.mkv \
|
||||||
|
rings/leaving_dreams.mkv \
|
||||||
|
rings/notes_of_the_optimistic.mkv \
|
||||||
|
rings/soft_as_snow.mkv
|
||||||
|
|
||||||
sounddir=$(datadir)/sounds/linphone
|
sounddir=$(datadir)/sounds/linphone
|
||||||
|
|
||||||
|
|
|
||||||
BIN
share/dont_wait_too_long.mkv
Normal file
BIN
share/dont_wait_too_long.mkv
Normal file
Binary file not shown.
|
|
@ -21,18 +21,17 @@
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
set(RING_FILES
|
set(RING_FILES
|
||||||
bigben.wav
|
|
||||||
oldphone-mono-30s.caf
|
oldphone-mono-30s.caf
|
||||||
oldphone-mono.wav
|
oldphone-mono.wav
|
||||||
oldphone.wav
|
four_hands_together.mkv
|
||||||
orig.wav
|
house_keeping.mkv
|
||||||
rock.wav
|
its_a_game.mkv
|
||||||
sweet.wav
|
leaving_dreams.mkv
|
||||||
synth.wav
|
notes_of_the_optimistic.mkv
|
||||||
tapping.wav
|
soft_as_snow.mkv
|
||||||
toy-mono.wav
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
install(FILES ${RING_FILES}
|
install(FILES ${RING_FILES}
|
||||||
DESTINATION ${PACKAGE_RING_DIR}
|
DESTINATION ${PACKAGE_RING_DIR}
|
||||||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
||||||
|
|
|
||||||
Binary file not shown.
BIN
share/rings/four_hands_together.mkv
Normal file
BIN
share/rings/four_hands_together.mkv
Normal file
Binary file not shown.
BIN
share/rings/house_keeping.mkv
Normal file
BIN
share/rings/house_keeping.mkv
Normal file
Binary file not shown.
BIN
share/rings/its_a_game.mkv
Normal file
BIN
share/rings/its_a_game.mkv
Normal file
Binary file not shown.
BIN
share/rings/leaving_dreams.mkv
Normal file
BIN
share/rings/leaving_dreams.mkv
Normal file
Binary file not shown.
BIN
share/rings/notes_of_the_optimistic.mkv
Normal file
BIN
share/rings/notes_of_the_optimistic.mkv
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
share/rings/soft_as_snow.mkv
Normal file
BIN
share/rings/soft_as_snow.mkv
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -1966,68 +1966,68 @@ static void call_with_declined_video_using_policy(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void video_call_base_2(LinphoneCoreManager* pauline,LinphoneCoreManager* marie, bool_t using_policy,LinphoneMediaEncryption mode, bool_t callee_video_enabled, bool_t caller_video_enabled) {
|
void video_call_base_2(LinphoneCoreManager* caller,LinphoneCoreManager* callee, bool_t using_policy,LinphoneMediaEncryption mode, bool_t callee_video_enabled, bool_t caller_video_enabled) {
|
||||||
LinphoneCallTestParams caller_test_params = {0}, callee_test_params = {0};
|
LinphoneCallTestParams caller_test_params = {0}, callee_test_params = {0};
|
||||||
LinphoneCall* marie_call;
|
LinphoneCall* callee_call;
|
||||||
LinphoneCall* pauline_call;
|
LinphoneCall* caller_call;
|
||||||
LinphoneVideoPolicy marie_policy, pauline_policy;
|
LinphoneVideoPolicy callee_policy, caller_policy;
|
||||||
|
|
||||||
if (using_policy) {
|
if (using_policy) {
|
||||||
marie_policy.automatically_initiate=FALSE;
|
callee_policy.automatically_initiate=FALSE;
|
||||||
marie_policy.automatically_accept=TRUE;
|
callee_policy.automatically_accept=TRUE;
|
||||||
pauline_policy.automatically_initiate=TRUE;
|
caller_policy.automatically_initiate=TRUE;
|
||||||
pauline_policy.automatically_accept=FALSE;
|
caller_policy.automatically_accept=FALSE;
|
||||||
|
|
||||||
linphone_core_set_video_policy(marie->lc,&marie_policy);
|
linphone_core_set_video_policy(callee->lc,&callee_policy);
|
||||||
linphone_core_set_video_policy(pauline->lc,&pauline_policy);
|
linphone_core_set_video_policy(caller->lc,&caller_policy);
|
||||||
}
|
}
|
||||||
|
|
||||||
linphone_core_enable_video_display(marie->lc, callee_video_enabled);
|
linphone_core_enable_video_display(callee->lc, callee_video_enabled);
|
||||||
linphone_core_enable_video_capture(marie->lc, callee_video_enabled);
|
linphone_core_enable_video_capture(callee->lc, callee_video_enabled);
|
||||||
|
|
||||||
linphone_core_enable_video_display(pauline->lc, caller_video_enabled);
|
linphone_core_enable_video_display(caller->lc, caller_video_enabled);
|
||||||
linphone_core_enable_video_capture(pauline->lc, caller_video_enabled);
|
linphone_core_enable_video_capture(caller->lc, caller_video_enabled);
|
||||||
|
|
||||||
if (mode==LinphoneMediaEncryptionDTLS) { /* for DTLS we must access certificates or at least have a directory to store them */
|
if (mode==LinphoneMediaEncryptionDTLS) { /* for DTLS we must access certificates or at least have a directory to store them */
|
||||||
marie->lc->user_certificates_path = bc_tester_file("certificates-marie");
|
callee->lc->user_certificates_path = bc_tester_file("certificates-marie");
|
||||||
pauline->lc->user_certificates_path = bc_tester_file("certificates-pauline");
|
caller->lc->user_certificates_path = bc_tester_file("certificates-pauline");
|
||||||
belle_sip_mkdir(marie->lc->user_certificates_path);
|
belle_sip_mkdir(callee->lc->user_certificates_path);
|
||||||
belle_sip_mkdir(pauline->lc->user_certificates_path);
|
belle_sip_mkdir(caller->lc->user_certificates_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
linphone_core_set_media_encryption(marie->lc,mode);
|
linphone_core_set_media_encryption(callee->lc,mode);
|
||||||
linphone_core_set_media_encryption(pauline->lc,mode);
|
linphone_core_set_media_encryption(caller->lc,mode);
|
||||||
|
|
||||||
caller_test_params.base=linphone_core_create_call_params(pauline->lc, NULL);
|
caller_test_params.base=linphone_core_create_call_params(caller->lc, NULL);
|
||||||
if (!using_policy)
|
if (!using_policy)
|
||||||
linphone_call_params_enable_video(caller_test_params.base,TRUE);
|
linphone_call_params_enable_video(caller_test_params.base,TRUE);
|
||||||
|
|
||||||
if (!using_policy){
|
if (!using_policy){
|
||||||
callee_test_params.base=linphone_core_create_call_params(marie->lc, NULL);
|
callee_test_params.base=linphone_core_create_call_params(callee->lc, NULL);
|
||||||
linphone_call_params_enable_video(callee_test_params.base,TRUE);
|
linphone_call_params_enable_video(callee_test_params.base,TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
BC_ASSERT_TRUE(call_with_params2(pauline,marie,&caller_test_params,&callee_test_params,using_policy));
|
BC_ASSERT_TRUE(call_with_params2(caller,callee,&caller_test_params,&callee_test_params,using_policy));
|
||||||
marie_call=linphone_core_get_current_call(marie->lc);
|
callee_call=linphone_core_get_current_call(callee->lc);
|
||||||
pauline_call=linphone_core_get_current_call(pauline->lc);
|
caller_call=linphone_core_get_current_call(caller->lc);
|
||||||
|
|
||||||
linphone_call_params_destroy(caller_test_params.base);
|
linphone_call_params_destroy(caller_test_params.base);
|
||||||
if (callee_test_params.base) linphone_call_params_destroy(callee_test_params.base);
|
if (callee_test_params.base) linphone_call_params_destroy(callee_test_params.base);
|
||||||
|
|
||||||
if (marie_call && pauline_call ) {
|
if (callee_call && caller_call ) {
|
||||||
if (callee_video_enabled && caller_video_enabled) {
|
if (callee_video_enabled && caller_video_enabled) {
|
||||||
BC_ASSERT_TRUE(linphone_call_log_video_enabled(linphone_call_get_call_log(marie_call)));
|
BC_ASSERT_TRUE(linphone_call_log_video_enabled(linphone_call_get_call_log(callee_call)));
|
||||||
BC_ASSERT_TRUE(linphone_call_log_video_enabled(linphone_call_get_call_log(pauline_call)));
|
BC_ASSERT_TRUE(linphone_call_log_video_enabled(linphone_call_get_call_log(caller_call)));
|
||||||
|
|
||||||
/*check video path*/
|
/*check video path*/
|
||||||
linphone_call_set_next_video_frame_decoded_callback(marie_call,linphone_call_iframe_decoded_cb,marie->lc);
|
linphone_call_set_next_video_frame_decoded_callback(callee_call,linphone_call_iframe_decoded_cb,callee->lc);
|
||||||
linphone_call_send_vfu_request(marie_call);
|
linphone_call_send_vfu_request(callee_call);
|
||||||
BC_ASSERT_TRUE( wait_for(marie->lc,pauline->lc,&marie->stat.number_of_IframeDecoded,1));
|
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&callee->stat.number_of_IframeDecoded,1));
|
||||||
} else {
|
} else {
|
||||||
BC_ASSERT_FALSE(linphone_call_log_video_enabled(linphone_call_get_call_log(marie_call)));
|
BC_ASSERT_FALSE(linphone_call_log_video_enabled(linphone_call_get_call_log(callee_call)));
|
||||||
BC_ASSERT_FALSE(linphone_call_log_video_enabled(linphone_call_get_call_log(pauline_call)));
|
BC_ASSERT_FALSE(linphone_call_log_video_enabled(linphone_call_get_call_log(caller_call)));
|
||||||
}
|
}
|
||||||
liblinphone_tester_check_rtcp(marie,pauline);
|
liblinphone_tester_check_rtcp(callee,caller);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2108,7 +2108,6 @@ void video_call_base_3(LinphoneCoreManager* caller,LinphoneCoreManager* callee,
|
||||||
/* Create call params */
|
/* Create call params */
|
||||||
caller_test_params.base=linphone_core_create_call_params(caller->lc, NULL);
|
caller_test_params.base=linphone_core_create_call_params(caller->lc, NULL);
|
||||||
|
|
||||||
|
|
||||||
if (!using_policy)
|
if (!using_policy)
|
||||||
linphone_call_params_enable_video(caller_test_params.base,TRUE);
|
linphone_call_params_enable_video(caller_test_params.base,TRUE);
|
||||||
|
|
||||||
|
|
@ -2161,7 +2160,7 @@ static void video_call_disable_implicit_AVPF_on_callee(void) {
|
||||||
callee_lp = linphone_core_get_config(callee->lc);
|
callee_lp = linphone_core_get_config(callee->lc);
|
||||||
lp_config_set_int(callee_lp,"rtp","rtcp_fb_implicit_rtcp_fb",0);
|
lp_config_set_int(callee_lp,"rtp","rtcp_fb_implicit_rtcp_fb",0);
|
||||||
|
|
||||||
video_call_base_3(caller,callee,FALSE,LinphoneMediaEncryptionNone,TRUE,TRUE);
|
video_call_base_3(caller,callee,TRUE,LinphoneMediaEncryptionNone,TRUE,TRUE);
|
||||||
params = linphone_call_get_current_params(linphone_core_get_current_call(callee->lc));
|
params = linphone_call_get_current_params(linphone_core_get_current_call(callee->lc));
|
||||||
BC_ASSERT_STRING_EQUAL(linphone_call_params_get_rtp_profile(params), "RTP/AVP");
|
BC_ASSERT_STRING_EQUAL(linphone_call_params_get_rtp_profile(params), "RTP/AVP");
|
||||||
params2 =linphone_call_get_current_params(linphone_core_get_current_call(caller->lc));
|
params2 =linphone_call_get_current_params(linphone_core_get_current_call(caller->lc));
|
||||||
|
|
@ -2182,7 +2181,7 @@ static void video_call_disable_implicit_AVPF_on_caller(void) {
|
||||||
caller_lp = linphone_core_get_config(caller->lc);
|
caller_lp = linphone_core_get_config(caller->lc);
|
||||||
lp_config_set_int(caller_lp,"rtp","rtcp_fb_implicit_rtcp_fb",0);
|
lp_config_set_int(caller_lp,"rtp","rtcp_fb_implicit_rtcp_fb",0);
|
||||||
|
|
||||||
video_call_base_3(caller,callee,FALSE,LinphoneMediaEncryptionNone,TRUE,TRUE);
|
video_call_base_3(caller,callee,TRUE,LinphoneMediaEncryptionNone,TRUE,TRUE);
|
||||||
params = linphone_call_get_current_params(linphone_core_get_current_call(callee->lc));
|
params = linphone_call_get_current_params(linphone_core_get_current_call(callee->lc));
|
||||||
BC_ASSERT_STRING_EQUAL(linphone_call_params_get_rtp_profile(params), "RTP/AVP");
|
BC_ASSERT_STRING_EQUAL(linphone_call_params_get_rtp_profile(params), "RTP/AVP");
|
||||||
params2 =linphone_call_get_current_params(linphone_core_get_current_call(caller->lc));
|
params2 =linphone_call_get_current_params(linphone_core_get_current_call(caller->lc));
|
||||||
|
|
@ -2221,12 +2220,21 @@ static void video_call_implicit_AVPF_to_AVPF(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void video_call_using_policy_AVPF_implicit_caller_and_callee(void) {
|
||||||
|
LinphoneCoreManager* callee = linphone_core_manager_new("marie_rc");
|
||||||
|
LinphoneCoreManager* caller = linphone_core_manager_new(transport_supported(LinphoneTransportTcp) ? "pauline_rc" : "pauline_tcp_rc");
|
||||||
|
video_call_base_3(caller,callee,FALSE,LinphoneMediaEncryptionNone,TRUE,TRUE);
|
||||||
|
end_call(caller, callee);
|
||||||
|
linphone_core_manager_destroy(callee);
|
||||||
|
linphone_core_manager_destroy(caller);
|
||||||
|
}
|
||||||
static void video_call_base_avpf(LinphoneCoreManager* pauline,LinphoneCoreManager* marie, bool_t using_policy,LinphoneMediaEncryption mode, bool_t callee_video_enabled, bool_t caller_video_enabled) {
|
static void video_call_base_avpf(LinphoneCoreManager* pauline,LinphoneCoreManager* marie, bool_t using_policy,LinphoneMediaEncryption mode, bool_t callee_video_enabled, bool_t caller_video_enabled) {
|
||||||
linphone_core_set_avpf_mode(pauline->lc,LinphoneAVPFEnabled);
|
linphone_core_set_avpf_mode(pauline->lc,LinphoneAVPFEnabled);
|
||||||
linphone_core_set_avpf_mode(marie->lc,LinphoneAVPFEnabled);
|
linphone_core_set_avpf_mode(marie->lc,LinphoneAVPFEnabled);
|
||||||
video_call_base_3(pauline,marie,using_policy,mode,callee_video_enabled,caller_video_enabled);
|
video_call_base_3(pauline,marie,using_policy,mode,callee_video_enabled,caller_video_enabled);
|
||||||
end_call(pauline, marie);
|
end_call(pauline, marie);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void video_call_avpf(void) {
|
static void video_call_avpf(void) {
|
||||||
LinphoneCoreManager* pauline = linphone_core_manager_new("pauline_rc");
|
LinphoneCoreManager* pauline = linphone_core_manager_new("pauline_rc");
|
||||||
LinphoneCoreManager* marie = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "marie_rc" : "marie_tcp_rc");
|
LinphoneCoreManager* marie = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "marie_rc" : "marie_tcp_rc");
|
||||||
|
|
@ -2260,10 +2268,12 @@ static void video_call_dtls(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void video_call_using_policy(void) {
|
static void video_call_using_policy(void) {
|
||||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTcp) ? "pauline_rc" : "pauline_tcp_rc");
|
||||||
video_call_base(marie,pauline,TRUE,LinphoneMediaEncryptionNone,TRUE,TRUE);
|
video_call_base(pauline,marie,TRUE,LinphoneMediaEncryptionNone,TRUE,TRUE);
|
||||||
linphone_core_manager_destroy(marie);
|
linphone_core_manager_destroy(marie);
|
||||||
linphone_core_manager_destroy(pauline);
|
linphone_core_manager_destroy(pauline);
|
||||||
}
|
}
|
||||||
|
|
@ -2820,14 +2830,6 @@ end:
|
||||||
ms_free(hellopath);
|
ms_free(hellopath);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool_t is_format_supported(LinphoneCore *lc, const char *fmt){
|
|
||||||
const char **formats=linphone_core_get_supported_file_formats(lc);
|
|
||||||
for(;*formats!=NULL;++formats){
|
|
||||||
if (strcasecmp(*formats,fmt)==0) return TRUE;
|
|
||||||
}
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void call_with_mkv_file_player(void) {
|
static void call_with_mkv_file_player(void) {
|
||||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||||
|
|
@ -2844,7 +2846,7 @@ static void call_with_mkv_file_player(void) {
|
||||||
hellowav = bc_tester_res("sounds/hello8000_mkv_ref.wav");
|
hellowav = bc_tester_res("sounds/hello8000_mkv_ref.wav");
|
||||||
hellomkv = bc_tester_res("sounds/hello8000.mkv");
|
hellomkv = bc_tester_res("sounds/hello8000.mkv");
|
||||||
|
|
||||||
if (!is_format_supported(marie->lc,"mkv")){
|
if (!linphone_core_file_format_supported(marie->lc,"mkv")){
|
||||||
ms_warning("Test skipped, no mkv support.");
|
ms_warning("Test skipped, no mkv support.");
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
@ -4675,6 +4677,8 @@ static void simple_stereo_call(const char *codec_name, int clock_rate, int bitra
|
||||||
char *recordpath = bc_tester_file("stereo-record.wav");
|
char *recordpath = bc_tester_file("stereo-record.wav");
|
||||||
bool_t audio_cmp_failed = FALSE;
|
bool_t audio_cmp_failed = FALSE;
|
||||||
|
|
||||||
|
unlink(recordpath);
|
||||||
|
|
||||||
marie = linphone_core_manager_new( "marie_rc");
|
marie = linphone_core_manager_new( "marie_rc");
|
||||||
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||||
|
|
||||||
|
|
@ -4699,8 +4703,8 @@ static void simple_stereo_call(const char *codec_name, int clock_rate, int bitra
|
||||||
linphone_core_set_record_file(pauline->lc, recordpath);
|
linphone_core_set_record_file(pauline->lc, recordpath);
|
||||||
|
|
||||||
/*stereo is supported only without volume control, echo canceller...*/
|
/*stereo is supported only without volume control, echo canceller...*/
|
||||||
lp_config_set_string(marie->lc->config,"sound","features","NONE");
|
lp_config_set_string(marie->lc->config,"sound","features","REMOTE_PLAYING");
|
||||||
lp_config_set_string(pauline->lc->config,"sound","features","NONE");
|
lp_config_set_string(pauline->lc->config,"sound","features","REMOTE_PLAYING");
|
||||||
|
|
||||||
if (!BC_ASSERT_TRUE(call(pauline,marie))) goto end;
|
if (!BC_ASSERT_TRUE(call(pauline,marie))) goto end;
|
||||||
wait_for_until(marie->lc, pauline->lc, NULL, 0, 6000);
|
wait_for_until(marie->lc, pauline->lc, NULL, 0, 6000);
|
||||||
|
|
@ -5780,6 +5784,7 @@ test_t call_tests[] = {
|
||||||
{ "Audio call with ICE no matching audio codecs", audio_call_with_ice_no_matching_audio_codecs },
|
{ "Audio call with ICE no matching audio codecs", audio_call_with_ice_no_matching_audio_codecs },
|
||||||
#ifdef VIDEO_ENABLED
|
#ifdef VIDEO_ENABLED
|
||||||
{ "Simple video call AVPF",video_call_avpf},
|
{ "Simple video call AVPF",video_call_avpf},
|
||||||
|
{ "Simple video call implicit AVPF both", video_call_using_policy_AVPF_implicit_caller_and_callee},
|
||||||
{ "Simple video call disable implicit AVPF on callee",video_call_disable_implicit_AVPF_on_callee},
|
{ "Simple video call disable implicit AVPF on callee",video_call_disable_implicit_AVPF_on_callee},
|
||||||
{ "Simple video call disable implicit AVPF on caller",video_call_disable_implicit_AVPF_on_caller},
|
{ "Simple video call disable implicit AVPF on caller",video_call_disable_implicit_AVPF_on_caller},
|
||||||
{ "Simple video call AVPF to implicit AVPF",video_call_AVPF_to_implicit_AVPF},
|
{ "Simple video call AVPF to implicit AVPF",video_call_AVPF_to_implicit_AVPF},
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,6 @@
|
||||||
#include "lpconfig.h"
|
#include "lpconfig.h"
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#define popen _popen
|
|
||||||
#define pclose _pclose
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void check_rtcp(LinphoneCall *call) {
|
void check_rtcp(LinphoneCall *call) {
|
||||||
MSTimeSpec ts;
|
MSTimeSpec ts;
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,11 @@ static void message_forking(void) {
|
||||||
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneMessageReceived,1,3000));
|
BC_ASSERT_TRUE(wait_for_list(lcs,&marie->stat.number_of_LinphoneMessageReceived,1,3000));
|
||||||
BC_ASSERT_TRUE(wait_for_list(lcs,&marie2->stat.number_of_LinphoneMessageReceived,1,1000));
|
BC_ASSERT_TRUE(wait_for_list(lcs,&marie2->stat.number_of_LinphoneMessageReceived,1,1000));
|
||||||
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneMessageDelivered,1,1000));
|
BC_ASSERT_TRUE(wait_for_list(lcs,&pauline->stat.number_of_LinphoneMessageDelivered,1,1000));
|
||||||
|
|
||||||
|
/*wait a bit that 200Ok for MESSAGE are sent to server before shuting down the cores, because otherwise Flexisip will consider the messages
|
||||||
|
* as not delivered and will expedite them in the next test, after receiving the REGISTER from marie's instances*/
|
||||||
|
wait_for_list(lcs, NULL, 0, 2000);
|
||||||
|
|
||||||
BC_ASSERT_EQUAL(pauline->stat.number_of_LinphoneMessageInProgress,1, int, "%d");
|
BC_ASSERT_EQUAL(pauline->stat.number_of_LinphoneMessageInProgress,1, int, "%d");
|
||||||
linphone_core_manager_destroy(marie);
|
linphone_core_manager_destroy(marie);
|
||||||
linphone_core_manager_destroy(marie2);
|
linphone_core_manager_destroy(marie2);
|
||||||
|
|
@ -93,6 +98,13 @@ static void message_forking_with_unreachable_recipients(void) {
|
||||||
lcs=ms_list_append(lcs,marie2->lc);
|
lcs=ms_list_append(lcs,marie2->lc);
|
||||||
lcs=ms_list_append(lcs,marie3->lc);
|
lcs=ms_list_append(lcs,marie3->lc);
|
||||||
|
|
||||||
|
/*the following lines are to workaround a problem with messages sent by a previous test (Message forking) that arrive together with REGISTER responses,
|
||||||
|
* because the ForkMessageContext is not terminated at flexisip side if Message forking test is passing fast*/
|
||||||
|
wait_for_list(lcs,NULL,0,1000);
|
||||||
|
marie->stat.number_of_LinphoneMessageReceived = 0;
|
||||||
|
marie2->stat.number_of_LinphoneMessageReceived = 0;
|
||||||
|
marie3->stat.number_of_LinphoneMessageReceived = 0;
|
||||||
|
|
||||||
/*marie2 and marie3 go offline*/
|
/*marie2 and marie3 go offline*/
|
||||||
linphone_core_set_network_reachable(marie2->lc,FALSE);
|
linphone_core_set_network_reachable(marie2->lc,FALSE);
|
||||||
linphone_core_set_network_reachable(marie3->lc,FALSE);
|
linphone_core_set_network_reachable(marie3->lc,FALSE);
|
||||||
|
|
@ -134,6 +146,14 @@ static void message_forking_with_all_recipients_unreachable(void) {
|
||||||
lcs=ms_list_append(lcs,marie2->lc);
|
lcs=ms_list_append(lcs,marie2->lc);
|
||||||
lcs=ms_list_append(lcs,marie3->lc);
|
lcs=ms_list_append(lcs,marie3->lc);
|
||||||
|
|
||||||
|
/*the following lines are to workaround a problem with messages sent by a previous test (Message forking) that arrive together with REGISTER responses,
|
||||||
|
* because the ForkMessageContext is not terminated at flexisip side if Message forking test is passing fast*/
|
||||||
|
wait_for_list(lcs,NULL,0,1000);
|
||||||
|
marie->stat.number_of_LinphoneMessageReceived = 0;
|
||||||
|
marie2->stat.number_of_LinphoneMessageReceived = 0;
|
||||||
|
marie3->stat.number_of_LinphoneMessageReceived = 0;
|
||||||
|
|
||||||
|
|
||||||
/*All marie's device go offline*/
|
/*All marie's device go offline*/
|
||||||
linphone_core_set_network_reachable(marie->lc,FALSE);
|
linphone_core_set_network_reachable(marie->lc,FALSE);
|
||||||
linphone_core_set_network_reachable(marie2->lc,FALSE);
|
linphone_core_set_network_reachable(marie2->lc,FALSE);
|
||||||
|
|
@ -909,7 +929,7 @@ static void test_subscribe_notify_with_sipp_publisher(void) {
|
||||||
|
|
||||||
sipp_out = sip_start(scen, linphone_address_get_username(marie->identity), marie->identity);
|
sipp_out = sip_start(scen, linphone_address_get_username(marie->identity), marie->identity);
|
||||||
|
|
||||||
if (TRUE/*sipp_out*/) {
|
if (sipp_out) {
|
||||||
/*wait for marie status*/
|
/*wait for marie status*/
|
||||||
wait_for_until(pauline->lc,pauline->lc,&pauline->stat.number_of_NotifyReceived,2,3000);
|
wait_for_until(pauline->lc,pauline->lc,&pauline->stat.number_of_NotifyReceived,2,3000);
|
||||||
BC_ASSERT_EQUAL(LinphoneStatusOnline,linphone_friend_get_status(lf), int, "%d");
|
BC_ASSERT_EQUAL(LinphoneStatusOnline,linphone_friend_get_status(lf), int, "%d");
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,12 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#define popen _popen
|
||||||
|
#define pclose _pclose
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue