Changeset 265:88b8d3563d77 in mediastreamer2
- Timestamp:
- Feb 24, 2009 5:32:22 PM (4 years ago)
- Branch:
- default
- Location:
- linphone
- Files:
-
- 3 added
- 1 deleted
- 5 edited
-
coreapi/sipsetup.c (modified) (4 diffs)
-
coreapi/sipsetup.h (modified) (5 diffs)
-
gtk-glade/Makefile.am (modified) (3 diffs)
-
gtk-glade/buddylookup.c (added)
-
gtk-glade/buddylookup.glade (added)
-
gtk-glade/gtk-linphone.glade (deleted)
-
mediastreamer2/src/mssndcard.c (modified) (3 diffs)
-
po/POTFILES.in (modified) (4 diffs)
-
po/POTFILES.skip (added)
Legend:
- Unmodified
- Added
- Removed
-
linphone/coreapi/sipsetup.c
r262 r265 25 25 #endif 26 26 27 static SipSetup *all_sip_setups[]={ 28 #ifdef HAVE_FONIS 29 &fonis_sip_setup, 30 #endif 31 NULL 32 }; 33 27 34 void sip_setup_register_all(void){ 28 35 } 29 36 30 37 SipSetup *sip_setup_lookup(const char *type_name){ 31 #ifdef HAVE_FONIS 32 if (strcmp(type_name,"fonis")==0){ 33 if (!fonis_sip_setup.initialized){ 34 if (fonis_sip_setup.init()){ 35 fonis_sip_setup.initialized=TRUE; 38 SipSetup **p=all_sip_setups; 39 while(*p!=NULL){ 40 if ( strcmp((*p)->name,type_name)==0){ 41 if (!(*p)->initialized){ 42 (*p)->init(); 43 (*p)->initialized=TRUE; 44 if ((*p)->capabilities==0){ 45 ms_error("%s SipSetup isn't capable of anything ?"); 46 } 36 47 } 48 return *p; 37 49 } 38 return &fonis_sip_setup;39 50 } 40 #endif41 51 ms_warning("no %s setup manager declared.",type_name); 42 52 return NULL; … … 44 54 45 55 void sip_setup_unregister_all(void){ 46 #ifdef HAVE_FONIS 47 if (fonis_sip_setup.initialized) 48 fonis_sip_setup.exit(); 49 #endif 56 SipSetup **p=all_sip_setups; 57 while(*p!=NULL){ 58 if ((*p)->initialized){ 59 (*p)->exit(); 60 (*p)->initialized=FALSE; 61 } 62 } 50 63 } 51 64 … … 55 68 obj->funcs=s; 56 69 obj->data=NULL; 70 if (obj->funcs->init_instance){ 71 obj->funcs->init_instance(obj); 72 } 57 73 return obj; 58 74 } … … 94 110 } 95 111 96 int sip_setup_context_lookup_buddy(SipSetupContext *ctx, const char *key , BuddyInfo *binfo){112 int sip_setup_context_lookup_buddy(SipSetupContext *ctx, const char *key){ 97 113 if (ctx->funcs->lookup_buddy) 98 return ctx->funcs->lookup_buddy(ctx,key,binfo); 114 return ctx->funcs->lookup_buddy(ctx,key); 115 return -1; 116 } 117 118 BuddyLookupStatus sip_setup_context_get_buddy_lookup_status(SipSetupContext *ctx){ 119 if (ctx->funcs->get_buddy_lookup_status) 120 return ctx->funcs->get_buddy_lookup_status(ctx); 121 return BuddyLookupFailure; 122 } 123 124 int sip_setup_context_get_buddy_lookup_results(SipSetupContext *ctx, MSList **results /*of BuddyInfo */){ 125 if (ctx->funcs->get_buddy_lookup_results) 126 return ctx->funcs->get_buddy_lookup_results(ctx,results); 99 127 return -1; 100 128 } -
linphone/coreapi/sipsetup.h
r262 r265 27 27 struct _BuddyInfo; 28 28 29 29 30 struct _SipSetupContext{ 30 31 struct _SipSetup *funcs; … … 36 37 typedef struct _SipSetupContext SipSetupContext; 37 38 39 #define SIP_SETUP_CAP_PROXY_PROVIDER (1) 40 #define SIP_SETUP_CAP_STUN_PROVIDER (1<<1) 41 #define SIP_SETUP_CAP_RELAY_PROVIDER (1<<2) 42 #define SIP_SETUP_CAP_BUDDY_LOOKUP (1<<3) 43 #define SIP_SETUP_CAP_ACCOUNT_MANAGER (1<<4) 44 45 38 46 struct _SipSetup{ 39 47 char *name; 48 unsigned int capabilities; 40 49 bool_t (*init)(void); 50 int (*init_instance)(SipSetupContext *ctx); 41 51 int (*create_account)( const char *uri, const char *passwd); 42 52 int (*login_account)(SipSetupContext *ctx, const char *uri, const char *passwd); … … 44 54 int (*get_stun_servers)(SipSetupContext *ctx, char *stun1, char *stun2, size_t size); 45 55 int (*get_relay)(SipSetupContext *ctx, char *relay, size_t size); 46 int (*lookup_buddy)(SipSetupContext *ctx, const char *key, struct _BuddyInfo *info); 56 int (*lookup_buddy)(SipSetupContext *ctx, const char *key); 57 int (*get_buddy_lookup_status)(SipSetupContext *ctx); 58 int (*get_buddy_lookup_results)(SipSetupContext *ctx, MSList **results); 47 59 void (*exit)(void); 48 60 bool_t initialized; … … 66 78 }BuddyInfo; 67 79 80 typedef enum _BuddyLookupStatus{ 81 BuddyLookupNone, 82 BuddyLookupConnecting, 83 BuddyLookupConnected, 84 BuddyLookupReceivingResponse, 85 BuddyLookupDone, 86 BuddyLookupFailure 87 }BuddyLookupStatus; 88 68 89 void sip_setup_register_all(void); 69 90 SipSetup *sip_setup_lookup(const char *type_name); … … 72 93 int sip_setup_new_account(SipSetup *s, const char *uri, const char *passwd); 73 94 SipSetupContext * sip_setup_context_new(SipSetup *s); 95 int sip_setup_context_get_capabilities(SipSetupContext *ctx); 74 96 int sip_setup_context_login_account(SipSetupContext * ctx, const char *uri, const char *passwd); 75 97 int sip_setup_context_get_proxy(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz); 76 98 int sip_setup_context_get_stun_servers(SipSetupContext *ctx, char *stun1, char *stun2, size_t size); 77 int sip_setup_context_get_relay(SipSetupContext *ctx,char *relay, size_t size); 78 int sip_setup_context_lookup_buddy(SipSetupContext *ctx, const char *key, BuddyInfo *binfo); 99 int sip_setup_context_get_relay(SipSetupContext *ctx, char *relay, size_t size); 100 int sip_setup_context_lookup_buddy(SipSetupContext *ctx, const char *key); 101 BuddyLookupStatus sip_setup_context_get_buddy_lookup_status(SipSetupContext *ctx); 102 int sip_setup_context_get_buddy_lookup_results(SipSetupContext *ctx, MSList **results /*of BuddyInfo */); 79 103 void sip_setup_context_free(SipSetupContext *ctx); 80 104 #endif -
linphone/gtk-glade/Makefile.am
r215 r265 1 1 GLADE_FILES= about.glade \ 2 gtk-linphone.glade \3 2 main.glade \ 4 3 password.glade \ … … 9 8 chatroom.glade \ 10 9 call_logs.glade \ 11 log.glade 10 log.glade \ 11 buddylookup.glade 12 12 13 13 PIXMAPS= linphone2.png \ … … 32 32 logging.c \ 33 33 update.c \ 34 buddylookup.c \ 34 35 linphone.h 35 36 -
linphone/mediastreamer2/src/mssndcard.c
r253 r265 61 61 for (elem=m->cards;elem!=NULL;elem=elem->next){ 62 62 MSSndCard *card=(MSSndCard*)elem->data; 63 if (card->capabilities==(MS_SND_CARD_CAP_CAPTURE|MS_SND_CARD_CAP_PLAYBACK)) 63 if ((card->capabilities & MS_SND_CARD_CAP_CAPTURE ) 64 && (card->capabilities & MS_SND_CARD_CAP_PLAYBACK)) 64 65 return card; 65 66 } … … 71 72 for (elem=m->cards;elem!=NULL;elem=elem->next){ 72 73 MSSndCard *card=(MSSndCard*)elem->data; 73 if (card->capabilities==(MS_SND_CARD_CAP_CAPTURE|MS_SND_CARD_CAP_PLAYBACK) 74 ||card->capabilities==MS_SND_CARD_CAP_CAPTURE) 74 if (card->capabilities & MS_SND_CARD_CAP_CAPTURE) 75 75 return card; 76 76 } … … 82 82 for (elem=m->cards;elem!=NULL;elem=elem->next){ 83 83 MSSndCard *card=(MSSndCard*)elem->data; 84 if (card->capabilities==(MS_SND_CARD_CAP_CAPTURE|MS_SND_CARD_CAP_PLAYBACK) 85 ||card->capabilities==MS_SND_CARD_CAP_PLAYBACK) 84 if (card->capabilities & MS_SND_CARD_CAP_PLAYBACK) 86 85 return card; 87 86 } -
linphone/po/POTFILES.in
r235 r265 8 8 gtk-glade/propertybox.c 9 9 gtk-glade/update.c 10 gtk-glade/buddylookup.c 10 11 gtk-glade/main.glade 11 12 gtk-glade/about.glade … … 19 20 gtk-glade/incoming_call.glade 20 21 gtk-glade/parameters.glade 22 gtk-glade/buddylookup.glade 21 23 coreapi/linphonecore.c 22 24 coreapi/misc.c … … 24 26 coreapi/presence.c 25 27 coreapi/friend.c 28 coreapi/proxy.c 26 29 mediastreamer2/src/alaw.c 27 30 mediastreamer2/src/alsa.c … … 45 48 mediastreamer2/src/oss.c 46 49 mediastreamer2/src/pixconv.c 47 mediastreamer2/src/sdlout.c48 50 mediastreamer2/src/sizeconv.c 49 51 mediastreamer2/src/speexec.c
Note: See TracChangeset
for help on using the changeset viewer.
