Commit 0d75cb32 authored by Ghislain MARY's avatar Ghislain MARY

Fix build of tester and lp-gen-wrappers with Visual Studio.

parent 0af92cd9
......@@ -583,15 +583,15 @@ typedef struct _LinphonePlayer LinphonePlayer;
**/
typedef void (*LinphonePlayerEofCallback)(struct _LinphonePlayer *obj, void *user_data);
int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data);
int linphone_player_start(LinphonePlayer *obj);
int linphone_player_pause(LinphonePlayer *obj);
int linphone_player_seek(LinphonePlayer *obj, int time_ms);
MSPlayerState linphone_player_get_state(LinphonePlayer *obj);
int linphone_player_get_duration(LinphonePlayer *obj);
int linphone_player_get_current_position(LinphonePlayer *obj);
void linphone_player_close(LinphonePlayer *obj);
void linphone_player_destroy(LinphonePlayer *obj);
LINPHONE_PUBLIC int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback, void *user_data);
LINPHONE_PUBLIC int linphone_player_start(LinphonePlayer *obj);
LINPHONE_PUBLIC int linphone_player_pause(LinphonePlayer *obj);
LINPHONE_PUBLIC int linphone_player_seek(LinphonePlayer *obj, int time_ms);
LINPHONE_PUBLIC MSPlayerState linphone_player_get_state(LinphonePlayer *obj);
LINPHONE_PUBLIC int linphone_player_get_duration(LinphonePlayer *obj);
LINPHONE_PUBLIC int linphone_player_get_current_position(LinphonePlayer *obj);
LINPHONE_PUBLIC void linphone_player_close(LinphonePlayer *obj);
LINPHONE_PUBLIC void linphone_player_destroy(LinphonePlayer *obj);
/**
* @brief Create an independent media file player.
......
......@@ -321,7 +321,7 @@ void _linphone_proxy_config_release(LinphoneProxyConfig *cfg);
* Can be NULL
* */
const LinphoneAddress* linphone_proxy_config_get_service_route(const LinphoneProxyConfig* cfg);
char* linphone_proxy_config_get_contact(const LinphoneProxyConfig *cfg);
LINPHONE_PUBLIC char* linphone_proxy_config_get_contact(const LinphoneProxyConfig *cfg);
void linphone_friend_close_subscriptions(LinphoneFriend *lf);
void linphone_friend_update_subscribes(LinphoneFriend *fr, LinphoneProxyConfig *cfg, bool_t only_when_registered);
......@@ -973,7 +973,7 @@ BELLE_SIP_DECLARE_VPTR(LinphoneBuffer);
void linphone_configuring_terminated(LinphoneCore *lc, LinphoneConfiguringState state, const char *message);
int linphone_remote_provisioning_download_and_apply(LinphoneCore *lc, const char *remote_provisioning_uri);
int linphone_remote_provisioning_load_file( LinphoneCore* lc, const char* file_path);
LINPHONE_PUBLIC int linphone_remote_provisioning_load_file( LinphoneCore* lc, const char* file_path);
/*****************************************************************************
* Player interface
......
......@@ -698,9 +698,9 @@ int sal_call_notify_refer_state(SalOp *h, SalOp *newcall);
* @param h the Sal instance
* @param handling_method Could be SalOpSDPNormal, SalOpSDPSimulateError, SalOpSDPSimulateRemoval (\ref SalOpSDPHandling)
*/
void sal_default_set_sdp_handling(Sal* h, SalOpSDPHandling handling_method) ;
LINPHONE_PUBLIC void sal_default_set_sdp_handling(Sal* h, SalOpSDPHandling handling_method) ;
/* Second version: for a specific call*/
void sal_call_set_sdp_handling(SalOp *h, SalOpSDPHandling handling) ;
LINPHONE_PUBLIC void sal_call_set_sdp_handling(SalOp *h, SalOpSDPHandling handling) ;
/*Registration*/
int sal_register(SalOp *op, const char *proxy, const char *from, int expires);
......@@ -812,7 +812,7 @@ LINPHONE_PUBLIC bool_t sal_dns_srv_enabled(const Sal *sal);
LINPHONE_PUBLIC void sal_set_dns_user_hosts_file(Sal *sal, const char *hosts_file);
LINPHONE_PUBLIC const char *sal_get_dns_user_hosts_file(const Sal *sal);
unsigned int sal_get_random(void);
char *sal_get_random_token(int size);
LINPHONE_PUBLIC char *sal_get_random_token(int size);
unsigned char * sal_get_random_bytes(unsigned char *ret, size_t size);
belle_sip_source_t * sal_create_timer(Sal *sal, belle_sip_source_func_t func, void *data, unsigned int timeout_value_ms, const char* timer_name);
void sal_cancel_timer(Sal *sal, belle_sip_source_t *timer);
......@@ -821,7 +821,7 @@ int sal_body_has_type(const SalBody *body, const char *type, const char *subtype
/*this function parses a document with key=value pairs separated by new lines, and extracts the value for a given key*/
int sal_lines_get_value(const char *data, const char *key, char *value, size_t value_size);
belle_sip_stack_t *sal_get_belle_sip_stack(Sal *sal);
LINPHONE_PUBLIC belle_sip_stack_t *sal_get_belle_sip_stack(Sal *sal);
char* sal_op_get_public_uri(SalOp *sal);
unsigned long sal_begin_background_task(const char *name, void (*max_time_reached)(void *), void *data);
......
......@@ -30,6 +30,7 @@
#ifdef WIN32
#define unlink _unlink
#define F_OK 00
#endif
static void srtp_call(void);
......@@ -3148,6 +3149,7 @@ static void record_call(const char *filename, bool_t enableVideo) {
const char **formats, *format;
char *filepath;
int dummy=0, i;
bool_t call_succeeded = FALSE;
#if defined(HAVE_OPENH264) && defined(ANDROID)
ms_init();
......@@ -3180,9 +3182,9 @@ static void record_call(const char *filename, bool_t enableVideo) {
filepath = create_filepath(liblinphone_tester_writable_dir_prefix, filename, format);
remove(filepath);
linphone_call_params_set_record_file(marieParams, filepath);
if((CU_ASSERT_TRUE(call_with_params(marie, pauline, marieParams, paulineParams)))
&& (CU_ASSERT_PTR_NOT_NULL(callInst = linphone_core_get_current_call(marie->lc)))) {
CU_ASSERT_TRUE(call_succeeded = call_with_params(marie, pauline, marieParams, paulineParams));
CU_ASSERT_PTR_NOT_NULL(callInst = linphone_core_get_current_call(marie->lc));
if ((call_succeeded == TRUE) && (callInst != NULL)) {
ms_message("call_recording(): start recording into %s", filepath);
linphone_call_start_recording(callInst);
wait_for_until(marie->lc,pauline->lc,&dummy,1,5000);
......
......@@ -159,9 +159,7 @@ fprintf(stderr, "Missing argument for \"%s\"\n", argument); \
return -1; \
} \
#ifndef WINAPI_FAMILY_PHONE_APP
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
int main (int argc, char *argv[])
{
int i;
......@@ -271,5 +269,4 @@ int main (int argc, char *argv[])
}
return ret;
}
#endif /* WINAPI_FAMILY_PHONE_APP */
#endif
......@@ -25,6 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef WIN32
#include <direct.h>
#define strncasecmp _strnicmp
#endif
......
......@@ -129,7 +129,7 @@ static Argument *parseArgument(XmlNode node, bool isReturn){
}
static string classNameToPrefix(const std::string &classname){
char tmp[classname.size()*2];
char *tmp = new char[classname.size()*2];
char *w=tmp;
size_t i;
......@@ -143,11 +143,13 @@ static string classNameToPrefix(const std::string &classname){
}else *w++=p;
}
*w++='\0';
return tmp;
string ret(tmp);
delete[] tmp;
return ret;
}
static string makeMethodName(const string & suffix){
char tmp[suffix.size()];
char *tmp = new char[suffix.size()];
char *w=tmp;
size_t i;
bool useUpper=false;
......@@ -167,7 +169,9 @@ static string makeMethodName(const string & suffix){
}
}
*w++='\0';
return tmp;
string ret(tmp);
delete[] tmp;
return ret;
}
static string extractMethodName(const string &c_name, const std::string& class_name){
......
......@@ -21,10 +21,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef software_desc_hh
#define software_desc_hh
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <algorithm>
#include <string>
#include <sys/types.h>
#include <sys/stat.h>
......
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