mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-03 20:46:28 +00:00
work in progress, bugfixes, enrich OPTIONS responses.
git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@296 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
This commit is contained in:
parent
88c9e7e7d0
commit
d55430f351
7 changed files with 62 additions and 32 deletions
|
|
@ -36,7 +36,7 @@ linphonecsh_LDADD = $(ORTP_LIBS)
|
|||
|
||||
endif
|
||||
|
||||
AM_CFLAGS=$(STRICT_OPTIONS) -DENABLE_TRACE -D_ORTP_SOURCE $(VIDEO_CFLAGS) $(READLINE_CFLAGS) $(OSIP_CFLAGS)
|
||||
AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE -DENABLE_TRACE -D_ORTP_SOURCE $(VIDEO_CFLAGS) $(READLINE_CFLAGS) $(OSIP_CFLAGS)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ liblinphone_la_LIBADD= \
|
|||
$(top_builddir)/mediastreamer2/src/libmediastreamer.la
|
||||
|
||||
|
||||
AM_CFLAGS=$(STRICT_OPTIONS) \
|
||||
AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE \
|
||||
$(OSIP_CFLAGS) \
|
||||
$(EXOSIP_CFLAGS) \
|
||||
$(ORTP_CFLAGS) \
|
||||
|
|
|
|||
|
|
@ -964,7 +964,15 @@ static void linphone_other_request(LinphoneCore *lc, eXosip_event_t *ev){
|
|||
linphone_core_text_received(lc,ev);
|
||||
eXosip_message_send_answer(ev->tid,200,NULL);
|
||||
}else if (strcmp(ev->request->sip_method,"OPTIONS")==0){
|
||||
eXosip_options_send_answer(ev->tid,200,NULL);
|
||||
#if 1
|
||||
osip_message_t *options=NULL;
|
||||
eXosip_options_build_answer(ev->tid,200,&options);
|
||||
osip_message_set_allow(options,"INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, SUBSCRIBE, NOTIFY, INFO");
|
||||
osip_message_set_accept(options,"application/sdp");
|
||||
eXosip_options_send_answer(ev->tid,200,options);
|
||||
#else
|
||||
ms_warning("Not answering to this options request.");
|
||||
#endif
|
||||
}else if (strcmp(ev->request->sip_method,"WAKEUP")==0
|
||||
&& comes_from_local_if(ev->request)) {
|
||||
eXosip_message_send_answer(ev->tid,200,NULL);
|
||||
|
|
@ -972,7 +980,13 @@ static void linphone_other_request(LinphoneCore *lc, eXosip_event_t *ev){
|
|||
if (lc->vtable.show)
|
||||
lc->vtable.show(lc);
|
||||
}else {
|
||||
ms_message("Unsupported request received.");
|
||||
char *tmp=NULL;
|
||||
size_t msglen=0;
|
||||
osip_message_to_str(ev->request,&tmp,&msglen);
|
||||
if (tmp){
|
||||
ms_message("Unsupported request received:\n%s",tmp);
|
||||
osip_free(tmp);
|
||||
}
|
||||
/*answer with a 501 Not implemented*/
|
||||
eXosip_message_send_answer(ev->tid,501,NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2314,6 +2314,7 @@ void sound_config_uninit(LinphoneCore *lc)
|
|||
|
||||
if (config->local_ring) ms_free(config->local_ring);
|
||||
if (config->remote_ring) ms_free(config->remote_ring);
|
||||
ms_snd_card_manager_destroy();
|
||||
}
|
||||
|
||||
void video_config_uninit(LinphoneCore *lc)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "ortp/payloadtype.h"
|
||||
#include "mediastreamer2/mscommon.h"
|
||||
#include "mediastreamer2/msvideo.h"
|
||||
|
||||
#ifdef IN_LINPHONE
|
||||
#include "sipsetup.h"
|
||||
#else
|
||||
#include "linphone/sipsetup.h"
|
||||
#endif
|
||||
|
||||
#define LINPHONE_IPADDR_SIZE 64
|
||||
#define LINPHONE_HOSTNAME_SIZE 128
|
||||
|
|
|
|||
|
|
@ -43,25 +43,14 @@ typedef struct _SipSetupContext SipSetupContext;
|
|||
#define SIP_SETUP_CAP_BUDDY_LOOKUP (1<<3)
|
||||
#define SIP_SETUP_CAP_ACCOUNT_MANAGER (1<<4)
|
||||
|
||||
|
||||
struct _SipSetup{
|
||||
char *name;
|
||||
unsigned int capabilities;
|
||||
bool_t (*init)(void);
|
||||
int (*init_instance)(SipSetupContext *ctx);
|
||||
int (*create_account)( const char *uri, const char *passwd);
|
||||
int (*login_account)(SipSetupContext *ctx, const char *uri, const char *passwd);
|
||||
int (*get_proxy)(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz);
|
||||
int (*get_stun_servers)(SipSetupContext *ctx, char *stun1, char *stun2, size_t size);
|
||||
int (*get_relay)(SipSetupContext *ctx, char *relay, size_t size);
|
||||
int (*lookup_buddy)(SipSetupContext *ctx, const char *key);
|
||||
int (*get_buddy_lookup_status)(SipSetupContext *ctx);
|
||||
int (*get_buddy_lookup_results)(SipSetupContext *ctx, MSList **results);
|
||||
void (*exit)(void);
|
||||
bool_t initialized;
|
||||
};
|
||||
|
||||
typedef struct _SipSetup SipSetup;
|
||||
typedef enum _BuddyLookupStatus{
|
||||
BuddyLookupNone,
|
||||
BuddyLookupConnecting,
|
||||
BuddyLookupConnected,
|
||||
BuddyLookupReceivingResponse,
|
||||
BuddyLookupDone,
|
||||
BuddyLookupFailure
|
||||
}BuddyLookupStatus;
|
||||
|
||||
typedef struct _BuddyAddress{
|
||||
char street[64];
|
||||
|
|
@ -78,14 +67,30 @@ typedef struct _BuddyInfo{
|
|||
BuddyAddress address;
|
||||
}BuddyInfo;
|
||||
|
||||
typedef enum _BuddyLookupStatus{
|
||||
BuddyLookupNone,
|
||||
BuddyLookupConnecting,
|
||||
BuddyLookupConnected,
|
||||
BuddyLookupReceivingResponse,
|
||||
BuddyLookupDone,
|
||||
BuddyLookupFailure
|
||||
}BuddyLookupStatus;
|
||||
|
||||
struct _SipSetup{
|
||||
char *name;
|
||||
unsigned int capabilities;
|
||||
bool_t (*init)(void);
|
||||
int (*init_instance)(SipSetupContext *ctx);
|
||||
int (*create_account)( const char *uri, const char *passwd);
|
||||
int (*login_account)(SipSetupContext *ctx, const char *uri, const char *passwd);
|
||||
int (*get_proxy)(SipSetupContext *ctx, const char *domain, char *proxy, size_t sz);
|
||||
int (*get_stun_servers)(SipSetupContext *ctx, char *stun1, char *stun2, size_t size);
|
||||
int (*get_relay)(SipSetupContext *ctx, char *relay, size_t size);
|
||||
int (*lookup_buddy)(SipSetupContext *ctx, const char *key);
|
||||
BuddyLookupStatus (*get_buddy_lookup_status)(SipSetupContext *ctx);
|
||||
int (*get_buddy_lookup_results)(SipSetupContext *ctx, MSList **results);
|
||||
void (*exit)(void);
|
||||
bool_t initialized;
|
||||
};
|
||||
|
||||
typedef struct _SipSetup SipSetup;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"{
|
||||
#endif
|
||||
|
||||
void sip_setup_register(SipSetup *ss);
|
||||
void sip_setup_register_all(void);
|
||||
|
|
@ -104,6 +109,11 @@ BuddyLookupStatus sip_setup_context_get_buddy_lookup_status(SipSetupContext *ctx
|
|||
int sip_setup_context_get_buddy_lookup_results(SipSetupContext *ctx, MSList **results /*of BuddyInfo */);
|
||||
void sip_setup_context_free_results(MSList *results);
|
||||
void sip_setup_context_free(SipSetupContext *ctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ glade_DATA=$(GLADE_FILES) $(PIXMAPS)
|
|||
endif
|
||||
|
||||
|
||||
AM_CFLAGS= -I$(top_srcdir)/coreapi/ \
|
||||
AM_CFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ \
|
||||
-I$(top_srcdir)/mediastreamer2/include/ \
|
||||
$(LIBGLADE_CFLAGS) $(STRICT_OPTIONS) $(LIBGTK_CFLAGS) $(IPV6_CFLAGS) \
|
||||
$(ORTP_CFLAGS) $(OSIP_CFLAGS)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue