forked from mirrors/linphone-iphone
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
|
||||
*.log
|
||||
.bc_tester_utils.tmp
|
||||
tools/lp-test-ecc
|
||||
|
|
|
|||
|
|
@ -24,7 +24,8 @@ common_SRC_FILES := \
|
|||
tunnel_tester.c \
|
||||
upnp_tester.c \
|
||||
multicast_call_tester.c \
|
||||
vcard_tester.c
|
||||
vcard_tester.c \
|
||||
complex_sip_call_tester.c \
|
||||
|
||||
common_C_INCLUDES += \
|
||||
$(LOCAL_PATH) \
|
||||
|
|
|
|||
|
|
@ -187,12 +187,12 @@
|
|||
${project}/../../gtk/gtkrc.mac
|
||||
</data>
|
||||
|
||||
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/rings/oldphone.wav">
|
||||
${prefix:linphone}/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-mono.wav
|
||||
</data>
|
||||
|
||||
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/rings/toy-mono.wav">
|
||||
${prefix:linphone}/share/sounds/linphone/rings/toy-mono.wav
|
||||
<data dest="${bundle}/Contents/Resources/share/sounds/linphone/toy-mono.wav">
|
||||
${prefix:linphone}/share/sounds/linphone/toy-mono.wav
|
||||
</data>
|
||||
|
||||
<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
|
||||
AC_PROG_CXX(["xcrun clang++" g++])
|
||||
AC_PROG_CC(["xcrun clang" gcc])
|
||||
AC_PROG_OBJC(["xcrun clang" gcc])
|
||||
|
||||
gl_LD_OUTPUT_DEF
|
||||
|
||||
|
|
@ -595,6 +596,8 @@ AC_ARG_WITH(ffmpeg,
|
|||
[ ffmpegdir=/usr ]
|
||||
)
|
||||
|
||||
AM_CONDITIONAL([BUILD_MACOS], [test "x$build_macos" = "xyes"])
|
||||
|
||||
if test "$video" = "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);
|
||||
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 (!cacheString){
|
||||
ms_warning("Unable to load content of ZRTP ZID cache to decrypt message");
|
||||
goto error;
|
||||
}
|
||||
cacheString[cacheSize] = '\0';
|
||||
cacheSize += 1;
|
||||
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;
|
||||
|
||||
if (content_type){
|
||||
|
||||
/* check if we have a xml/cipher message to be decrypted */
|
||||
if ((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 {
|
||||
/* 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");
|
||||
size_t cacheSize;
|
||||
char *cacheString;
|
||||
int retval;
|
||||
xmlDocPtr cacheXml;
|
||||
|
||||
cacheString=ms_load_file_content(CACHEFD, &cacheSize);
|
||||
if (!cacheString){
|
||||
ms_warning("Unable to load content of ZRTP ZID cache to decrypt message");
|
||||
goto error;
|
||||
}
|
||||
xmlFree(xmlStringOutput);
|
||||
cacheString[cacheSize] = '\0';
|
||||
cacheSize += 1;
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rcs_filetransfer=is_rcs_filetransfer(content_type);
|
||||
if (content_type && ((plain_text=is_plain_text(content_type))
|
||||
|| (external_body=is_external_body(content_type))
|
||||
|| (decryptedMessage!=NULL)
|
||||
|| rcs_filetransfer)) {
|
||||
SalMessage salmsg;
|
||||
char message_id[256]={0};
|
||||
external_body=is_external_body(content_type);
|
||||
plain_text=is_plain_text(content_type);
|
||||
rcs_filetransfer = is_rcs_filetransfer(content_type);
|
||||
|
||||
if (op->pending_server_trans) belle_sip_object_unref(op->pending_server_trans);
|
||||
op->pending_server_trans=server_transaction;
|
||||
belle_sip_object_ref(op->pending_server_trans);
|
||||
|
||||
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));
|
||||
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);
|
||||
if (external_body || plain_text || rcs_filetransfer || decryptedMessage!=NULL) {
|
||||
SalMessage salmsg;
|
||||
char message_id[256]={0};
|
||||
|
||||
if (op->pending_server_trans) belle_sip_object_unref(op->pending_server_trans);
|
||||
op->pending_server_trans=server_transaction;
|
||||
belle_sip_object_ref(op->pending_server_trans);
|
||||
|
||||
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));
|
||||
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);
|
||||
|
||||
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;
|
||||
free(decryptedMessage);
|
||||
belle_sip_object_unref(address);
|
||||
belle_sip_free(from);
|
||||
if (salmsg.url) ms_free((char*)salmsg.url);
|
||||
} else if (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)");
|
||||
errcode = 415;
|
||||
goto error;
|
||||
}
|
||||
}else {
|
||||
ms_error("Unsupported MESSAGE (no Content-Type)");
|
||||
goto error;
|
||||
}
|
||||
return;
|
||||
error:
|
||||
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);
|
||||
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;
|
||||
time_t curtime=time(NULL);
|
||||
uint8_t *multipartEncryptedMessage = NULL;
|
||||
const char *body;
|
||||
int retval;
|
||||
|
||||
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_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_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);
|
||||
free(multipartEncryptedMessage);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
/*
|
||||
linphone
|
||||
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;
|
||||
|
||||
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);
|
||||
}
|
||||
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);
|
||||
|
||||
/* 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);
|
||||
}
|
||||
|
||||
|
|
@ -629,14 +630,15 @@ static void apply_rtcp_fb_attribute_to_payload(belle_sdp_rtcp_fb_attribute_t *fb
|
|||
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_sdp_attribute_t *attribute;
|
||||
belle_sdp_rtcp_fb_attribute_t *fb_attribute;
|
||||
MSList *pt_it;
|
||||
PayloadType *pt;
|
||||
int8_t pt_num;
|
||||
|
||||
bool_t retval = FALSE;
|
||||
|
||||
/* Handle rtcp-fb attributes that concern all payload types. */
|
||||
for (it = belle_sdp_media_description_get_attributes(media_desc); it != NULL; it = it->next) {
|
||||
attribute = BELLE_SDP_ATTRIBUTE(it->data);
|
||||
|
|
@ -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) {
|
||||
pt = (PayloadType *)pt_it->data;
|
||||
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);
|
||||
for (pt_it = stream->payloads; pt_it != NULL; pt_it = pt_it->next) {
|
||||
pt = (PayloadType *)pt_it->data;
|
||||
retval = TRUE;
|
||||
if (payload_type_get_number(pt) == (int)pt_num) {
|
||||
apply_rtcp_fb_attribute_to_payload(fb_attribute, stream, pt);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
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;
|
||||
const char* value;
|
||||
const char *mtype,*proto;
|
||||
bool_t has_avpf_attributes;
|
||||
|
||||
stream=&md->streams[md->nb_streams];
|
||||
media=belle_sdp_media_description_get_media ( media_desc );
|
||||
|
|
@ -830,12 +836,17 @@ static SalStreamDescription * sdp_to_stream_description(SalMediaDescription *md,
|
|||
|
||||
/* Get ICE candidate attributes if any */
|
||||
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 */
|
||||
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);
|
||||
sdp_parse_rtcp_fb_parameters(media_desc, stream);
|
||||
}
|
||||
else if (has_avpf_attributes ){
|
||||
|
||||
stream->implicit_rtcp_fb = TRUE;
|
||||
}
|
||||
|
||||
/* Get RTCP-XR attributes if any */
|
||||
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){
|
||||
return lf->lc!=NULL;
|
||||
return lf->in_list;
|
||||
}
|
||||
|
||||
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) {
|
||||
ms_return_if_fail(fr);
|
||||
if (!fr->lc) return;
|
||||
if (!fr->lc || !fr->in_list) return;
|
||||
linphone_friend_apply(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);
|
||||
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);
|
||||
else lf->commit = TRUE;
|
||||
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) {
|
||||
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) {
|
||||
char *tmp = NULL;
|
||||
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);
|
||||
if (tmp) ms_free(tmp);
|
||||
} else {
|
||||
lf->in_list = TRUE;
|
||||
return linphone_friend_list_import_friend(list, lf);
|
||||
}
|
||||
return LinphoneFriendListOK;
|
||||
|
|
@ -318,7 +322,8 @@ LinphoneFriendListStatus linphone_friend_list_remove_friend(LinphoneFriendList *
|
|||
linphone_core_remove_friend_from_db(lf->lc, lf);
|
||||
#endif
|
||||
|
||||
linphone_friend_unref((LinphoneFriend *)elem->data);
|
||||
lf->in_list = FALSE;
|
||||
linphone_friend_unref(lf);
|
||||
list->friends = ms_list_remove_link(list->friends, elem);
|
||||
return LinphoneFriendListOK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#define LINPHONE_FRIENDLIST_H_
|
||||
|
||||
|
||||
#ifdef IN_LINPHONE
|
||||
#include "linphonefriend.h"
|
||||
#include "linphonepresence.h"
|
||||
#else
|
||||
#include "linphone/linphonefriend.h"
|
||||
#include "linphone/linphonepresence.h"
|
||||
#endif
|
||||
|
||||
|
||||
#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
|
||||
This program just send chat message in real time to dest uri. Use realtimetext_receiver to receive message.
|
||||
usage: ./realtimetext_sender sip:localhost:5060
|
||||
|
|
|
|||
|
|
@ -1452,6 +1452,7 @@ void linphone_call_fix_call_parameters(LinphoneCall *call, SalMediaDescription *
|
|||
if (rmd) {
|
||||
linphone_call_compute_streams_indexes(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);
|
||||
if (rcp){
|
||||
|
|
@ -1767,9 +1768,8 @@ const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call){
|
|||
break;
|
||||
case 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);
|
||||
if (call->current_params->avpf_enabled == TRUE) {
|
||||
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;
|
||||
|
||||
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;
|
||||
if (call->current_params->audio_dir != LinphoneMediaDirectionInactive) {
|
||||
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;
|
||||
|
||||
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;
|
||||
if (call->current_params->video_dir != LinphoneMediaDirectionInactive) {
|
||||
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
|
||||
call->current_params->video_multicast_enabled = FALSE;
|
||||
|
||||
sd=sal_media_description_find_best_stream(md,SalText);
|
||||
|
||||
|
||||
}
|
||||
|
||||
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) {
|
||||
#ifdef VIDEO_ENABLED
|
||||
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);
|
||||
video_stream_send_fir(call->videostream);
|
||||
} 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))
|
||||
sal_call_send_vfu_request(call->op);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -116,11 +116,13 @@ static void toggle_video_preview(LinphoneCore *lc, bool_t val);
|
|||
#define SOUNDS_PREFIX
|
||||
#endif
|
||||
/* 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)*/
|
||||
#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;
|
||||
|
||||
|
|
@ -815,6 +817,20 @@ static void build_sound_devices_table(LinphoneCore *lc){
|
|||
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)
|
||||
{
|
||||
int tmp;
|
||||
|
|
@ -870,15 +886,11 @@ static void sound_config_read(LinphoneCore *lc)
|
|||
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);
|
||||
if (ortp_file_exist(tmpbuf)==-1) {
|
||||
ms_warning("%s does not exist",tmpbuf);
|
||||
tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
|
||||
}
|
||||
if (strstr(tmpbuf,".wav")==NULL){
|
||||
/* it currently uses old sound files, so replace them */
|
||||
tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING;
|
||||
tmpbuf = get_default_local_ring(lc);
|
||||
}
|
||||
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_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;
|
||||
#ifndef __ios
|
||||
tmp=TRUE;
|
||||
|
|
|
|||
|
|
@ -140,12 +140,10 @@ enum _LinphoneStreamType {
|
|||
**/
|
||||
typedef enum _LinphoneStreamType LinphoneStreamType;
|
||||
/**
|
||||
* Function returning a humain readable value for LinphoneStreamType.
|
||||
* @param LinphoneStreamType
|
||||
* @returns
|
||||
* Function returning a human readable value for LinphoneStreamType.
|
||||
* @ingroup initializing
|
||||
**/
|
||||
|
||||
|
||||
LINPHONE_PUBLIC const char *linphone_stream_type_to_string(const LinphoneStreamType);
|
||||
/**
|
||||
* Object that represents a SIP address.
|
||||
|
|
@ -1065,7 +1063,7 @@ LINPHONE_PUBLIC const char *linphone_registration_state_to_string(LinphoneRegist
|
|||
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.
|
||||
* Username, userid, password, realm and domain can be set later using specific methods.
|
||||
* 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 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.
|
||||
* @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().
|
||||
**/
|
||||
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
|
||||
* Instantiates a new auth info with values from source.
|
||||
* @param[in] source The #LinphoneAuthInfo object to be cloned
|
||||
* @return The newly created #LinphoneAuthInfo object.
|
||||
* @param[in] source The #_LinphoneAuthInfo object to be cloned
|
||||
* @return The newly created #_LinphoneAuthInfo object.
|
||||
*/
|
||||
LINPHONE_PUBLIC LinphoneAuthInfo *linphone_auth_info_clone(const LinphoneAuthInfo* source);
|
||||
|
||||
/**
|
||||
* Sets the password.
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @param[in] passwd The password.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_auth_info_set_passwd(LinphoneAuthInfo *info, const char *passwd);
|
||||
|
||||
/**
|
||||
* Sets the username.
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @param[in] username The username.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_auth_info_set_username(LinphoneAuthInfo *info, const char *username);
|
||||
|
||||
/**
|
||||
* Sets the userid.
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @param[in] userid The userid.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_auth_info_set_userid(LinphoneAuthInfo *info, const char *userid);
|
||||
|
||||
/**
|
||||
* Sets the realm.
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @param[in] realm The realm.
|
||||
**/
|
||||
LINPHONE_PUBLIC void linphone_auth_info_set_realm(LinphoneAuthInfo *info, const char *realm);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* 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.
|
||||
|
|
@ -1128,7 +1126,7 @@ LINPHONE_PUBLIC void linphone_auth_info_set_domain(LinphoneAuthInfo *info, const
|
|||
|
||||
/**
|
||||
* Sets the ha1.
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @param[in] ha1 The 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.
|
||||
*
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @return The username.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @return The password.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @return The userid.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @return The realm.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @return The domain.
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param[in] info The #LinphoneAuthInfo object
|
||||
* @param[in] info The #_LinphoneAuthInfo object
|
||||
* @return The ha1.
|
||||
*/
|
||||
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
|
||||
#include "account_creator.h"
|
||||
#include "friendlist.h"
|
||||
#else
|
||||
#include "linphone/account_creator.h"
|
||||
#include "linphone/friendlist.h"
|
||||
#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);
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
/**
|
||||
* Send a message to peer member of this chat room.
|
||||
* @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
|
||||
* @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);
|
||||
/** @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.
|
||||
**/
|
||||
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);
|
||||
/**
|
||||
* 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);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
|
@ -2122,7 +2122,7 @@ LINPHONE_PUBLIC LinphoneCoreVTable *linphone_core_get_current_vtable(LinphoneCor
|
|||
|
||||
/**
|
||||
* Destroy a vtable.
|
||||
* @param vtable to be destroyed
|
||||
* @param table to be destroyed
|
||||
*/
|
||||
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);
|
||||
|
||||
/**
|
||||
* @return liblinphone's user agent as a string.
|
||||
**/
|
||||
LINPHONE_PUBLIC const char *linphone_core_get_user_agent(LinphoneCore *lc);
|
||||
/**
|
||||
* @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
|
||||
**/
|
||||
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.
|
||||
|
|
@ -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.
|
||||
* @param vtable a LinphoneCoreVTable structure holding your application callbacks. Object is owned by linphone core until linphone_core_remove_listener.
|
||||
* @param lc object
|
||||
* @param string identifying the device, can be EMEI or UDID
|
||||
*
|
||||
*/
|
||||
LINPHONE_PUBLIC void linphone_core_add_listener(LinphoneCore *lc, LinphoneCoreVTable *vtable);
|
||||
/**
|
||||
* @ingroup initializing
|
||||
* remove a listener registred by linphone_core_add_listener.
|
||||
* @param vtable a LinphoneCoreVTable structure holding your application callbacks
|
||||
* @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);
|
||||
|
|
@ -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] 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.
|
||||
* @return #LinphoneAuthInfo with default values set
|
||||
* @return #_LinphoneAuthInfo with default values set
|
||||
* @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);
|
||||
|
|
@ -2913,7 +2915,7 @@ LINPHONE_PUBLIC const MSList *linphone_core_get_auth_info_list(const LinphoneCor
|
|||
* @param realm the authentication 'realm' (optional)
|
||||
* @param username the SIP username to be authenticated (mandatory)
|
||||
* @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);
|
||||
|
||||
|
|
@ -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);
|
||||
|
||||
/**
|
||||
* 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_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);
|
||||
/**
|
||||
* Use to set multicast address to be used for video stream.
|
||||
* @param core #LinphoneCore
|
||||
* @param lc #LinphoneCore
|
||||
* @param ip an ipv4/6 multicast address
|
||||
* @return 0 in case of success
|
||||
* @ingroup media_parameters
|
||||
|
|
|
|||
|
|
@ -3114,6 +3114,17 @@ extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_setRLSUri(JNIEnv*
|
|||
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
|
||||
,jobject thiz
|
||||
,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) {
|
||||
LinphoneContent content = {0};
|
||||
LinphoneCore *lc = linphone_chat_room_get_core((LinphoneChatRoom*) ptr);
|
||||
LinphoneContent * content = linphone_core_create_content(lc);
|
||||
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;
|
||||
}
|
||||
|
|
@ -4756,6 +4782,34 @@ extern "C" jstring Java_org_linphone_core_LinphoneCoreImpl_getUpnpExternalIpaddr
|
|||
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
|
||||
|
|
@ -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){
|
||||
LinphoneCore *lc=(LinphoneCore*)coreptr;
|
||||
LinphoneAddress *addr=(LinphoneAddress*)addrptr;
|
||||
LinphoneContent content={0};
|
||||
LinphoneContent * content = create_content_from_java_args(env, (LinphoneCore*)coreptr, jtype, jsubtype, jdata, jencoding, NULL);
|
||||
LinphoneEvent *ev;
|
||||
jobject jev=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){
|
||||
env->ReleaseByteArrayElements(jdata,(jbyte*)linphone_content_get_user_data(&content),JNI_ABORT);
|
||||
}
|
||||
|
||||
ev=linphone_core_subscribe(lc,addr,evname,expires, content);
|
||||
if (content) linphone_content_unref(content);
|
||||
env->ReleaseStringUTFChars(jevname,evname);
|
||||
if (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){
|
||||
LinphoneCore *lc=(LinphoneCore*)coreptr;
|
||||
LinphoneAddress *addr=(LinphoneAddress*)addrptr;
|
||||
LinphoneContent content={0};
|
||||
LinphoneContent * content = create_content_from_java_args(env, (LinphoneCore*)coreptr, jtype, jsubtype, jdata, jencoding, NULL);
|
||||
LinphoneEvent *ev;
|
||||
jobject jev=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){
|
||||
env->ReleaseByteArrayElements(jdata,(jbyte*)linphone_content_get_user_data(&content),JNI_ABORT);
|
||||
|
||||
}
|
||||
ev=linphone_core_publish(lc,addr,evname,expires, content);
|
||||
if (content) linphone_content_unref(content);
|
||||
env->ReleaseStringUTFChars(jevname,evname);
|
||||
if (ev){
|
||||
jev=getEvent(env,ev);
|
||||
|
|
@ -4943,24 +4992,35 @@ static jobject create_java_linphone_content(JNIEnv *env, const LinphoneContent *
|
|||
jstring jtype, jsubtype, jencoding, jname;
|
||||
jbyteArray jdata = NULL;
|
||||
jint jsize = 0;
|
||||
const char *tmp;
|
||||
void *data;
|
||||
|
||||
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");
|
||||
|
||||
jtype = env->NewStringUTF(linphone_content_get_type(icontent));
|
||||
jsubtype = env->NewStringUTF(linphone_content_get_subtype(icontent));
|
||||
jencoding = linphone_content_get_encoding(icontent) ? env->NewStringUTF(linphone_content_get_encoding(icontent)) : NULL;
|
||||
jname = linphone_content_get_name(icontent) ? env->NewStringUTF(linphone_content_get_name(icontent)) : NULL;
|
||||
jencoding = ((tmp = linphone_content_get_encoding(icontent))) ? env->NewStringUTF(tmp) : NULL;
|
||||
jname = ((tmp = linphone_content_get_name(icontent))) ? env->NewStringUTF(tmp) : NULL;
|
||||
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));
|
||||
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);
|
||||
|
||||
env->DeleteLocalRef(contentClass);
|
||||
env->DeleteLocalRef(jtype);
|
||||
env->DeleteLocalRef(jsubtype);
|
||||
if (jencoding) {
|
||||
env->DeleteLocalRef(jencoding);
|
||||
}
|
||||
if (jname) {
|
||||
env->DeleteLocalRef(jname);
|
||||
}
|
||||
|
||||
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
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_org_linphone_core_LinphoneInfoMessageImpl_setContent(JNIEnv *env, jobject jobj, jlong infoptr, jstring jtype, jstring jsubtype, jstring jdata){
|
||||
LinphoneContent content={0};
|
||||
|
||||
linphone_info_message_set_content((LinphoneInfoMessage*)infoptr,&content);
|
||||
LinphoneInfoMessage *infomsg = (LinphoneInfoMessage*) infoptr;
|
||||
LinphoneContent * content = linphone_content_new();
|
||||
const char *tmp;
|
||||
|
||||
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
|
||||
*/
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -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
|
||||
*/
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
@ -5163,12 +5241,14 @@ JNIEXPORT jint JNICALL Java_org_linphone_core_LinphoneEventImpl_updateSubscribe(
|
|||
* 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){
|
||||
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;
|
||||
jint err;
|
||||
|
||||
err=linphone_event_update_publish(ev, content);
|
||||
|
||||
err=linphone_event_update_publish(ev,linphone_content_get_type(&content) ? &content : NULL);
|
||||
|
||||
if (content) linphone_content_unref(content);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -5233,9 +5313,12 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_createSubscrib
|
|||
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) {
|
||||
LinphoneContent content = {0};
|
||||
linphone_event_send_subscribe((LinphoneEvent*) jevent, linphone_content_get_type(&content)? &content : NULL);
|
||||
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 = create_content_from_java_args(env, linphone_event_get_core((LinphoneEvent*)eventptr),
|
||||
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) {
|
||||
|
|
@ -5253,11 +5336,11 @@ JNIEXPORT jobject JNICALL Java_org_linphone_core_LinphoneCoreImpl_createPublish(
|
|||
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) {
|
||||
LinphoneContent content = {0};
|
||||
linphone_event_send_publish((LinphoneEvent*) jevent, linphone_content_get_type(&content)? &content : NULL);
|
||||
|
||||
|
||||
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 = create_content_from_java_args(env, linphone_event_get_core((LinphoneEvent*)eventptr),
|
||||
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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
LinphoneCore *lc = linphone_chat_room_get_lc(msg->chat_room);
|
||||
LinphoneCore *lc = linphone_chat_room_get_core(msg->chat_room);
|
||||
int id = -1;
|
||||
if (lc->db) {
|
||||
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){
|
||||
LinphoneCore *lc=linphone_chat_room_get_lc(msg->chat_room);
|
||||
LinphoneCore *lc=linphone_chat_room_get_core(msg->chat_room);
|
||||
int id = 0;
|
||||
|
||||
if (lc->db){
|
||||
|
|
@ -330,7 +330,7 @@ void linphone_chat_message_store_appdata(LinphoneChatMessage* msg){
|
|||
}
|
||||
|
||||
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;
|
||||
char *peer;
|
||||
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) {
|
||||
LinphoneCore *lc=linphone_chat_room_get_lc(cr);
|
||||
LinphoneCore *lc=linphone_chat_room_get_core(cr);
|
||||
char *buf;
|
||||
|
||||
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){
|
||||
LinphoneCore *lc=linphone_chat_room_get_lc(cr);
|
||||
LinphoneCore *lc=linphone_chat_room_get_core(cr);
|
||||
int numrows=0;
|
||||
char *peer;
|
||||
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){
|
||||
LinphoneCore *lc=linphone_chat_room_get_lc(cr);
|
||||
LinphoneCore *lc=linphone_chat_room_get_core(cr);
|
||||
MSList *ret;
|
||||
char *buf,*buf2;
|
||||
char *peer;
|
||||
|
|
|
|||
|
|
@ -1824,6 +1824,14 @@ const char ** linphone_core_get_supported_file_formats(LinphoneCore *core){
|
|||
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){
|
||||
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->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->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;
|
||||
|
||||
if (fl==NULL) return ;
|
||||
fl->lc = lc;
|
||||
linphone_friend_add_incoming_subscription(fl, op);
|
||||
linphone_friend_set_inc_subscribe_policy(fl,LinphoneSPAccept);
|
||||
fl->inc_subscribe_pending=TRUE;
|
||||
|
|
|
|||
|
|
@ -662,6 +662,7 @@ struct _LinphoneFriend{
|
|||
struct _LinphoneCore *lc;
|
||||
BuddyInfo *info;
|
||||
char *refkey;
|
||||
bool_t in_list;
|
||||
bool_t subscribe;
|
||||
bool_t subscribe_active;
|
||||
bool_t inc_subscribe_pending;
|
||||
|
|
|
|||
|
|
@ -266,6 +266,16 @@ bool_t sal_media_description_has_avpf(const SalMediaDescription *md) {
|
|||
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) {
|
||||
int i;
|
||||
if (md->nb_streams == 0) return FALSE;
|
||||
|
|
|
|||
|
|
@ -71,6 +71,12 @@ set(SOURCE_FILES
|
|||
utils.c
|
||||
videowindow.c
|
||||
)
|
||||
|
||||
set(OBJC_FILES)
|
||||
if (APPLE)
|
||||
list(APPEND OBJC_FILES mac.m)
|
||||
endif()
|
||||
|
||||
if(ENABLE_ASSISTANT)
|
||||
list(APPEND SOURCE_FILES setupwizard.c)
|
||||
endif()
|
||||
|
|
@ -78,11 +84,14 @@ if(WIN32)
|
|||
list(APPEND SOURCE_FILES linphone.rc)
|
||||
endif()
|
||||
|
||||
|
||||
apply_compile_flags(SOURCE_FILES "CPP" "C")
|
||||
apply_compile_flags(OBJC_FILES "CPP" "OBJC")
|
||||
|
||||
if(WIN32)
|
||||
add_executable(linphone-gtk WIN32 ${SOURCE_FILES})
|
||||
else()
|
||||
add_executable(linphone-gtk ${SOURCE_FILES})
|
||||
add_executable(linphone-gtk ${SOURCE_FILES} ${OBJC_FILES})
|
||||
endif()
|
||||
set_target_properties(linphone-gtk PROPERTIES OUTPUT_NAME linphone LINKER_LANGUAGE CXX)
|
||||
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_link_libraries(linphone-gtk ${GTKMACINTEGRATION_LIBRARIES})
|
||||
endif()
|
||||
if(APPLE)
|
||||
target_link_libraries(linphone-gtk "-framework Cocoa")
|
||||
endif()
|
||||
|
||||
|
||||
install(TARGETS linphone-gtk
|
||||
RUNTIME DESTINATION bin
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ linphone_SOURCES+= \
|
|||
status_notifier.h
|
||||
endif
|
||||
|
||||
|
||||
linphone_LDADD= $(top_builddir)/coreapi/liblinphone.la \
|
||||
$(LIBGTK_LIBS) $(NOTIFY1_LIBS) $(NOTIFY4_LIBS) $(LIBGTKMAC_LIBS) $(INTLLIBS) $(SQLITE3_LIBS) $(BELLESIP_LIBS)
|
||||
|
||||
|
|
@ -92,17 +93,20 @@ endif
|
|||
uidir=$(datadir)/linphone
|
||||
dist_ui_DATA=$(UI_FILES) $(PIXMAPS) $(top_srcdir)/COPYING
|
||||
|
||||
if BUILD_MACOS
|
||||
linphone_SOURCES+=mac.m
|
||||
linphone_LDFLAGS+=-framework Cocoa
|
||||
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) \
|
||||
$(ORTP_CFLAGS) $(BELLESIP_CFLAGS) \
|
||||
$(STRICT_OPTIONS) $(STRICT_OPTIONS_CC) $(LIBGTK_CFLAGS) $(LIBGTKMAC_CFLAGS) $(IPV6_CFLAGS) \
|
||||
$(TUNNEL_CFLAGS) \
|
||||
$(SQLITE3_CFLAGS)
|
||||
|
||||
|
||||
version_date.h: $(top_srcdir)/configure.ac
|
||||
echo "#define LINPHONE_VERSION_DATE \"$(VERSION)-`date +%y%m%d`\"" > $@
|
||||
|
||||
|
|
|
|||
20
gtk/chat.c
20
gtk/chat.c
|
|
@ -81,6 +81,12 @@ char *linphone_gtk_message_storage_get_db_file(const char *filename){
|
|||
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) {
|
||||
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);
|
||||
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);
|
||||
from=g_object_get_data(G_OBJECT(w),"from_message");
|
||||
if (from){
|
||||
|
|
@ -280,7 +286,7 @@ void linphone_gtk_compose_text(void) {
|
|||
LinphoneChatRoom *cr=g_object_get_data(G_OBJECT(w),"cr");
|
||||
if (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));
|
||||
}
|
||||
}
|
||||
|
|
@ -341,7 +347,7 @@ void display_history_message(GtkWidget *chat_view,MSList *messages,const Linphon
|
|||
g_object_set_data(G_OBJECT(chat_view),"from_message",NULL);
|
||||
g_free(tmp);
|
||||
}
|
||||
|
||||
|
||||
linphone_gtk_free_list(messages);
|
||||
}
|
||||
}
|
||||
|
|
@ -381,7 +387,7 @@ static gboolean link_event_handler(GtkTextTag *tag, GObject *text_view,GdkEvent
|
|||
LinphoneChatRoom *chat_room = (LinphoneChatRoom *)g_object_get_data(G_OBJECT(chat_view), "cr");
|
||||
GtkWidget *main_window = linphone_gtk_get_main_window();
|
||||
GtkWidget *friendlist = linphone_gtk_get_widget(main_window, "contact_list");
|
||||
|
||||
|
||||
gtk_text_iter_backward_to_tag_toggle(&uri_begin, tag);
|
||||
gtk_text_iter_forward_to_tag_toggle(&uri_end, tag);
|
||||
uri = gtk_text_iter_get_slice(&uri_begin, &uri_end);
|
||||
|
|
@ -393,10 +399,10 @@ static gboolean link_event_handler(GtkTextTag *tag, GObject *text_view,GdkEvent
|
|||
gtk_menu_popup(menu, NULL, NULL, NULL, NULL, 3, gdk_event_get_time(event));
|
||||
}
|
||||
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));
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
|
|
|||
|
|
@ -190,18 +190,18 @@ void linphone_gtk_friend_list_update_button_display(GtkTreeView *friendlist){
|
|||
int nbmsg=0;
|
||||
GtkTreePath *selected_path = NULL;
|
||||
GtkTreePath *hovered_row = (GtkTreePath *)g_object_get_data(G_OBJECT(friendlist), "hovered_row");
|
||||
|
||||
|
||||
if (gtk_tree_selection_get_selected(select, &model, &selected_iter)){
|
||||
selected_path = gtk_tree_model_get_path(model, &selected_iter);
|
||||
}
|
||||
|
||||
|
||||
if (gtk_tree_model_get_iter_first(model,&iter)) {
|
||||
do{
|
||||
const char *icon_name = NULL;
|
||||
gboolean show_chat_button = FALSE;
|
||||
gboolean show_call_button = FALSE;
|
||||
GtkTreePath *path = gtk_tree_model_get_path(model, &iter);
|
||||
|
||||
|
||||
gtk_tree_model_get (model, &iter,FRIEND_CHATROOM , &cr, -1);
|
||||
nbmsg=linphone_chat_room_get_unread_messages_count(cr);
|
||||
is_composing=linphone_chat_room_is_remote_composing(cr);
|
||||
|
|
@ -217,7 +217,7 @@ void linphone_gtk_friend_list_update_button_display(GtkTreeView *friendlist){
|
|||
icon_name = "linphone-chat-nothing";
|
||||
}
|
||||
}
|
||||
if ((selected_path && gtk_tree_path_compare(path, selected_path) == 0)
|
||||
if ((selected_path && gtk_tree_path_compare(path, selected_path) == 0)
|
||||
|| (hovered_row && gtk_tree_path_compare(path, hovered_row) == 0)){
|
||||
show_chat_button = TRUE;
|
||||
show_call_button = TRUE;
|
||||
|
|
@ -225,7 +225,7 @@ void linphone_gtk_friend_list_update_button_display(GtkTreeView *friendlist){
|
|||
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_CHAT,icon_name,
|
||||
FRIEND_CHAT_BUTTON_VISIBLE, show_chat_button, -1);
|
||||
gtk_list_store_set(GTK_LIST_STORE(model), &iter, FRIEND_CALL_BUTTON_VISIBLE, show_call_button, -1);
|
||||
|
||||
|
||||
gtk_tree_path_free(path);
|
||||
}while(gtk_tree_model_iter_next(model,&iter));
|
||||
}
|
||||
|
|
@ -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)){
|
||||
cr=g_object_get_data(G_OBJECT(chat_view),"cr");
|
||||
if(cr!=NULL){
|
||||
linphone_chat_room_mark_as_read(cr);
|
||||
linphone_gtk_mark_chat_read(cr);
|
||||
linphone_gtk_show_friends();
|
||||
}
|
||||
}
|
||||
|
|
@ -346,7 +346,7 @@ void linphone_gtk_chat_selected(GtkWidget *item){
|
|||
} else {
|
||||
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));
|
||||
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(page,"text_entry"));
|
||||
}
|
||||
|
|
@ -357,7 +357,7 @@ void linphone_gtk_contact_clicked(GtkTreeSelection *selection){
|
|||
GtkWidget *mw = linphone_gtk_get_main_window();
|
||||
GtkWidget *edit_button = linphone_gtk_get_widget(mw, "edit_button");
|
||||
GtkWidget *remove_button = linphone_gtk_get_widget(mw, "remove_button");
|
||||
|
||||
|
||||
linphone_gtk_set_selection_to_uri_bar(friendlist);
|
||||
linphone_gtk_friend_list_update_button_display(friendlist);
|
||||
if(gtk_tree_selection_get_selected(selection, NULL, NULL)) {
|
||||
|
|
@ -605,7 +605,7 @@ static void linphone_gtk_friend_list_init(GtkWidget *friendlist){
|
|||
gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(store),FRIEND_NAME,friend_sort,NULL,NULL);
|
||||
gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
|
||||
g_signal_connect(G_OBJECT(select), "changed", G_CALLBACK(linphone_gtk_contact_clicked), NULL);
|
||||
|
||||
|
||||
g_object_set_data(G_OBJECT(friendlist), "friendlist_initialized", (gpointer)TRUE);
|
||||
}
|
||||
|
||||
|
|
@ -743,7 +743,7 @@ void linphone_gtk_show_contact(LinphoneFriend *lf, GtkWidget *parent){
|
|||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
|
||||
linphone_friend_get_inc_subscribe_policy(lf)==LinphoneSPAccept);
|
||||
g_object_set_data(G_OBJECT(w),"friend_ref",(gpointer)lf);
|
||||
|
||||
|
||||
gtk_widget_show(w);
|
||||
}
|
||||
|
||||
|
|
@ -925,10 +925,10 @@ gboolean linphone_gtk_contact_list_button_pressed(GtkTreeView *friendlist, GdkEv
|
|||
GtkTreePath *path;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeSelection *selection = gtk_tree_view_get_selection(friendlist);
|
||||
|
||||
|
||||
gtk_tree_view_convert_widget_to_bin_window_coords(friendlist, event->x, event->y, &x_bin, &y_bin);
|
||||
gtk_tree_view_get_path_at_pos(friendlist, x_bin, y_bin, &path, &column, NULL, NULL);
|
||||
|
||||
|
||||
if (event->button == 3 && event->type == GDK_BUTTON_PRESS) {
|
||||
if(path) gtk_tree_selection_select_path(selection, path);
|
||||
ret = linphone_gtk_popup_contact_menu(GTK_WIDGET(friendlist), event);
|
||||
|
|
|
|||
|
|
@ -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 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_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
|
||||
17
gtk/main.c
17
gtk/main.c
|
|
@ -1557,6 +1557,9 @@ void linphone_gtk_status_icon_set_blinking(gboolean val) {
|
|||
if(icon) {
|
||||
linphone_status_icon_enable_blinking(icon, val);
|
||||
}
|
||||
#ifdef __APPLE__
|
||||
linphone_gtk_update_badge_count();
|
||||
#endif
|
||||
}
|
||||
|
||||
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){
|
||||
#ifdef HAVE_GTK_OSX
|
||||
{
|
||||
GtkosxApplication *theMacApp = gtkosx_application_get();
|
||||
gtkosx_application_set_menu_bar(theMacApp,NULL);
|
||||
}
|
||||
#endif
|
||||
linphone_gtk_unmonitor_usb();
|
||||
g_source_remove_by_user_data(linphone_gtk_get_core());
|
||||
#ifdef BUILD_WIZARD
|
||||
|
|
@ -2051,7 +2060,7 @@ static void populate_xdg_data_dirs_envvar(void) {
|
|||
int i;
|
||||
gchar *value;
|
||||
gchar **paths;
|
||||
|
||||
|
||||
if(g_getenv("XDG_DATA_DIRS") == NULL) {
|
||||
value = g_strdup("/usr/share:/usr/local/share:/opt/local/share");
|
||||
} else {
|
||||
|
|
@ -2095,7 +2104,7 @@ int main(int argc, char *argv[]){
|
|||
/*for pulseaudio:*/
|
||||
g_setenv("PULSE_PROP_media.role", "phone", TRUE);
|
||||
#endif
|
||||
|
||||
|
||||
populate_xdg_data_dirs_envvar();
|
||||
|
||||
lang=linphone_gtk_get_lang(config_file);
|
||||
|
|
@ -2232,7 +2241,7 @@ core_start:
|
|||
gtk_timeout_add(30,(GtkFunction)linphone_gtk_check_logs,(gpointer)linphone_gtk_get_core());
|
||||
|
||||
signal(SIGINT, sigint_handler);
|
||||
|
||||
|
||||
gtk_main();
|
||||
linphone_gtk_quit();
|
||||
|
||||
|
|
@ -2259,7 +2268,7 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
|||
GtkWidget *linphone_gtk_make_tab_header(const gchar *label, const gchar *icon_name, gboolean show_quit_button, GCallback cb, gpointer user_data) {
|
||||
GtkWidget *tab_header=gtk_hbox_new (FALSE,0);
|
||||
GtkWidget *label_widget = gtk_label_new (label);
|
||||
|
||||
|
||||
if(icon_name) {
|
||||
GtkWidget *icon=gtk_image_new_from_icon_name(icon_name, GTK_ICON_SIZE_MENU);
|
||||
#ifdef HAVE_GTK_OSX
|
||||
|
|
|
|||
|
|
@ -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_dtls(const SalStreamDescription *sd);
|
||||
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_dtls(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 addFriend(LinphoneFriend friend);
|
||||
public void updateSubscriptions(LinphoneProxyConfig proxyConfig,boolean onlyWhenRegistered);
|
||||
public LinphoneFriend findFriendByUri(String uri);
|
||||
long getNativePtr();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ import java.io.IOException;
|
|||
|
||||
import org.linphone.core.LinphoneCall.State;
|
||||
import org.linphone.core.LinphoneCoreListener;
|
||||
import org.linphone.core.LinphoneProxyConfigImpl;
|
||||
|
||||
import org.linphone.mediastream.Log;
|
||||
import org.linphone.mediastream.Version;
|
||||
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 updateSubscriptions(long nativePtr,long proxyConfigPtr,boolean onlyWhenRegistered);
|
||||
private native Object getCore(long ptr);
|
||||
private native LinphoneFriend findFriendByUri(long nativePtr,String uri);
|
||||
|
||||
|
||||
|
||||
protected LinphoneFriendListImpl(LinphoneCoreImpl core) {
|
||||
|
|
@ -56,6 +58,14 @@ class LinphoneFriendListImpl implements LinphoneFriendList, Serializable {
|
|||
updateSubscriptions(nativePtr, ((LinphoneProxyConfigImpl)proxyConfig).nativePtr,onlyWhenRegistered);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinphoneFriend findFriendByUri(String uri) {
|
||||
synchronized(getSyncObject()){
|
||||
return findFriendByUri(nativePtr,uri);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*reserved for JNI */
|
||||
protected LinphoneFriendListImpl(long aNativePtr) {
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ set(SOUND_FILES
|
|||
hello8000.wav
|
||||
incoming_chat.wav
|
||||
ringback.wav
|
||||
dont_wait_too_long.mkv
|
||||
toy-mono.wav
|
||||
)
|
||||
|
||||
install(FILES ${SOUND_FILES}
|
||||
|
|
|
|||
|
|
@ -1,17 +1,20 @@
|
|||
|
||||
SUBDIRS=C fr it ja cs xml
|
||||
|
||||
LINPHONE_SOUNDS=ringback.wav hello8000.wav hello16000.wav incoming_chat.wav
|
||||
LINPHONE_RINGS=rings/orig.wav \
|
||||
rings/oldphone.wav \
|
||||
rings/oldphone-mono.wav \
|
||||
rings/oldphone-mono-30s.caf \
|
||||
rings/rock.wav \
|
||||
rings/bigben.wav \
|
||||
rings/toy-mono.wav \
|
||||
rings/sweet.wav \
|
||||
rings/synth.wav \
|
||||
rings/tapping.wav
|
||||
LINPHONE_ONHOLD_MUSIC= toy-mono.wav \
|
||||
dont_wait_too_long.mkv
|
||||
|
||||
LINPHONE_SOUNDS=ringback.wav hello8000.wav hello16000.wav incoming_chat.wav $(LINPHONE_ONHOLD_MUSIC)
|
||||
|
||||
LINPHONE_RINGS= \
|
||||
rings/oldphone-mono.wav \
|
||||
rings/oldphone-mono-30s.caf \
|
||||
rings/four_hands_together.mkv \
|
||||
rings/house_keeping.mkv \
|
||||
rings/its_a_game.mkv \
|
||||
rings/leaving_dreams.mkv \
|
||||
rings/notes_of_the_optimistic.mkv \
|
||||
rings/soft_as_snow.mkv
|
||||
|
||||
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
|
||||
bigben.wav
|
||||
oldphone-mono-30s.caf
|
||||
oldphone-mono.wav
|
||||
oldphone.wav
|
||||
orig.wav
|
||||
rock.wav
|
||||
sweet.wav
|
||||
synth.wav
|
||||
tapping.wav
|
||||
toy-mono.wav
|
||||
four_hands_together.mkv
|
||||
house_keeping.mkv
|
||||
its_a_game.mkv
|
||||
leaving_dreams.mkv
|
||||
notes_of_the_optimistic.mkv
|
||||
soft_as_snow.mkv
|
||||
)
|
||||
|
||||
|
||||
install(FILES ${RING_FILES}
|
||||
DESTINATION ${PACKAGE_RING_DIR}
|
||||
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};
|
||||
LinphoneCall* marie_call;
|
||||
LinphoneCall* pauline_call;
|
||||
LinphoneVideoPolicy marie_policy, pauline_policy;
|
||||
LinphoneCall* callee_call;
|
||||
LinphoneCall* caller_call;
|
||||
LinphoneVideoPolicy callee_policy, caller_policy;
|
||||
|
||||
if (using_policy) {
|
||||
marie_policy.automatically_initiate=FALSE;
|
||||
marie_policy.automatically_accept=TRUE;
|
||||
pauline_policy.automatically_initiate=TRUE;
|
||||
pauline_policy.automatically_accept=FALSE;
|
||||
callee_policy.automatically_initiate=FALSE;
|
||||
callee_policy.automatically_accept=TRUE;
|
||||
caller_policy.automatically_initiate=TRUE;
|
||||
caller_policy.automatically_accept=FALSE;
|
||||
|
||||
linphone_core_set_video_policy(marie->lc,&marie_policy);
|
||||
linphone_core_set_video_policy(pauline->lc,&pauline_policy);
|
||||
linphone_core_set_video_policy(callee->lc,&callee_policy);
|
||||
linphone_core_set_video_policy(caller->lc,&caller_policy);
|
||||
}
|
||||
|
||||
linphone_core_enable_video_display(marie->lc, callee_video_enabled);
|
||||
linphone_core_enable_video_capture(marie->lc, callee_video_enabled);
|
||||
linphone_core_enable_video_display(callee->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_capture(pauline->lc, caller_video_enabled);
|
||||
linphone_core_enable_video_display(caller->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 */
|
||||
marie->lc->user_certificates_path = bc_tester_file("certificates-marie");
|
||||
pauline->lc->user_certificates_path = bc_tester_file("certificates-pauline");
|
||||
belle_sip_mkdir(marie->lc->user_certificates_path);
|
||||
belle_sip_mkdir(pauline->lc->user_certificates_path);
|
||||
callee->lc->user_certificates_path = bc_tester_file("certificates-marie");
|
||||
caller->lc->user_certificates_path = bc_tester_file("certificates-pauline");
|
||||
belle_sip_mkdir(callee->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(pauline->lc,mode);
|
||||
linphone_core_set_media_encryption(callee->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)
|
||||
linphone_call_params_enable_video(caller_test_params.base,TRUE);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
BC_ASSERT_TRUE(call_with_params2(pauline,marie,&caller_test_params,&callee_test_params,using_policy));
|
||||
marie_call=linphone_core_get_current_call(marie->lc);
|
||||
pauline_call=linphone_core_get_current_call(pauline->lc);
|
||||
BC_ASSERT_TRUE(call_with_params2(caller,callee,&caller_test_params,&callee_test_params,using_policy));
|
||||
callee_call=linphone_core_get_current_call(callee->lc);
|
||||
caller_call=linphone_core_get_current_call(caller->lc);
|
||||
|
||||
linphone_call_params_destroy(caller_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) {
|
||||
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(pauline_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(caller_call)));
|
||||
|
||||
/*check video path*/
|
||||
linphone_call_set_next_video_frame_decoded_callback(marie_call,linphone_call_iframe_decoded_cb,marie->lc);
|
||||
linphone_call_send_vfu_request(marie_call);
|
||||
BC_ASSERT_TRUE( wait_for(marie->lc,pauline->lc,&marie->stat.number_of_IframeDecoded,1));
|
||||
linphone_call_set_next_video_frame_decoded_callback(callee_call,linphone_call_iframe_decoded_cb,callee->lc);
|
||||
linphone_call_send_vfu_request(callee_call);
|
||||
BC_ASSERT_TRUE( wait_for(callee->lc,caller->lc,&callee->stat.number_of_IframeDecoded,1));
|
||||
} 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(pauline_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(caller_call)));
|
||||
}
|
||||
liblinphone_tester_check_rtcp(marie,pauline);
|
||||
liblinphone_tester_check_rtcp(callee,caller);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2107,7 +2107,6 @@ void video_call_base_3(LinphoneCoreManager* caller,LinphoneCoreManager* callee,
|
|||
linphone_core_set_media_encryption(caller->lc,mode);
|
||||
/* Create call params */
|
||||
caller_test_params.base=linphone_core_create_call_params(caller->lc, NULL);
|
||||
|
||||
|
||||
if (!using_policy)
|
||||
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);
|
||||
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));
|
||||
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));
|
||||
|
|
@ -2182,7 +2181,7 @@ static void video_call_disable_implicit_AVPF_on_caller(void) {
|
|||
caller_lp = linphone_core_get_config(caller->lc);
|
||||
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));
|
||||
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));
|
||||
|
|
@ -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) {
|
||||
linphone_core_set_avpf_mode(pauline->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);
|
||||
end_call(pauline, marie);
|
||||
}
|
||||
|
||||
static void video_call_avpf(void) {
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new("pauline_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) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
video_call_base(marie,pauline,TRUE,LinphoneMediaEncryptionNone,TRUE,TRUE);
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTcp) ? "pauline_rc" : "pauline_tcp_rc");
|
||||
video_call_base(pauline,marie,TRUE,LinphoneMediaEncryptionNone,TRUE,TRUE);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
|
|
@ -2820,14 +2830,6 @@ end:
|
|||
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) {
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_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");
|
||||
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.");
|
||||
goto end;
|
||||
}
|
||||
|
|
@ -4674,6 +4676,8 @@ static void simple_stereo_call(const char *codec_name, int clock_rate, int bitra
|
|||
char *stereo_file = bc_tester_res("sounds/vrroom.wav");
|
||||
char *recordpath = bc_tester_file("stereo-record.wav");
|
||||
bool_t audio_cmp_failed = FALSE;
|
||||
|
||||
unlink(recordpath);
|
||||
|
||||
marie = linphone_core_manager_new( "marie_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);
|
||||
|
||||
/*stereo is supported only without volume control, echo canceller...*/
|
||||
lp_config_set_string(marie->lc->config,"sound","features","NONE");
|
||||
lp_config_set_string(pauline->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","REMOTE_PLAYING");
|
||||
|
||||
if (!BC_ASSERT_TRUE(call(pauline,marie))) goto end;
|
||||
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 },
|
||||
#ifdef VIDEO_ENABLED
|
||||
{ "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 caller",video_call_disable_implicit_AVPF_on_caller},
|
||||
{ "Simple video call AVPF to implicit AVPF",video_call_AVPF_to_implicit_AVPF},
|
||||
|
|
|
|||
|
|
@ -22,10 +22,6 @@
|
|||
#include "lpconfig.h"
|
||||
#include "private.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define popen _popen
|
||||
#define pclose _pclose
|
||||
#endif
|
||||
|
||||
void check_rtcp(LinphoneCall *call) {
|
||||
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,&marie2->stat.number_of_LinphoneMessageReceived,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");
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(marie2);
|
||||
|
|
@ -92,6 +97,13 @@ static void message_forking_with_unreachable_recipients(void) {
|
|||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,marie2->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*/
|
||||
linphone_core_set_network_reachable(marie2->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,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*/
|
||||
linphone_core_set_network_reachable(marie->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);
|
||||
|
||||
if (TRUE/*sipp_out*/) {
|
||||
if (sipp_out) {
|
||||
/*wait for marie status*/
|
||||
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");
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@
|
|||
#include "config.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define popen _popen
|
||||
#define pclose _pclose
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue