Commit fb9c200a authored by Ghislain MARY's avatar Ghislain MARY

Replace MSList by bctbx_list_t in console and gtk.

parent 400404fc
......@@ -600,7 +600,7 @@ lpc_cmd_call(LinphoneCore *lc, char *args)
static int
lpc_cmd_calls(LinphoneCore *lc, char *args){
const MSList *calls = linphone_core_get_calls(lc);
const bctbx_list_t *calls = linphone_core_get_calls(lc);
if(calls)
{
lpc_display_call_states(lc);
......@@ -665,7 +665,7 @@ lpc_cmd_transfer(LinphoneCore *lc, char *args)
int n=sscanf(args,"%255s %265s %li",arg1,arg2,&id2);
if (n==1 || isalpha(*arg1)){
call=linphone_core_get_current_call(lc);
if (call==NULL && ms_list_size(linphone_core_get_calls(lc))==1){
if (call==NULL && bctbx_list_size(linphone_core_get_calls(lc))==1){
call=(LinphoneCall*)linphone_core_get_calls(lc)->data;
}
refer_to=args;
......@@ -734,7 +734,7 @@ lpc_cmd_terminate(LinphoneCore *lc, char *args)
static int
lpc_cmd_redirect(LinphoneCore *lc, char *args){
const MSList *elem;
const bctbx_list_t *elem;
int didit=0;
if (!args) return 0;
if ((elem=linphone_core_get_calls(lc))==NULL){
......@@ -780,7 +780,7 @@ static int
lpc_cmd_answer(LinphoneCore *lc, char *args){
if (!args)
{
int nb=ms_list_size(linphone_core_get_calls(lc));
int nb=bctbx_list_size(linphone_core_get_calls(lc));
if (nb==1){
//if just one call is present answer the only one in passing NULL to the linphone_core_accept_call ...
if ( -1 == linphone_core_accept_call(lc, NULL) )
......@@ -1176,8 +1176,8 @@ lpc_cmd_proxy(LinphoneCore *lc, char *args)
static int
lpc_cmd_call_logs(LinphoneCore *lc, char *args)
{
const MSList *elem=linphone_core_get_call_logs(lc);
for (;elem!=NULL;elem=ms_list_next(elem))
const bctbx_list_t *elem=linphone_core_get_call_logs(lc);
for (;elem!=NULL;elem=bctbx_list_next(elem))
{
LinphoneCallLog *cl=(LinphoneCallLog*)elem->data;
char *str=linphone_call_log_to_str(cl);
......@@ -1480,8 +1480,8 @@ static int lpc_cmd_resume(LinphoneCore *lc, char *args){
}
else
{
const MSList *calls = linphone_core_get_calls(lc);
int nbcalls=ms_list_size(calls);
const bctbx_list_t *calls = linphone_core_get_calls(lc);
int nbcalls=bctbx_list_size(calls);
if( nbcalls == 1)
{
if(linphone_core_resume_call(lc,calls->data) < 0)
......@@ -1766,7 +1766,7 @@ linphonec_proxy_display(LinphoneProxyConfig *cfg)
static void linphonec_proxy_show(LinphoneCore *lc, int index)
{
const MSList *elem;
const bctbx_list_t *elem;
int i;
for(elem=linphone_core_get_proxy_config_list(lc),i=0;elem!=NULL;elem=elem->next,++i){
if (index==i){
......@@ -1781,12 +1781,12 @@ static void linphonec_proxy_show(LinphoneCore *lc, int index)
static void
linphonec_proxy_list(LinphoneCore *lc)
{
const MSList *proxies;
const bctbx_list_t *proxies;
int n;
int def=linphone_core_get_default_proxy(lc,NULL);
proxies=linphone_core_get_proxy_config_list(lc);
for(n=0;proxies!=NULL;proxies=ms_list_next(proxies),n++){
for(n=0;proxies!=NULL;proxies=bctbx_list_next(proxies),n++){
if (n==def)
linphonec_out("****** Proxy %i - this is the default one - *******\n",n);
else
......@@ -1799,10 +1799,10 @@ linphonec_proxy_list(LinphoneCore *lc)
static void
linphonec_proxy_remove(LinphoneCore *lc, int index)
{
const MSList *proxies;
const bctbx_list_t *proxies;
LinphoneProxyConfig *cfg;
proxies=linphone_core_get_proxy_config_list(lc);
cfg=(LinphoneProxyConfig*)ms_list_nth_data(proxies,index);
cfg=(LinphoneProxyConfig*)bctbx_list_nth_data(proxies,index);
if (cfg==NULL){
linphonec_out("No such proxy.\n");
return;
......@@ -1814,10 +1814,10 @@ linphonec_proxy_remove(LinphoneCore *lc, int index)
static int
linphonec_proxy_use(LinphoneCore *lc, int index)
{
const MSList *proxies;
const bctbx_list_t *proxies;
LinphoneProxyConfig *cfg;
proxies=linphone_core_get_proxy_config_list(lc);
cfg=(LinphoneProxyConfig*)ms_list_nth_data(proxies,index);
cfg=(LinphoneProxyConfig*)bctbx_list_nth_data(proxies,index);
if (cfg==NULL){
linphonec_out("No such proxy (try 'proxy list').");
return 0;
......@@ -1841,7 +1841,7 @@ linphonec_friend_display(LinphoneFriend *fr)
static int
linphonec_friend_list(LinphoneCore *lc, char *pat)
{
const MSList *friend;
const bctbx_list_t *friend;
int n;
if (pat) {
......@@ -1850,7 +1850,7 @@ linphonec_friend_list(LinphoneCore *lc, char *pat)
}
friend = linphone_core_get_friend_list(lc);
for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
for(n=0; friend!=NULL; friend=bctbx_list_next(friend), ++n )
{
if ( pat ) {
const char *name = linphone_address_get_display_name(
......@@ -1867,11 +1867,11 @@ linphonec_friend_list(LinphoneCore *lc, char *pat)
static int
linphonec_friend_call(LinphoneCore *lc, unsigned int num)
{
const MSList *friend = linphone_core_get_friend_list(lc);
const bctbx_list_t *friend = linphone_core_get_friend_list(lc);
unsigned int n;
char *addr;
for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
for(n=0; friend!=NULL; friend=bctbx_list_next(friend), ++n )
{
if ( n == num )
{
......@@ -1904,10 +1904,10 @@ linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr)
static int
linphonec_friend_delete(LinphoneCore *lc, int num)
{
const MSList *friend = linphone_core_get_friend_list(lc);
const bctbx_list_t *friend = linphone_core_get_friend_list(lc);
unsigned int n;
for(n=0; friend!=NULL; friend=ms_list_next(friend), ++n )
for(n=0; friend!=NULL; friend=bctbx_list_next(friend), ++n )
{
if ( n == num )
{
......@@ -1941,7 +1941,7 @@ static int lpc_cmd_register(LinphoneCore *lc, char *args){
char proxy[512];
char passwd[512];
LinphoneProxyConfig *cfg;
const MSList *elem;
const bctbx_list_t *elem;
if (!args)
{
......@@ -2006,7 +2006,7 @@ static int lpc_cmd_unregister(LinphoneCore *lc, char *args){
static int lpc_cmd_duration(LinphoneCore *lc, char *args){
LinphoneCallLog *cl;
const MSList *elem=linphone_core_get_call_logs(lc);
const bctbx_list_t *elem=linphone_core_get_call_logs(lc);
for(;elem!=NULL;elem=elem->next){
if (elem->next==NULL){
cl=(LinphoneCallLog*)elem->data;
......@@ -2234,7 +2234,7 @@ static int lpc_cmd_codec(int type, LinphoneCore *lc, char *args){
static void linphonec_codec_list(int type, LinphoneCore *lc){
PayloadType *pt;
int index=0;
const MSList *node=NULL;
const bctbx_list_t *node=NULL;
if (type == AUDIO) {
node=linphone_core_get_audio_codecs(lc);
......@@ -2242,7 +2242,7 @@ static void linphonec_codec_list(int type, LinphoneCore *lc){
node=linphone_core_get_video_codecs(lc);
}
for(;node!=NULL;node=ms_list_next(node)){
for(;node!=NULL;node=bctbx_list_next(node)){
pt=(PayloadType*)(node->data);
linphonec_out("%2d: %s (%d) %s\n", index, pt->mime_type, pt->clock_rate,
linphone_core_payload_type_enabled(lc,pt) ? "enabled" : "disabled");
......@@ -2253,7 +2253,7 @@ static void linphonec_codec_list(int type, LinphoneCore *lc){
static void linphonec_codec_enable(int type, LinphoneCore *lc, int sel_index){
PayloadType *pt;
int index=0;
const MSList *node=NULL;
const bctbx_list_t *node=NULL;
if (type == AUDIO) {
node=linphone_core_get_audio_codecs(lc);
......@@ -2261,7 +2261,7 @@ static void linphonec_codec_enable(int type, LinphoneCore *lc, int sel_index){
node=linphone_core_get_video_codecs(lc);
}
for(;node!=NULL;node=ms_list_next(node)){
for(;node!=NULL;node=bctbx_list_next(node)){
if (index == sel_index || sel_index == -1) {
pt=(PayloadType*)(node->data);
linphone_core_enable_payload_type (lc,pt,TRUE);
......@@ -2274,7 +2274,7 @@ static void linphonec_codec_enable(int type, LinphoneCore *lc, int sel_index){
static void linphonec_codec_disable(int type, LinphoneCore *lc, int sel_index){
PayloadType *pt;
int index=0;
const MSList *node=NULL;
const bctbx_list_t *node=NULL;
if (type == AUDIO) {
node=linphone_core_get_audio_codecs(lc);
......@@ -2282,7 +2282,7 @@ static void linphonec_codec_disable(int type, LinphoneCore *lc, int sel_index){
node=linphone_core_get_video_codecs(lc);
}
for(;node!=NULL;node=ms_list_next(node)){
for(;node!=NULL;node=bctbx_list_next(node)){
if (index == sel_index || sel_index == -1) {
pt=(PayloadType*)(node->data);
linphone_core_enable_payload_type (lc,pt,FALSE);
......@@ -2466,7 +2466,7 @@ static void lpc_display_global_state(LinphoneCore *lc){
static void lpc_display_call_states(LinphoneCore *lc){
LinphoneCall *call;
const MSList *elem;
const bctbx_list_t *elem;
char *tmp;
linphonec_out("Call states\n"
"Id | Destination | State | Flags |\n"
......@@ -2491,7 +2491,7 @@ static void lpc_display_call_states(LinphoneCore *lc){
}
static void lpc_display_proxy_states(LinphoneCore *lc){
const MSList *elem;
const bctbx_list_t *elem;
linphonec_out("Proxy registration states\n"
" Identity | State\n"
"------------------------------------------------------------\n");
......
......@@ -271,8 +271,8 @@ void sipomatic_uninit(Sipomatic *obj)
void sipomatic_iterate(Sipomatic *obj)
{
MSList *elem;
MSList *to_be_destroyed=NULL;
bctbx_list_t *elem;
bctbx_list_t *to_be_destroyed=NULL;
Call *call;
double elapsed;
eXosip_event_t *ev;
......@@ -293,13 +293,13 @@ void sipomatic_iterate(Sipomatic *obj)
case CALL_STATE_RUNNING:
if (elapsed>obj->max_call_time || call->eof){
call_release(call);
to_be_destroyed=ms_list_append(to_be_destroyed,call);
to_be_destroyed=bctbx_list_append(to_be_destroyed,call);
}
break;
}
elem=ms_list_next(elem);
elem=bctbx_list_next(elem);
}
for(;to_be_destroyed!=NULL; to_be_destroyed=ms_list_next(to_be_destroyed)){
for(;to_be_destroyed!=NULL; to_be_destroyed=bctbx_list_next(to_be_destroyed)){
call_destroy((Call*)to_be_destroyed->data);
}
}
......@@ -307,9 +307,9 @@ void sipomatic_iterate(Sipomatic *obj)
Call* sipomatic_find_call(Sipomatic *obj,int did)
{
MSList *it;
bctbx_list_t *it;
Call *call=NULL;
for (it=obj->calls;it!=NULL;it=ms_list_next(it)){
for (it=obj->calls;it!=NULL;it=bctbx_list_next(it)){
call=(Call*)it->data;
if ( call->did==did) return call;
}
......@@ -351,7 +351,7 @@ Call * call_new(Sipomatic *root, eXosip_event_t *ev)
obj->state=CALL_STATE_INIT;
obj->eof=0;
obj->root=root;
root->calls=ms_list_append(root->calls,obj);
root->calls=bctbx_list_append(root->calls,obj);
return obj;
}
......@@ -367,7 +367,7 @@ void call_release(Call *call)
void call_destroy(Call *obj)
{
obj->root->calls=ms_list_remove(obj->root->calls,obj);
obj->root->calls=bctbx_list_remove(obj->root->calls,obj);
rtp_profile_destroy(obj->profile);
sdp_context_free(obj->sdpc);
ms_free(obj);
......
......@@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "linphone.h"
#include "sipsetup.h"
static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results);
static void linphone_gtk_display_lookup_results(GtkWidget *w, const bctbx_list_t *results);
enum {
LOOKUP_RESULT_NAME,
......@@ -136,7 +136,7 @@ static gboolean linphone_gtk_process_buddy_lookup(GtkWidget *w){
SipSetupContext *ctx;
int last_state;
gchar *tmp;
MSList *results=NULL;
bctbx_list_t *results=NULL;
GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
BuddyLookupRequest *req=(BuddyLookupRequest*)g_object_get_data(G_OBJECT(w),"buddylookup_request");
......@@ -178,7 +178,7 @@ static gboolean linphone_gtk_process_buddy_lookup(GtkWidget *w){
results);
gtk_progress_bar_set_fraction(pb,1);
tmp=g_strdup_printf(ngettext("Found %u contact", "Found %u contacts",
(unsigned int)ms_list_size(results)), (unsigned int)ms_list_size(results));
(unsigned int)bctbx_list_size(results)), (unsigned int)bctbx_list_size(results));
gtk_progress_bar_set_text(pb,tmp);
g_free(tmp);
sip_setup_context_buddy_lookup_free(ctx,req);
......@@ -227,11 +227,11 @@ void linphone_gtk_keyword_changed(GtkEditable *e){
g_object_set_data(G_OBJECT(w),"typing_timeout",GINT_TO_POINTER(tid));
}
static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results){
static void linphone_gtk_display_lookup_results(GtkWidget *w, const bctbx_list_t *results){
GtkTreeStore *store;
GtkTreeIter iter;
gchar *tmp;
const MSList *elem;
const bctbx_list_t *elem;
store=GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w)));
gtk_tree_store_clear(store);
disable_add_buddy_button(gtk_widget_get_toplevel(w));
......
......@@ -328,14 +328,14 @@ static void linphone_gtk_chat_message_destroy(LinphoneChatMessage *msg){
linphone_chat_message_destroy(msg);
}
void linphone_gtk_free_list(MSList *messages){
ms_list_for_each(messages,(void (*)(void*))linphone_gtk_chat_message_destroy);
ms_list_free(messages);
void linphone_gtk_free_list(bctbx_list_t *messages){
bctbx_list_for_each(messages,(void (*)(void*))linphone_gtk_chat_message_destroy);
bctbx_list_free(messages);
}
void display_history_message(GtkWidget *chat_view,MSList *messages,const LinphoneAddress *with){
void display_history_message(GtkWidget *chat_view,bctbx_list_t *messages,const LinphoneAddress *with){
if (messages != NULL){
MSList *it;
bctbx_list_t *it;
char *from_str;
char *with_str;
gchar *tmp;
......@@ -502,7 +502,7 @@ GtkWidget* linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddres
int idx;
GtkWidget *button;
GtkWidget *entry = linphone_gtk_get_widget(chat_view,"text_entry");
MSList *messages;
bctbx_list_t *messages;
GHashTable *table;
GtkTextTag *tmp_tag;
GtkWidget *link_ctx_menu = gtk_menu_new();
......@@ -588,7 +588,7 @@ void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,
char *from_str=linphone_address_as_string_uri_only(from);
char *uri_str=linphone_address_as_string(uri);
char *uri_only=linphone_address_as_string_uri_only(uri);
MSList *messages=NULL;
bctbx_list_t *messages=NULL;
if(g_strcmp0(from_str,uri_only)!=0){
GtkTextView *text_view=GTK_TEXT_VIEW(linphone_gtk_get_widget(chat_view,"textview"));
......
......@@ -571,14 +571,14 @@ static int friend_compare_func(const LinphoneFriend *lf1, const LinphoneFriend *
return w2-w1;
}
static MSList *sort_friend_list(const MSList *friends){
MSList *ret=NULL;
const MSList *elem;
static bctbx_list_t *sort_friend_list(const bctbx_list_t *friends){
bctbx_list_t *ret=NULL;
const bctbx_list_t *elem;
LinphoneFriend *lf;
for(elem=friends;elem!=NULL;elem=elem->next){
lf=(LinphoneFriend*)elem->data;
ret=ms_list_insert_sorted(ret,lf,(MSCompareFunc)friend_compare_func);
ret=bctbx_list_insert_sorted(ret,lf,(bctbx_compare_func)friend_compare_func);
}
return ret;
}
......@@ -669,9 +669,9 @@ void linphone_gtk_show_friends(void){
GtkWidget *friendlist=linphone_gtk_get_widget(mw,"contact_list");
GtkListStore *store=NULL;
GtkTreeIter iter;
const MSList *itf;
const bctbx_list_t *itf;
LinphoneCore *core=linphone_gtk_get_core();
MSList *sorted;
bctbx_list_t *sorted;
LinphoneChatRoom *cr=NULL;
linphone_gtk_show_directory_search();
......@@ -684,7 +684,7 @@ void linphone_gtk_show_friends(void){
sorted=sort_friend_list(linphone_core_get_friend_list(core));
for(itf=sorted;itf!=NULL;itf=ms_list_next(itf)){
for(itf=sorted;itf!=NULL;itf=bctbx_list_next(itf)){
LinphoneFriend *lf=(LinphoneFriend*)itf->data;
const LinphoneAddress *f_uri=linphone_friend_get_address(lf);
char *uri=linphone_address_as_string(f_uri);
......@@ -713,7 +713,7 @@ void linphone_gtk_show_friends(void){
g_free(escaped);
ms_free(uri);
}
ms_list_free(sorted);
bctbx_list_free(sorted);
}
void linphone_gtk_show_contact(LinphoneFriend *lf, GtkWidget *parent){
......
......@@ -39,9 +39,9 @@ LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf){
LinphoneCore *lc=linphone_gtk_get_core();
GtkWidget *main_window=linphone_gtk_get_main_window ();
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
const MSList *calls=linphone_core_get_calls(lc);
const bctbx_list_t *calls=linphone_core_get_calls(lc);
if (is_conf) *is_conf=FALSE;
if (!linphone_gtk_use_in_call_view() || ms_list_size(calls)==1){
if (!linphone_gtk_use_in_call_view() || bctbx_list_size(calls)==1){
if (calls) return (LinphoneCall*)calls->data;
}else{
int idx=gtk_notebook_get_current_page (notebook);
......@@ -134,7 +134,7 @@ void transfer_button_clicked(GtkWidget *button, gpointer call_ref){
GtkWidget *menu=gtk_menu_new();
LinphoneCall *call=(LinphoneCall*)call_ref;
LinphoneCore *lc=linphone_gtk_get_core();
const MSList *elem=linphone_core_get_calls(lc);
const bctbx_list_t *elem=linphone_core_get_calls(lc);
for(;elem!=NULL;elem=elem->next){
LinphoneCall *other_call=(LinphoneCall*)elem->data;
......@@ -158,7 +158,7 @@ void transfer_button_clicked(GtkWidget *button, gpointer call_ref){
}
void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value){
const MSList *elem=linphone_core_get_calls(lc);
const bctbx_list_t *elem=linphone_core_get_calls(lc);
for(;elem!=NULL;elem=elem->next){
LinphoneCall *call=(LinphoneCall*)elem->data;
GtkWidget *call_view=(GtkWidget*)linphone_call_get_user_pointer(call);
......@@ -177,7 +177,7 @@ static void conference_button_clicked(GtkWidget *button, gpointer call_ref){
}
void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value){
const MSList *elem=linphone_core_get_calls(lc);
const bctbx_list_t *elem=linphone_core_get_calls(lc);
for(;elem!=NULL;elem=elem->next){
LinphoneCall *call=(LinphoneCall*)elem->data;
GtkWidget *call_view=(GtkWidget*)linphone_call_get_user_pointer(call);
......@@ -413,7 +413,7 @@ void linphone_gtk_create_in_call_view(LinphoneCall *call){
GtkWidget *button;
GtkWidget *image;
if (ms_list_size(linphone_core_get_calls(linphone_gtk_get_core()))==1){
if (bctbx_list_size(linphone_core_get_calls(linphone_gtk_get_core()))==1){
/*this is the only call at this time */
call_index=1;
}
......
......@@ -645,7 +645,7 @@ static void completion_add_text(GtkEntry *entry, const char *text){
save_uri_history();
}
void on_contact_provider_search_results( LinphoneContactSearch* req, MSList* friends, void* data )
void on_contact_provider_search_results( LinphoneContactSearch* req, bctbx_list_t* friends, void* data )
{
GtkTreeIter iter;
GtkEntry* uribar = GTK_ENTRY(data);
......@@ -793,10 +793,10 @@ void linphone_gtk_call_terminated(LinphoneCall *call, const char *error){
static void linphone_gtk_update_call_buttons(LinphoneCall *call){
LinphoneCore *lc=linphone_gtk_get_core();
GtkWidget *mw=linphone_gtk_get_main_window();
const MSList *calls=linphone_core_get_calls(lc);
const bctbx_list_t *calls=linphone_core_get_calls(lc);
GtkWidget *button;
bool_t add_call=(calls!=NULL);
int call_list_size=ms_list_size(calls);
int call_list_size=bctbx_list_size(calls);
GtkWidget *conf_frame;
button=linphone_gtk_get_widget(mw,"start_call");
......@@ -1022,7 +1022,7 @@ void linphone_gtk_used_identity_changed(GtkWidget *w){
void on_proxy_refresh_button_clicked(GtkWidget *w){
LinphoneCore *lc=linphone_gtk_get_core();
MSList const *item=linphone_core_get_proxy_config_list(lc);
bctbx_list_t const *item=linphone_core_get_proxy_config_list(lc);
while (item != NULL) {
LinphoneProxyConfig *lpc=(LinphoneProxyConfig*)item->data;
linphone_proxy_config_edit(lpc);
......@@ -1605,7 +1605,7 @@ static void init_identity_combo(GtkComboBox *box){
}
void linphone_gtk_load_identities(void){
const MSList *elem;
const bctbx_list_t *elem;
GtkComboBox *box=GTK_COMBO_BOX(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"identities"));
char *def_identity;
LinphoneProxyConfig *def=NULL;
......@@ -1627,7 +1627,7 @@ void linphone_gtk_load_identities(void){
g_free(def_identity);
for(i=1,elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());
elem!=NULL;
elem=ms_list_next(elem),i++){
elem=bctbx_list_next(elem),i++){
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
gtk_list_store_append(store,&iter);
gtk_list_store_set(store,&iter,0,linphone_proxy_config_get_identity(cfg),1,
......@@ -1679,7 +1679,7 @@ static void linphone_gtk_check_menu_items(void){
static gboolean linphone_gtk_can_manage_accounts(void){
LinphoneCore *lc=linphone_gtk_get_core();
const MSList *elem;
const bctbx_list_t *elem;
for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
SipSetup *ss=(SipSetup*)elem->data;
if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
......
......@@ -648,9 +648,9 @@ const char *get_codec_color(LinphoneCore *lc, PayloadType *pt){
return color;
}
static void linphone_gtk_show_codecs(GtkTreeView *listview, const MSList *codeclist)
static void linphone_gtk_show_codecs(GtkTreeView *listview, const bctbx_list_t *codeclist)
{
const MSList *elem;
const bctbx_list_t *elem;
GtkTreeIter iter;
GtkListStore *store=GTK_LIST_STORE(gtk_tree_view_get_model(listview));
// GtkTreeSelection *selection;
......@@ -733,7 +733,7 @@ static void linphone_gtk_select_codec(GtkTreeView *v, PayloadType *ref){
}
static void linphone_gtk_draw_codec_list(GtkTreeView *v, int type){ /* 0=audio, 1=video*/
const MSList *list;
const bctbx_list_t *list;
if (type==0) list=linphone_core_get_audio_codecs(linphone_gtk_get_core());
else list=linphone_core_get_video_codecs(linphone_gtk_get_core());
linphone_gtk_show_codecs(v,list);
......@@ -784,8 +784,8 @@ static void linphone_gtk_codec_move(GtkWidget *button, int dir, int type){ /* 0=
else v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"video_codec_list"));
sel=gtk_tree_view_get_selection(v);
if (gtk_tree_selection_count_selected_rows(sel) == 1){
MSList *sel_elem,*before;
MSList *codec_list;
bctbx_list_t *sel_elem,*before;
bctbx_list_t *codec_list;
GList *selected_rows = gtk_tree_selection_get_selected_rows(sel, &mod);
gtk_tree_model_get_iter(mod, &iter, (GtkTreePath *)g_list_nth_data(selected_rows, 0));
......@@ -794,20 +794,20 @@ static void linphone_gtk_codec_move(GtkWidget *button, int dir, int type){ /* 0=
g_list_free(selected_rows);
if (pt->type==PAYLOAD_VIDEO)
codec_list=ms_list_copy(linphone_core_get_video_codecs(lc));
else codec_list=ms_list_copy(linphone_core_get_audio_codecs(lc));
sel_elem=ms_list_find(codec_list,pt);
codec_list=bctbx_list_copy(linphone_core_get_video_codecs(lc));
else codec_list=bctbx_list_copy(linphone_core_get_audio_codecs(lc));
sel_elem=bctbx_list_find(codec_list,pt);
if (dir>0) {
if (sel_elem->prev) before=sel_elem->prev;
else before=sel_elem;
codec_list=ms_list_insert(codec_list,before,pt);
codec_list=bctbx_list_insert(codec_list,before,pt);
}
else{
if (sel_elem->next) before=sel_elem->next->next;
else before=sel_elem;
codec_list=ms_list_insert(codec_list,before,pt);
codec_list=bctbx_list_insert(codec_list,before,pt);
}
codec_list=ms_list_remove_link(codec_list,sel_elem);
codec_list=bctbx_list_remove_link(codec_list,sel_elem);
if (pt->type==PAYLOAD_VIDEO)
linphone_core_set_video_codecs(lc,codec_list);
else linphone_core_set_audio_codecs(lc,codec_list);
......@@ -889,7 +889,7 @@ void linphone_gtk_show_sip_accounts(GtkWidget *w){
const LinphoneProxyConfig *default_pc = linphone_core_get_default_proxy_config(linphone_gtk_get_core());
GtkTreePath *default_pc_path = NULL;
const MSList *elem;
const bctbx_list_t *elem;
if (!model){
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
......@@ -912,7 +912,7 @@ void linphone_gtk_show_sip_accounts(GtkWidget *w){
store=GTK_LIST_STORE(model);
}
gtk_list_store_clear(store);
for(elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());elem!=NULL;elem=ms_list_next(elem)){
for(elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());elem!=NULL;elem=bctbx_list_next(elem)){
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
GtkTreeIter iter;
gtk_list_store_append(store,&iter);
......@@ -1429,8 +1429,8 @@ void linphone_gtk_fill_video_renderers(GtkWidget *pb){
LinphoneCore *lc=linphone_gtk_get_core();
MSFactory *factory = linphone_core_get_ms_factory(lc);
GtkWidget *combo=linphone_gtk_get_widget(pb,"renderers");
MSList *l=ms_factory_lookup_filter_by_interface(factory, MSFilterVideoDisplayInterface);
MSList *elem;
bctbx_list_t *l=ms_factory_lookup_filter_by_interface(factory, MSFilterVideoDisplayInterface);
bctbx_list_t *elem;
int i;
int active=-1;
const char *current_renderer=linphone_core_get_video_display_filter(lc);
......@@ -1460,7 +1460,7 @@ void linphone_gtk_fill_video_renderers(GtkWidget *pb){
i++;
}
ms_list_free(l);
bctbx_list_free(l);
if (active!=-1) gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active);
#endif
}
......@@ -1783,7 +1783,7 @@ void linphone_gtk_edit_tunnel(GtkButton *button){
GtkWidget *w=linphone_gtk_create_window("tunnel_config", gtk_widget_get_toplevel(GTK_WIDGET(button)));
LinphoneCore *lc=linphone_gtk_get_core();
LinphoneTunnel *tunnel=linphone_core_get_tunnel(lc);
const MSList *configs;
const bctbx_list_t *configs;
const char *host = NULL;
int port=0;
......
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