From 6cc8a5645bb492c341441dad0e3641d22c16f5e3 Mon Sep 17 00:00:00 2001 From: smorlat Date: Mon, 16 Feb 2009 22:01:50 +0000 Subject: [PATCH] add linphonec under windows git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@263 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/console/commands.c | 11 +++- linphone/console/linphonec.c | 3 + linphone/console/linphonec.dev | 105 ++++++++++++++++++++++++++++++++ linphone/gtk-glade/linphone.iss | 1 + 4 files changed, 119 insertions(+), 1 deletion(-) create mode 100755 linphone/console/linphonec.dev diff --git a/linphone/console/commands.c b/linphone/console/commands.c index 2966e8376..582d55619 100644 --- a/linphone/console/commands.c +++ b/linphone/console/commands.c @@ -213,7 +213,7 @@ linphonec_parse_command_line(LinphoneCore *lc, char *cl) while ( isdigit(*cl) || *cl == '#' || *cl == '*' ) { linphone_core_send_dtmf(lc, *cl); - sleep(1); // be nice + ms_sleep(1); // be nice ++cl; } @@ -489,6 +489,7 @@ lpc_cmd_firewall(LinphoneCore *lc, char *args) return 1; } +#ifndef WIN32 /* Helper function for processing freind names */ static int lpc_friend_name(char **args, char **name) @@ -518,6 +519,7 @@ lpc_friend_name(char **args, char **name) } return 1; } +#endif static int lpc_cmd_friend(LinphoneCore *lc, char *args) @@ -568,6 +570,7 @@ lpc_cmd_friend(LinphoneCore *lc, char *args) } else if ( !strncmp(args, "add", 3) ) { +#ifndef WIN32 char *name; char addr[80]; char *addr_p = addr; @@ -577,6 +580,7 @@ lpc_cmd_friend(LinphoneCore *lc, char *args) if ( ! *args ) return 0; while (*args == ' ') args++; if ( ! *args ) return 0; + if (!lpc_friend_name(&args, &name)) return 0; while (*args == ' ') args++; @@ -592,6 +596,11 @@ lpc_cmd_friend(LinphoneCore *lc, char *args) } strcpy(addr_p, addr_orig); linphonec_friend_add(lc, name, addr); +#else + LinphoneFriend *new_friend; + new_friend = linphone_friend_new_with_addr(args); + linphone_core_add_friend(lc, new_friend); +#endif return 1; } return 0; diff --git a/linphone/console/linphonec.c b/linphone/console/linphonec.c index a34c3d2ee..ea51abb9f 100644 --- a/linphone/console/linphonec.c +++ b/linphone/console/linphonec.c @@ -34,6 +34,7 @@ #include #include +#include "private.h" /*coreapi/private.h, needed for LINPHONE_VERSION */ #include "linphonec.h" #ifdef WIN32 @@ -437,8 +438,10 @@ static void *net_thread(void*p){ ssize=sizeof(ss); client_sock=accept(server_sock,(struct sockaddr*)&ss,&ssize); }else{ +#ifndef WIN32 ssize=sizeof(su); client_sock=accept(server_sock,(struct sockaddr*)&su,&ssize); +#endif } if (client_sock!=-1){ int len; diff --git a/linphone/console/linphonec.dev b/linphone/console/linphonec.dev new file mode 100755 index 000000000..a62521da8 --- /dev/null +++ b/linphone/console/linphonec.dev @@ -0,0 +1,105 @@ +[Project] +FileName=linphonec.dev +Name=linphonec +UnitCount=2 +PchHead=-1 +PchSource=-1 +Ver=3 +IsCpp=1 +ProfilesCount=2 +ProfileIndex=0 +Folders= + +[Unit1] +FileName=linphonec.c +CompileCpp=0 +Folder=linphonec +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit2] +FileName=commands.c +CompileCpp=0 +Folder=linphonec +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[VersionInfo] +Major=0 +Minor=1 +Release=1 +Build=1 +LanguageID=1033 +CharsetID=1252 +CompanyName= +FileVersion= +FileDescription= +InternalName= +LegalCopyright= +LegalTrademarks= +OriginalFilename= +ProductName= +ProductVersion= +AutoIncBuildNrOnRebuild=0 +AutoIncBuildNrOnCompile=0 + +[Profile1] +ProfileName=Mingw 3.4.2 +Type=1 +ObjFiles= +Includes=../oRTP/include;../mediastreamer2/include;../../linphone-deps/include;../coreapi +Libs=../oRTP/build/win32native;../mediastreamer2/build/win32native;../coreapi/;../../linphone-deps/lib +ResourceIncludes= +MakeIncludes= +Compiler=-g -02_@@_ +CppCompiler= +Linker=-mwindows_@@_-Wl,--export-all-symbols_@@_-Wl,--add-stdcall-alias_@@_-llinphone_@@_-lmediastreamer2_@@_-lortp_@@_-losip2_@@_-losipparser2_@@_-leXosip2_@@_-lws2_32_@@_ +PreprocDefines= +CompilerSettings=0000000000000000000000 +Icon= +ExeOutput= +ObjectOutput=Objects\MingW +OverrideOutput=0 +OverrideOutputName=linphonec.exe +HostApplication= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=0 +compilerType=0 + +[Profile2] +ProfileName=MS VC++ 2005 +Type=1 +ObjFiles= +Includes= +Libs= +ResourceIncludes= +MakeIncludes= +Compiler= +CppCompiler= +Linker= +PreprocDefines= +CompilerSettings=000000000000010000000000000000000000 +Icon= +ExeOutput=Output\MSVC++2005 +ObjectOutput=Objects\MSVC++2005 +OverrideOutput=0 +OverrideOutputName= +HostApplication= +CommandLine= +UseCustomMakefile=0 +CustomMakefile= +IncludeVersionInfo=0 +SupportXPThemes=0 +CompilerSet=1 +compilerType=1 + diff --git a/linphone/gtk-glade/linphone.iss b/linphone/gtk-glade/linphone.iss index be6a6cc5a..b532ff44d 100755 --- a/linphone/gtk-glade/linphone.iss +++ b/linphone/gtk-glade/linphone.iss @@ -25,6 +25,7 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ [Files] Source: "linphone.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "..\mediastreamer2\build\win32native\mediastream.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "..\console\linphonec.exe"; DestDir: "{app}"; Flags: ignoreversion Source: "*.glade"; DestDir: "{app}/linphone"; Flags: ignoreversion Source: "..\pixmaps\*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion Source: "*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion