Commit 24cf2976 authored by jehan's avatar jehan
Browse files

fix some warnings, update submodule ms2

parent b5e52a00
......@@ -3360,11 +3360,11 @@ LINPHONE_PUBLIC bool_t linphone_core_video_supported(LinphoneCore *lc);
LINPHONE_PUBLIC LINPHONE_DEPRECATED void linphone_core_enable_video(LinphoneCore *lc, bool_t vcap_enabled, bool_t display_enabled);
/**
* Returns TRUE if video is enabled, FALSE otherwise.
* Returns TRUE if either capture or display is enabled, FALSE otherwise.
* same as ( #linphone_core_video_capture_enabled | #linphone_core_video_display_enabled )
* @ingroup media_parameters
* @deprecated Use #linphone_core_video_capture_enabled and #linphone_core_video_display_enabled instead.
**/
LINPHONE_PUBLIC LINPHONE_DEPRECATED bool_t linphone_core_video_enabled(LinphoneCore *lc);
LINPHONE_PUBLIC bool_t linphone_core_video_enabled(LinphoneCore *lc);
/**
* Enable or disable video capture.
......
......@@ -213,7 +213,6 @@ struct _LinphoneChatMessage {
LinphoneChatMessageCbs *callbacks;
LinphoneChatMessageDir dir;
char* message;
LinphoneChatMessageStateChangedCb message_state_changed_cb;
void* message_state_changed_user_data;
void* message_userdata;
char* appdata;
......@@ -231,6 +230,15 @@ struct _LinphoneChatMessage {
belle_http_request_t *http_request; /**< keep a reference to the http_request in case of file transfer in order to be able to cancel the transfer */
belle_http_request_listener_t *http_listener; /* our listener, only owned by us*/
char *file_transfer_filepath;
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic push
#endif
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
LinphoneChatMessageStateChangedCb message_state_changed_cb;
#if __clang__ || ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
#pragma GCC diagnostic pop
#endif
};
BELLE_SIP_DECLARE_VPTR(LinphoneChatMessage);
......@@ -1386,6 +1394,8 @@ bool_t linphone_core_lime_for_file_sharing_enabled(const LinphoneCore *lc);
BELLE_SIP_DECLARE_VPTR(LinphoneTunnelConfig);
int linphone_core_get_default_proxy_config_index(LinphoneCore *lc);
#ifdef __cplusplus
}
#endif
......
......@@ -93,7 +93,7 @@ void linphone_proxy_config_write_all_to_config_file(LinphoneCore *lc){
}
/*to ensure removed configs are erased:*/
linphone_proxy_config_write_to_config_file(lc->config,NULL,i);
lp_config_set_int(lc->config,"sip","default_proxy",linphone_core_get_default_proxy(lc,NULL));
lp_config_set_int(lc->config,"sip","default_proxy",linphone_core_get_default_proxy_config_index(lc));
}
static void linphone_proxy_config_init(LinphoneCore* lc, LinphoneProxyConfig *cfg) {
......@@ -1167,7 +1167,7 @@ void linphone_core_clear_proxy_config(LinphoneCore *lc){
linphone_proxy_config_write_all_to_config_file(lc);
}
static int linphone_core_get_default_proxy_config_index(LinphoneCore *lc) {
int linphone_core_get_default_proxy_config_index(LinphoneCore *lc) {
int pos = -1;
if (lc->default_proxy != NULL) {
pos = ms_list_position(lc->sip_conf.proxies, ms_list_find(lc->sip_conf.proxies, (void *)lc->default_proxy));
......
......@@ -652,7 +652,7 @@ gboolean linphone_gtk_directory_search_focus_in(GtkWidget *entry){
void linphone_gtk_directory_search_activate(GtkWidget *entry){
LinphoneProxyConfig *cfg;
GtkWidget *w;
linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
cfg = linphone_core_get_default_proxy_config(linphone_gtk_get_core());
w=linphone_gtk_show_buddy_lookup_window(linphone_proxy_config_get_sip_setup_context(cfg));
if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==1)
linphone_gtk_buddy_lookup_set_keyword(w,gtk_entry_get_text(GTK_ENTRY(entry)));
......@@ -809,7 +809,7 @@ static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
SipSetupContext * ssc=NULL;
bool_t show_menu_separator=FALSE;
linphone_core_get_default_proxy(lc,&cfg);
cfg = linphone_core_get_default_proxy_config(lc);
if (cfg){
ssc=linphone_proxy_config_get_sip_setup_context(cfg);
}
......
......@@ -914,7 +914,7 @@ void linphone_gtk_draw_mute_button(GtkButton *button, gboolean active){
void linphone_gtk_mute_clicked(GtkButton *button){
int active=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button),"active"));
linphone_core_mute_mic(linphone_gtk_get_core(),!active);
linphone_core_enable_mic(linphone_gtk_get_core(),active);
linphone_gtk_draw_mute_button(button,!active);
}
......
......@@ -143,7 +143,7 @@ void linphone_gtk_exit_login_frame(void){
void linphone_gtk_logout_clicked(void){
LinphoneCore *lc=linphone_gtk_get_core();
LinphoneProxyConfig *cfg=NULL;
linphone_core_get_default_proxy(lc,&cfg);
cfg = linphone_core_get_default_proxy_config(lc);
if (cfg){
SipSetupContext *ss=linphone_proxy_config_get_sip_setup_context(cfg);
if (ss){
......
......@@ -71,7 +71,6 @@ static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend
static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username, const char *domain);
static void linphone_gtk_display_status(LinphoneCore *lc, const char *status);
static void linphone_gtk_configuring_status(LinphoneCore *lc, LinphoneConfiguringState status, const char *message);
static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg);
static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning);
static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url);
static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl);
......@@ -267,12 +266,7 @@ static void linphone_gtk_init_liblinphone(const char *config_file,
vtable.notify_presence_received=linphone_gtk_notify_recv;
vtable.new_subscription_requested=linphone_gtk_new_unknown_subscriber;
vtable.auth_info_requested=linphone_gtk_auth_info_requested;
vtable.display_status=linphone_gtk_display_status;
vtable.display_message=linphone_gtk_display_message;
vtable.display_warning=linphone_gtk_display_warning;
vtable.display_url=linphone_gtk_display_url;
vtable.call_log_updated=linphone_gtk_call_log_updated;
//vtable.text_received=linphone_gtk_text_received;
vtable.message_received=linphone_gtk_text_received;
vtable.is_composing_received=linphone_gtk_is_composing_received;
vtable.refer_received=linphone_gtk_refer_received;
......@@ -1133,34 +1127,12 @@ static void linphone_gtk_dtmf_received(LinphoneCore *lc, LinphoneCall *call, int
ms_message("Dtmf %c received.",dtmf);
}
static void linphone_gtk_display_status(LinphoneCore *lc, const char *status){
GtkWidget *w=linphone_gtk_get_main_window();
GtkWidget *status_bar=linphone_gtk_get_widget(w,"status_bar");
gtk_statusbar_push(GTK_STATUSBAR(status_bar),
gtk_statusbar_get_context_id(GTK_STATUSBAR(status_bar),""),
status);
}
static void linphone_gtk_configuring_status(LinphoneCore *lc, LinphoneConfiguringState status, const char *message) {
if (config_fetching_dialog) linphone_gtk_close_config_fetching(config_fetching_dialog, status);
config_fetching_dialog=NULL;
}
static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg){
linphone_gtk_display_something(GTK_MESSAGE_INFO,msg);
}
static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning){
linphone_gtk_display_something(GTK_MESSAGE_WARNING,warning);
}
static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url){
char richtext[4096];
snprintf(richtext,sizeof(richtext),"%s %s",msg,url);
linphone_gtk_display_something(GTK_MESSAGE_INFO,richtext);
}
static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl){
GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
if (w) linphone_gtk_call_log_update(w);
......@@ -1624,7 +1596,7 @@ void linphone_gtk_load_identities(void){
store=GTK_LIST_STORE(gtk_combo_box_get_model(box));
}
gtk_list_store_clear(store);
linphone_core_get_default_proxy(linphone_gtk_get_core(),&def);
def = linphone_core_get_default_proxy_config(linphone_gtk_get_core());
def_identity=g_strdup_printf(_("%s (Default)"),linphone_core_get_primary_contact(linphone_gtk_get_core()));
gtk_list_store_append(store,&iter);
gtk_list_store_set(store,&iter,0,def_identity,1,NULL,2,NULL,-1);
......@@ -1651,7 +1623,7 @@ static void linphone_gtk_dtmf_pressed(GtkButton *button){
gtk_editable_insert_text(GTK_EDITABLE(uri_bar),label,1,&pos);
linphone_core_play_dtmf (linphone_gtk_get_core(),label[0],-1);
if (linphone_core_in_call(linphone_gtk_get_core())){
linphone_core_send_dtmf(linphone_gtk_get_core(),label[0]);
linphone_call_send_dtmf(linphone_core_get_current_call(linphone_gtk_get_core()),label[0]);
}
}
......@@ -1738,8 +1710,7 @@ static void linphone_gtk_configure_main_window(void){
void linphone_gtk_manage_login(void){
LinphoneCore *lc=linphone_gtk_get_core();
LinphoneProxyConfig *cfg=NULL;
linphone_core_get_default_proxy(lc,&cfg);
LinphoneProxyConfig *cfg=linphone_core_get_default_proxy_config(lc);
if (cfg){
SipSetup *ss=linphone_proxy_config_get_sip_setup(cfg);
if (ss && (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_LOGIN)){
......
mediastreamer2 @ 7f354594
Subproject commit 40fb0cfc7c89bc8d59d220d76800dda600c9cb93
Subproject commit 7f354594173d11cf30eb5cee470c41966d13fe99
......@@ -5499,6 +5499,40 @@ static void call_with_ice_and_rtcp_mux_without_reinvite(void){
_call_with_rtcp_mux(TRUE, TRUE, TRUE,FALSE);
}
static void call_with_zrtp_configured_calling_base(LinphoneCoreManager *marie, LinphoneCoreManager *pauline) {
bool_t call_ok;
linphone_core_set_media_encryption(marie->lc, LinphoneMediaEncryptionZRTP);
BC_ASSERT_TRUE((call_ok=call(pauline,marie)));
liblinphone_tester_check_rtcp(marie,pauline);
BC_ASSERT_EQUAL(linphone_call_params_get_media_encryption(linphone_call_get_current_params(linphone_core_get_current_call(marie->lc)))
, LinphoneMediaEncryptionNone, int, "%i");
BC_ASSERT_EQUAL(linphone_call_params_get_media_encryption(linphone_call_get_current_params(linphone_core_get_current_call(pauline->lc)))
, LinphoneMediaEncryptionNone, int, "%i");
end_call(pauline, marie);
}
static void call_with_zrtp_configured_calling_side(void) {
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc");
call_with_zrtp_configured_calling_base(marie,pauline);
linphone_core_set_user_agent(pauline->lc, "Natted Linphone", NULL);
linphone_core_set_user_agent(marie->lc, "Natted Linphone", NULL);
call_with_zrtp_configured_calling_base(marie,pauline);
linphone_core_set_firewall_policy(marie->lc,LinphonePolicyUseIce);
linphone_core_set_firewall_policy(pauline->lc,LinphonePolicyUseIce);
call_with_zrtp_configured_calling_base(marie,pauline);
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
}
test_t call_tests[] = {
{ "Early declined call", early_declined_call },
{ "Call declined", call_declined },
......@@ -5661,7 +5695,8 @@ test_t call_tests[] = {
{ "Call with rtcp-mux", call_with_rtcp_mux},
{ "Call with rtcp-mux not accepted", call_with_rtcp_mux_not_accepted},
{ "Call with ICE and rtcp-mux", call_with_ice_and_rtcp_mux},
{ "Call with ICE and rtcp-mux without ICE re-invite", call_with_ice_and_rtcp_mux_without_reinvite}
{ "Call with ICE and rtcp-mux without ICE re-invite", call_with_ice_and_rtcp_mux_without_reinvite},
{ "call with ZRTP configured calling side only", call_with_zrtp_configured_calling_side}
};
test_suite_t call_test_suite = {"Single Call", NULL, NULL, liblinphone_tester_before_each, liblinphone_tester_after_each,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment