Changeset 371:61a33d6c8868 in mediastreamer2
- Timestamp:
- Mar 27, 2009 11:20:07 PM (4 years ago)
- Branch:
- default
- Location:
- linphone
- Files:
-
- 2 added
- 11 edited
-
coreapi/linphonecore.c (modified) (2 diffs)
-
coreapi/linphonecore.h (modified) (5 diffs)
-
coreapi/private.h (modified) (1 diff)
-
coreapi/proxy.c (modified) (4 diffs)
-
coreapi/sipsetup.c (modified) (1 diff)
-
coreapi/sipsetup.h (modified) (2 diffs)
-
gtk-glade/Makefile.am (modified) (2 diffs)
-
gtk-glade/linphone.h (modified) (1 diff)
-
gtk-glade/main.c (modified) (1 diff)
-
gtk-glade/utils.c (added)
-
gtk-glade/waiting.glade (added)
-
mediastreamer2/configure.ac (modified) (1 diff)
-
mediastreamer2/tests/Makefile.am (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
linphone/coreapi/linphonecore.c
r364 r371 1028 1028 } 1029 1029 } 1030 1031 ms_list_for_each(lc->sip_conf.proxies,(void (*)(void*))&linphone_proxy_config_update); 1032 1030 1033 if (lc->call!=NULL){ 1031 1034 LinphoneCall *call=lc->call; … … 2299 2302 } 2300 2303 2304 void linphone_core_start_waiting(LinphoneCore *lc, const char *purpose){ 2305 if (lc->vtable.waiting){ 2306 lc->wait_ctx=lc->vtable.waiting(lc,NULL,LinphoneWaitingStart,purpose,0); 2307 } 2308 } 2309 2310 void linphone_core_update_progress(LinphoneCore *lc, const char *purpose, float progress){ 2311 if (lc->vtable.waiting){ 2312 lc->wait_ctx=lc->vtable.waiting(lc,lc->wait_ctx,LinphoneWaitingProgress,purpose,progress); 2313 }else{ 2314 #ifdef WIN32 2315 Sleep(50000); 2316 #else 2317 usleep(50000); 2318 #endif 2319 } 2320 } 2321 2322 void linphone_core_stop_waiting(LinphoneCore *lc){ 2323 if (lc->vtable.waiting){ 2324 lc->wait_ctx=lc->vtable.waiting(lc,lc->wait_ctx,LinphoneWaitingFinished,NULL,0); 2325 } 2326 } 2327 2328 2301 2329 void net_config_uninit(LinphoneCore *lc) 2302 2330 { -
linphone/coreapi/linphonecore.h
r354 r371 296 296 struct _SipSetupContext *ssctx; 297 297 int auth_failures; 298 bool_t frozen;298 bool_t commit; 299 299 bool_t reg_sendregister; 300 300 bool_t registered; … … 419 419 typedef void (*GeneralStateChange)(struct _LinphoneCore *lc, LinphoneGeneralState *gstate); 420 420 typedef void (*DtmfReceived)(struct _LinphoneCore* lc, int dtmf); 421 typedef enum _LinphoneWaitingState{ 422 LinphoneWaitingStart, 423 LinphoneWaitingProgress, 424 LinphoneWaitingFinished 425 } LinphoneWaitingState; 426 typedef void * (*Waiting)(struct _LinphoneCore *lc, void *context, LinphoneWaitingState ws, const char *purpose, float progress); 421 427 422 428 typedef struct _LinphoneVTable … … 441 447 GeneralStateChange general_state; 442 448 DtmfReceived dtmf_received; 449 Waiting waiting; 443 450 } LinphoneCoreVTable; 444 451 … … 505 512 gstate_t gstate_reg; 506 513 gstate_t gstate_call; 514 void *wait_ctx; 507 515 bool_t use_files; 508 516 bool_t apply_nat_settings; … … 768 776 const char * linphone_core_get_route(LinphoneCore *lc); 769 777 bool_t linphone_core_interpret_url(LinphoneCore *lc, const char *url, char **real_url, osip_to_t **real_parsed_url, char **route); 778 void linphone_core_start_waiting(LinphoneCore *lc, const char *purpose); 779 void linphone_core_update_progress(LinphoneCore *lc, const char *purpose, float progresses); 780 void linphone_core_stop_waiting(LinphoneCore *lc); 781 770 782 771 783 #ifdef __cplusplus -
linphone/coreapi/private.h
r346 r371 128 128 129 129 void linphone_core_write_friends_config(LinphoneCore* lc); 130 void linphone_proxy_config_update(LinphoneProxyConfig *cfg); 130 131 131 132 #endif /* _PRIVATE_H */ -
linphone/coreapi/proxy.c
r355 r371 219 219 220 220 void linphone_proxy_config_edit(LinphoneProxyConfig *obj){ 221 obj->frozen=TRUE;222 221 obj->auth_failures=0; 223 222 if (obj->reg_sendregister){ … … 256 255 { 257 256 if (!linphone_proxy_config_check(obj->lc,obj)) return -1; 258 obj-> frozen=FALSE;257 obj->commit=TRUE; 259 258 linphone_proxy_config_register(obj); 260 259 linphone_proxy_config_write_all_to_config_file(obj->lc); … … 589 588 } 590 589 591 592 void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type){ 593 SipSetup *ss=sip_setup_lookup(type); 590 static void linphone_proxy_config_activate_sip_setup(LinphoneProxyConfig *cfg){ 594 591 SipSetupContext *ssc; 595 if (cfg->type) 596 ms_free(cfg->type); 597 cfg->type=ms_strdup(type); 592 SipSetup *ss=sip_setup_lookup(cfg->type); 598 593 if (!ss) return ; 599 594 ssc=sip_setup_context_new(ss,cfg); 595 596 if (cfg->reg_identity==NULL){ 597 ms_error("Invalid identity for this proxy configuration."); 598 return; 599 } 600 600 if (sip_setup_context_login_account(ssc,cfg->reg_identity,NULL)==0){ 601 601 if (sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_PROXY_PROVIDER){ … … 609 609 } 610 610 611 void linphone_proxy_config_update(LinphoneProxyConfig *cfg){ 612 if (cfg->commit){ 613 if (cfg->type && cfg->ssctx==NULL){ 614 linphone_proxy_config_activate_sip_setup(cfg); 615 } 616 cfg->commit=FALSE; 617 } 618 } 619 620 void linphone_proxy_config_set_sip_setup(LinphoneProxyConfig *cfg, const char *type){ 621 if (cfg->type) 622 ms_free(cfg->type); 623 cfg->type=ms_strdup(type); 624 if (linphone_proxy_config_get_addr(cfg)==NULL){ 625 /*put a placeholder so that the sip setup gets saved into the config */ 626 linphone_proxy_config_set_server_addr(cfg,"sip:undefined"); 627 } 628 } 629 611 630 SipSetupContext *linphone_proxy_config_get_sip_setup_context(LinphoneProxyConfig *cfg){ 612 631 return cfg->ssctx; -
linphone/coreapi/sipsetup.c
r344 r371 99 99 } 100 100 101 int sip_setup_ new_account(SipSetup *funcs, const char *uri, const char *passwd){102 if ( funcs->create_account)103 return funcs->create_account(uri, passwd);101 int sip_setup_context_create_account(SipSetupContext * ctx, const char *uri, const char *passwd){ 102 if (ctx->funcs->create_account) 103 return ctx->funcs->create_account(ctx,uri, passwd); 104 104 else return -1; 105 105 } -
linphone/coreapi/sipsetup.h
r318 r371 76 76 bool_t (*init)(void); 77 77 void (*init_instance)(SipSetupContext *ctx); 78 int (*create_account)( const char *uri, const char *passwd);78 int (*create_account)(SipSetupContext *ctx, const char *uri, const char *passwd); 79 79 int (*login_account)(SipSetupContext *ctx, const char *uri, const char *passwd); 80 80 int (*get_proxy)(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz); … … 101 101 void sip_setup_unregister_all(void); 102 102 103 int sip_setup_new_account(SipSetup *s, const char *uri, const char *passwd);104 103 SipSetupContext * sip_setup_context_new(SipSetup *s, struct _LinphoneProxyConfig *cfg); 104 int sip_setup_context_create_account(SipSetupContext *ctx, const char *uri, const char *passwd); 105 105 int sip_setup_context_get_capabilities(SipSetupContext *ctx); 106 106 int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd); -
linphone/gtk-glade/Makefile.am
r293 r371 9 9 call_logs.glade \ 10 10 log.glade \ 11 buddylookup.glade 11 buddylookup.glade \ 12 waiting.glade 12 13 13 14 PIXMAPS= linphone2.png \ … … 33 34 update.c \ 34 35 buddylookup.c \ 36 utils.c \ 35 37 linphone.h 36 38 -
linphone/gtk-glade/linphone.h
r340 r371 69 69 SipSetupContext* linphone_gtk_get_default_sip_setup_context(void); 70 70 void linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx); 71 void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress); -
linphone/gtk-glade/main.c
r341 r371 75 75 .call_log_updated=linphone_gtk_call_log_updated, 76 76 .text_received=linphone_gtk_text_received, 77 .general_state=linphone_gtk_general_state 77 .general_state=linphone_gtk_general_state, 78 .waiting=linphone_gtk_wait 78 79 }; 79 80 -
linphone/mediastreamer2/configure.ac
r353 r371 45 45 [ --enable-strict Enable error on compilation warning [default=no]], 46 46 [wall_werror=$enableval], 47 [wall_werror=yes] 47 [ 48 if test "$USER" = "smorlat" ; then 49 wall_werror=yes 50 else 51 wall_werror=no 52 fi 53 ] 48 54 ) 49 55 -
linphone/mediastreamer2/tests/Makefile.am
r348 r371 9 9 videodisplay_SOURCES=videodisplay.c 10 10 mtudiscover_SOURCES=mtudiscover.c 11 be cnh_SOURCES=bench.c11 bench_SOURCES=bench.c 12 12 13 13 libexec_PROGRAMS=mediastream
Note: See TracChangeset
for help on using the changeset viewer.
