mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Fix compilation for Windows Phone 8.
This commit is contained in:
parent
3e8f8fc41f
commit
e41203a4c5
10 changed files with 53 additions and 40 deletions
|
|
@ -210,7 +210,7 @@ LINPHONE_PUBLIC LinphoneReason linphone_event_get_reason(const LinphoneEvent *le
|
|||
/**
|
||||
* Get full details about an error occured.
|
||||
**/
|
||||
const LinphoneErrorInfo *linphone_event_get_error_info(const LinphoneEvent *lev);
|
||||
LINPHONE_PUBLIC const LinphoneErrorInfo *linphone_event_get_error_info(const LinphoneEvent *lev);
|
||||
|
||||
/**
|
||||
* Get subscription state. If the event object was not created by a subscription mechanism, #LinphoneSubscriptionNone is returned.
|
||||
|
|
|
|||
|
|
@ -875,7 +875,7 @@ LINPHONE_PUBLIC const char *linphone_proxy_config_get_quality_reporting_collecto
|
|||
* @param[in] cfg #LinphoneProxyConfig object
|
||||
* @param[in] interval The interval in seconds, 0 means interval reports are disabled.
|
||||
*/
|
||||
void linphone_proxy_config_set_quality_reporting_interval(LinphoneProxyConfig *cfg, uint8_t interval);
|
||||
LINPHONE_PUBLIC void linphone_proxy_config_set_quality_reporting_interval(LinphoneProxyConfig *cfg, uint8_t interval);
|
||||
|
||||
/**
|
||||
* Get the interval between interval reports when using quality reporting.
|
||||
|
|
@ -883,7 +883,7 @@ void linphone_proxy_config_set_quality_reporting_interval(LinphoneProxyConfig *c
|
|||
* @return The interval in seconds, 0 means interval reports are disabled.
|
||||
*/
|
||||
|
||||
int linphone_proxy_config_get_quality_reporting_interval(LinphoneProxyConfig *cfg);
|
||||
LINPHONE_PUBLIC int linphone_proxy_config_get_quality_reporting_interval(LinphoneProxyConfig *cfg);
|
||||
|
||||
/**
|
||||
* Get the registration state of the given proxy config.
|
||||
|
|
@ -2317,7 +2317,7 @@ LINPHONE_PUBLIC int linphone_core_get_camera_sensor_rotation(LinphoneCore *lc);
|
|||
void linphone_core_show_video(LinphoneCore *lc, bool_t show);
|
||||
|
||||
/*play/record support: use files instead of soundcard*/
|
||||
void linphone_core_use_files(LinphoneCore *lc, bool_t yesno);
|
||||
LINPHONE_PUBLIC void linphone_core_use_files(LinphoneCore *lc, bool_t yesno);
|
||||
LINPHONE_PUBLIC void linphone_core_set_play_file(LinphoneCore *lc, const char *file);
|
||||
LINPHONE_PUBLIC void linphone_core_set_record_file(LinphoneCore *lc, const char *file);
|
||||
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ void linphone_subscription_closed(LinphoneCore *lc, SalOp *op);
|
|||
void linphone_core_update_allocated_audio_bandwidth(LinphoneCore *lc);
|
||||
void linphone_core_update_allocated_audio_bandwidth_in_call(LinphoneCall *call, const PayloadType *pt, int maxbw);
|
||||
|
||||
int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call);
|
||||
LINPHONE_PUBLIC int linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call);
|
||||
void linphone_core_resolve_stun_server(LinphoneCore *lc);
|
||||
const struct addrinfo *linphone_core_get_stun_server_addrinfo(LinphoneCore *lc);
|
||||
void linphone_core_adapt_to_network(LinphoneCore *lc, int ping_time_ms, LinphoneCallParams *params);
|
||||
|
|
@ -406,8 +406,8 @@ LinphoneProxyConfig * is_a_linphone_proxy_config(void *user_pointer);
|
|||
void linphone_core_queue_task(LinphoneCore *lc, belle_sip_source_func_t task_fun, void *data, const char *task_description);
|
||||
|
||||
static const int linphone_proxy_config_magic=0x7979;
|
||||
bool_t linphone_proxy_config_address_equal(const LinphoneAddress *a, const LinphoneAddress *b);
|
||||
bool_t linphone_proxy_config_is_server_config_changed(const LinphoneProxyConfig* obj);
|
||||
LINPHONE_PUBLIC bool_t linphone_proxy_config_address_equal(const LinphoneAddress *a, const LinphoneAddress *b);
|
||||
LINPHONE_PUBLIC bool_t linphone_proxy_config_is_server_config_changed(const LinphoneProxyConfig* obj);
|
||||
void _linphone_proxy_config_unregister(LinphoneProxyConfig *obj);
|
||||
|
||||
/*chat*/
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ void linphone_reporting_call_state_updated(LinphoneCall *call);
|
|||
* @param cb #LinphoneQualityReportingReportSendCb callback function to notify
|
||||
*
|
||||
*/
|
||||
void linphone_reporting_set_on_report_send(LinphoneCall *call, LinphoneQualityReportingReportSendCb cb);
|
||||
LINPHONE_PUBLIC void linphone_reporting_set_on_report_send(LinphoneCall *call, LinphoneQualityReportingReportSendCb cb);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -545,7 +545,7 @@ void sal_verify_server_certificates(Sal *ctx, bool_t verify);
|
|||
void sal_verify_server_cn(Sal *ctx, bool_t verify);
|
||||
void sal_set_uuid(Sal*ctx, const char *uuid);
|
||||
int sal_create_uuid(Sal*ctx, char *uuid, size_t len);
|
||||
void sal_enable_test_features(Sal*ctx, bool_t enabled);
|
||||
LINPHONE_PUBLIC void sal_enable_test_features(Sal*ctx, bool_t enabled);
|
||||
void sal_use_no_initial_route(Sal *ctx, bool_t enabled);
|
||||
|
||||
int sal_iterate(Sal *sal);
|
||||
|
|
|
|||
|
|
@ -246,19 +246,22 @@ static void end_call(LinphoneCoreManager *m1, LinphoneCoreManager *m2){
|
|||
}
|
||||
|
||||
static void simple_call(void) {
|
||||
belle_sip_object_enable_leak_detector(TRUE);
|
||||
int begin=belle_sip_object_get_object_count();
|
||||
int begin;
|
||||
int leaked_objects;
|
||||
{
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
LinphoneCoreManager* marie;
|
||||
LinphoneCoreManager* pauline;
|
||||
|
||||
belle_sip_object_enable_leak_detector(TRUE);
|
||||
begin=belle_sip_object_get_object_count();
|
||||
|
||||
marie = linphone_core_manager_new( "marie_rc");
|
||||
pauline = linphone_core_manager_new( "pauline_rc");
|
||||
CU_ASSERT_TRUE(call(pauline,marie));
|
||||
liblinphone_tester_check_rtcp(marie,pauline);
|
||||
end_call(marie,pauline);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
||||
CU_ASSERT_TRUE(call(pauline,marie));
|
||||
liblinphone_tester_check_rtcp(marie,pauline);
|
||||
end_call(marie,pauline);
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
}
|
||||
leaked_objects=belle_sip_object_get_object_count()-begin;
|
||||
CU_ASSERT_TRUE(leaked_objects==0);
|
||||
if (leaked_objects>0){
|
||||
|
|
@ -816,11 +819,11 @@ static void call_with_custom_headers(void) {
|
|||
*pauline_remote_contact,
|
||||
*marie_remote_contact,
|
||||
*marie_remote_contact_header;
|
||||
|
||||
LinphoneAddress* marie_identity;
|
||||
char* tmp=linphone_address_as_string_uri_only(marie->identity);
|
||||
char tmp2[256];
|
||||
snprintf(tmp2,sizeof(tmp2),"%s?uriHeader=myUriHeader",tmp);
|
||||
LinphoneAddress* marie_identity=linphone_address_new(tmp2);
|
||||
marie_identity=linphone_address_new(tmp2);
|
||||
ms_free(tmp);
|
||||
linphone_address_destroy(marie->identity);
|
||||
marie->identity=marie_identity;
|
||||
|
|
@ -1358,6 +1361,7 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) {
|
|||
LinphoneCoreManager* laure = linphone_core_manager_new( "laure_rc");
|
||||
char hellopath[256];
|
||||
MSList *iterator;
|
||||
MSList* lcs;
|
||||
LinphoneCall* pauline_called_by_marie;
|
||||
LinphoneCall* pauline_called_by_laure=NULL;
|
||||
LinphoneCallParams *laure_params=linphone_core_create_default_call_parameters(laure->lc);
|
||||
|
|
@ -1366,7 +1370,7 @@ static void call_waiting_indication_with_param(bool_t enable_caller_privacy) {
|
|||
if (enable_caller_privacy)
|
||||
linphone_call_params_set_privacy(marie_params,LinphonePrivacyId);
|
||||
|
||||
MSList* lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(NULL,marie->lc);
|
||||
lcs=ms_list_append(lcs,pauline->lc);
|
||||
lcs=ms_list_append(lcs,laure->lc);
|
||||
|
||||
|
|
|
|||
|
|
@ -38,9 +38,10 @@ const char *liblinphone_tester_get_notify_content(void){
|
|||
}
|
||||
|
||||
void linphone_notify_received(LinphoneCore *lc, LinphoneEvent *lev, const char *eventname, const LinphoneContent *content){
|
||||
LinphoneCoreManager *mgr;
|
||||
CU_ASSERT_PTR_NOT_NULL_FATAL(content);
|
||||
CU_ASSERT_TRUE(strcmp(notify_content,(const char*)content->data)==0);
|
||||
LinphoneCoreManager *mgr=get_manager(lc);
|
||||
mgr=get_manager(lc);
|
||||
mgr->stat.number_of_NotifyReceived++;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -376,13 +376,14 @@ static void call_forking_declined_localy(void){
|
|||
|
||||
static void call_forking_with_push_notification_single(void){
|
||||
char hellopath[256];
|
||||
MSList* lcs;
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_tcp_rc");
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
|
||||
linphone_core_set_user_agent(marie->lc,"Natted Linphone",NULL);
|
||||
linphone_core_set_user_agent(pauline->lc,"Natted Linphone",NULL);
|
||||
|
||||
MSList* lcs=ms_list_append(NULL,pauline->lc);
|
||||
lcs=ms_list_append(NULL,pauline->lc);
|
||||
|
||||
lcs=ms_list_append(lcs,marie->lc);
|
||||
|
||||
|
|
|
|||
|
|
@ -74,9 +74,9 @@ void file_transfer_received(LinphoneCore *lc, LinphoneChatMessage *message, cons
|
|||
file = (FILE*)linphone_chat_message_get_user_data(message);
|
||||
|
||||
if (size==0) { /* tranfer complerte */
|
||||
stats* counters = get_stats(lc);
|
||||
linphone_chat_room_destroy(linphone_chat_message_get_chat_room(message));
|
||||
linphone_chat_message_destroy(message);
|
||||
stats* counters = get_stats(lc);
|
||||
counters->number_of_LinphoneMessageExtBodyReceived++;
|
||||
fclose(file);
|
||||
} else { /* store content on a file*/
|
||||
|
|
@ -178,13 +178,15 @@ static void text_message(void) {
|
|||
}
|
||||
|
||||
static void text_message_within_dialog(void) {
|
||||
char* to;
|
||||
LinphoneChatRoom* chat_room;
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
|
||||
lp_config_set_int(pauline->lc->config,"sip","chat_use_call_dialogs",1);
|
||||
|
||||
char* to = linphone_address_as_string(marie->identity);
|
||||
LinphoneChatRoom* chat_room = linphone_core_create_chat_room(pauline->lc,to);
|
||||
to = linphone_address_as_string(marie->identity);
|
||||
chat_room = linphone_core_create_chat_room(pauline->lc,to);
|
||||
ms_free(to);
|
||||
|
||||
CU_ASSERT_TRUE(call(marie,pauline));
|
||||
|
|
@ -211,6 +213,8 @@ static void text_message_with_credential_from_auth_cb_auth_info_requested(Linpho
|
|||
|
||||
|
||||
static void text_message_with_credential_from_auth_cb(void) {
|
||||
char* to;
|
||||
LinphoneChatRoom* chat_room;
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
text_message_with_credential_from_auth_cb_auth_info=linphone_auth_info_clone((LinphoneAuthInfo*)(linphone_core_get_auth_info_list(marie->lc)->data));
|
||||
|
|
@ -219,8 +223,8 @@ static void text_message_with_credential_from_auth_cb(void) {
|
|||
linphone_core_clear_all_auth_info(marie->lc);
|
||||
marie->lc->vtable.auth_info_requested=text_message_with_credential_from_auth_cb_auth_info_requested;
|
||||
|
||||
char* to = linphone_address_as_string(marie->identity);
|
||||
LinphoneChatRoom* chat_room = linphone_core_create_chat_room(pauline->lc,to);
|
||||
to = linphone_address_as_string(marie->identity);
|
||||
chat_room = linphone_core_create_chat_room(pauline->lc,to);
|
||||
ms_free(to);
|
||||
|
||||
|
||||
|
|
@ -336,32 +340,34 @@ static void text_message_with_external_body(void) {
|
|||
|
||||
static void file_transfer_message(void) {
|
||||
int i;
|
||||
/* setting dummy file content to something */
|
||||
const char* big_file_content="big file";
|
||||
char* to;
|
||||
LinphoneChatRoom* chat_room;
|
||||
LinphoneChatMessage* message;
|
||||
LinphoneContent content;
|
||||
const char* big_file_content="big file"; /* setting dummy file content to something */
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
|
||||
for (i=0;i<sizeof(big_file);i+=strlen(big_file_content))
|
||||
memcpy(big_file+i, big_file_content, strlen(big_file_content));
|
||||
|
||||
big_file[0]=*"S";
|
||||
big_file[sizeof(big_file)-1]=*"E";
|
||||
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
|
||||
/* Globally configure an http file transfer server. */
|
||||
linphone_core_set_file_transfer_server(pauline->lc,"https://www.linphone.org:444/lft.php");
|
||||
|
||||
/* create a chatroom on pauline's side */
|
||||
char* to = linphone_address_as_string(marie->identity);
|
||||
LinphoneChatRoom* chat_room = linphone_core_create_chat_room(pauline->lc,to);
|
||||
to = linphone_address_as_string(marie->identity);
|
||||
chat_room = linphone_core_create_chat_room(pauline->lc,to);
|
||||
|
||||
/* create a file transfer message */
|
||||
LinphoneContent content;
|
||||
memset(&content,0,sizeof(content));
|
||||
content.type="text";
|
||||
content.subtype="plain";
|
||||
content.size=sizeof(big_file); /*total size to be transfered*/
|
||||
content.name = "bigfile.txt";
|
||||
LinphoneChatMessage* message = linphone_chat_room_create_file_transfer_message(chat_room, &content);
|
||||
message = linphone_chat_room_create_file_transfer_message(chat_room, &content);
|
||||
|
||||
linphone_chat_room_send_message2(chat_room,message,liblinphone_tester_chat_message_state_change,pauline->lc);
|
||||
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneMessageExtBodyReceived,1));
|
||||
|
|
|
|||
|
|
@ -23,9 +23,10 @@
|
|||
#include "liblinphone_tester.h"
|
||||
|
||||
void linphone_configuration_status(LinphoneCore *lc, LinphoneConfiguringState status, const char *message) {
|
||||
stats* counters;
|
||||
ms_message("Configuring state = %i with message %s", status, message?message:"");
|
||||
|
||||
stats* counters = get_stats(lc);
|
||||
counters = get_stats(lc);
|
||||
if (status == LinphoneConfiguringSkipped) {
|
||||
counters->number_of_LinphoneConfiguringSkipped++;
|
||||
} else if (status == LinphoneConfiguringFailed) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue