From 0492072fa849360a735125edfb4856dca7e39fcf Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 11 Feb 2011 21:05:02 +0100 Subject: [PATCH 1/5] Try to keep help messages within 80 columns --- console/commands.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/console/commands.c b/console/commands.c index 21067c641..57711f87a 100644 --- a/console/commands.c +++ b/console/commands.c @@ -473,7 +473,8 @@ lpc_cmd_help(LinphoneCore *lc, char *arg) } linphonec_out("---------------------------\n"); - linphonec_out("Type 'help ' for more details or 'help advanced' to list additional commands.\n"); + linphonec_out("Type 'help ' for more details or\n"); + linphonec_out(" 'help advanced' to list additional commands.\n"); return 1; } From 9b461a99a68c2a45e2365b4035155f9cd2b264ff Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 11 Feb 2011 21:16:11 +0100 Subject: [PATCH 2/5] Fix undocumented params warnings raised by doxygen 1.6.3 --- coreapi/linphonecore.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 928209827..9156fe40e 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -2716,6 +2716,7 @@ static MSSndCard *get_card_from_string_id(const char *devid, unsigned int cap){ * Returns true if the specified sound device can capture sound. * * @ingroup media_parameters + * @param lc The LinphoneCore object * @param devid the device name as returned by linphone_core_get_sound_devices() **/ bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *devid){ @@ -2729,6 +2730,7 @@ bool_t linphone_core_sound_device_can_capture(LinphoneCore *lc, const char *devi * Returns true if the specified sound device can play sound. * * @ingroup media_parameters + * @param lc The LinphoneCore object * @param devid the device name as returned by linphone_core_get_sound_devices() **/ bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *devid){ @@ -2742,6 +2744,7 @@ bool_t linphone_core_sound_device_can_playback(LinphoneCore *lc, const char *dev * Sets the sound device used for ringing. * * @ingroup media_parameters + * @param lc The LinphoneCore object * @param devid the device name as returned by linphone_core_get_sound_devices() **/ int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid){ @@ -2756,6 +2759,7 @@ int linphone_core_set_ringer_device(LinphoneCore *lc, const char * devid){ * Sets the sound device used for playback. * * @ingroup media_parameters + * @param lc The LinphoneCore object * @param devid the device name as returned by linphone_core_get_sound_devices() **/ int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid){ @@ -2770,6 +2774,7 @@ int linphone_core_set_playback_device(LinphoneCore *lc, const char * devid){ * Sets the sound device used for capture. * * @ingroup media_parameters + * @param lc The LinphoneCore object * @param devid the device name as returned by linphone_core_get_sound_devices() **/ int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid){ @@ -2784,6 +2789,7 @@ int linphone_core_set_capture_device(LinphoneCore *lc, const char * devid){ * Returns the name of the currently assigned sound device for ringing. * * @ingroup media_parameters + * @param lc The LinphoneCore object **/ const char * linphone_core_get_ringer_device(LinphoneCore *lc) { @@ -2795,6 +2801,7 @@ const char * linphone_core_get_ringer_device(LinphoneCore *lc) * Returns the name of the currently assigned sound device for playback. * * @ingroup media_parameters + * @param lc The LinphoneCore object **/ const char * linphone_core_get_playback_device(LinphoneCore *lc) { @@ -2805,6 +2812,7 @@ const char * linphone_core_get_playback_device(LinphoneCore *lc) * Returns the name of the currently assigned sound device for capture. * * @ingroup media_parameters + * @param lc The LinphoneCore object **/ const char * linphone_core_get_capture_device(LinphoneCore *lc) { @@ -2814,8 +2822,10 @@ const char * linphone_core_get_capture_device(LinphoneCore *lc) /** * Returns an unmodifiable array of available sound devices. * - * @ingroup media_parameters * The array is NULL terminated. + * + * @ingroup media_parameters + * @param lc The LinphoneCore object **/ const char** linphone_core_get_sound_devices(LinphoneCore *lc){ build_sound_devices_table(lc); @@ -2858,6 +2868,7 @@ void linphone_core_set_sound_source(LinphoneCore *lc, char source) * Sets the path to a wav file used for ringing. * * @param path The file must be a wav 16bit linear. Local ring is disabled if null + * @param lc The LinphoneCore object * * @ingroup media_parameters **/ @@ -2875,6 +2886,7 @@ void linphone_core_set_ring(LinphoneCore *lc,const char *path){ /** * Returns the path to the wav file used for ringing. * + * @param lc The LinphoneCore object * @ingroup media_parameters **/ const char *linphone_core_get_ring(const LinphoneCore *lc){ @@ -3143,6 +3155,7 @@ static void toggle_video_preview(LinphoneCore *lc, bool_t val){ * initiate future calls with video or not. The two boolean parameters indicate in which * direction video is enabled. Setting both to false disables video entirely. * + * @param lc The LinphoneCore object * @param vcap_enabled indicates whether video capture is enabled * @param display_enabled indicates whether video display should be shown * @@ -3222,6 +3235,7 @@ bool_t linphone_core_self_view_enabled(const LinphoneCore *lc){ * Sets the active video device. * * @ingroup media_parameters + * @param lc The LinphoneCore object * @param id the name of the video device as returned by linphone_core_get_video_devices() **/ int linphone_core_set_video_device(LinphoneCore *lc, const char *id){ @@ -3251,6 +3265,7 @@ int linphone_core_set_video_device(LinphoneCore *lc, const char *id){ /** * Returns the name of the currently active video device. * + * @param lc The LinphoneCore object * @ingroup media_parameters **/ const char *linphone_core_get_video_device(const LinphoneCore *lc){ From c0eb3727172e455fe5829ee12ef60cd511d1a348 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 14 Feb 2011 17:22:28 +0100 Subject: [PATCH 3/5] notify ringing even if no soundcard ! --- coreapi/callbacks.c | 6 ++++-- mediastreamer2 | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index f40cc447c..c3751ada4 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -235,10 +235,12 @@ static void call_ringing(SalOp *h){ if (lc->ringstream!=NULL) return; /*already ringing !*/ if (lc->sound_conf.play_sndcard!=NULL){ MSSndCard *ringcard=lc->sound_conf.lsd_card ? lc->sound_conf.lsd_card : lc->sound_conf.play_sndcard; - ms_message("Remote ringing..."); lc->ringstream=ring_start(lc->sound_conf.remote_ring,2000,ringcard); - linphone_call_set_state(call,LinphoneCallOutgoingRinging,"Remote ringing"); } + ms_message("Remote ringing..."); + if (lc->vtable.display_status) + lc->vtable.display_status(lc,_("Remote ringing...")); + linphone_call_set_state(call,LinphoneCallOutgoingRinging,"Remote ringing"); }else{ /*accept early media */ if (call->audiostream && call->audiostream->ticker!=NULL){ diff --git a/mediastreamer2 b/mediastreamer2 index b9a6dad73..b0eddd4c8 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit b9a6dad7339175e894d1a0f291ccb5d1143e3199 +Subproject commit b0eddd4c81b5055534aceb0bf85f0eafb6151d42 From 268b035d3b087f613ab3b94764f964e34c422278 Mon Sep 17 00:00:00 2001 From: Guillaume Beraudo Date: Tue, 15 Feb 2011 08:40:38 +0100 Subject: [PATCH 4/5] Rename executable from linphone-3 to linphone. --- Makefile.am | 2 +- gtk/.gitignore | 2 +- gtk/Makefile.am | 12 ++++++------ linphone.iss.in | 10 +++++----- linphone.kdevelop | 2 +- scripts/builder-mingw.mk | 2 +- share/linphone.desktop.in | 4 ++-- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Makefile.am b/Makefile.am index 84c1e019f..66d01711d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -39,7 +39,7 @@ ZIP_EXCLUDED=include lib \ SDK_ZIPFILE=$(shell cd $(top_builddir) && pwd)/lib$(PACKAGE)-win32-$(VERSION).zip SDK_EXCLUDED= \ - bin/linphone-3.exe \ + bin/linphone.exe \ lib/*.la \ share/linphone \ share/pixmaps \ diff --git a/gtk/.gitignore b/gtk/.gitignore index 398d60f02..b1b1529c6 100644 --- a/gtk/.gitignore +++ b/gtk/.gitignore @@ -1,4 +1,4 @@ -linphone-3 +linphone .libs .deps linphone.res diff --git a/gtk/Makefile.am b/gtk/Makefile.am index a2c38b342..58f530659 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -27,9 +27,9 @@ if BUILD_GTK_UI BUILT_SOURCES=version_date.h -bin_PROGRAMS=linphone-3 +bin_PROGRAMS=linphone -linphone_3_SOURCES= \ +linphone_SOURCES= \ main.c \ propertybox.c \ friendlist.c \ @@ -45,7 +45,7 @@ linphone_3_SOURCES= \ loginframe.c \ linphone.h -linphone_3_LDADD=$(ORTP_LIBS) \ +linphone_LDADD=$(ORTP_LIBS) \ $(MEDIASTREAMER_LIBS) \ $(top_builddir)/coreapi/liblinphone.la \ $(LIBGTK_LIBS) $(INTLLIBS) @@ -56,10 +56,10 @@ if BUILD_WIN32 linphone.res: $(LINPHONE_ICO_RC_FILE) $(LINPHONE_ICO_FILE) windres $(LINPHONE_ICO_RC_FILE) -O coff -o linphone.res -linphone_3_LDADD+=linphone.res -lwininet -linphone_3_LDFLAGS=-Wl,--export-all-symbols -mwindows +linphone_LDADD+=linphone.res -lwininet +linphone_LDFLAGS=-Wl,--export-all-symbols -mwindows else -linphone_3_LDFLAGS=-export-dynamic +linphone_LDFLAGS=-export-dynamic endif uidir=$(datadir)/linphone diff --git a/linphone.iss.in b/linphone.iss.in index b7726f542..b0cbd08f0 100644 --- a/linphone.iss.in +++ b/linphone.iss.in @@ -30,19 +30,19 @@ Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{ #include "linphone-win32.filelist" [Icons] -Name: "{group}\Linphone"; Filename: "{app}\bin\linphone-3.exe" ; WorkingDir: "{app}" -Name: "{userdesktop}\Linphone"; Filename: "{app}\bin\linphone-3.exe"; WorkingDir: "{app}" ; Tasks: desktopicon +Name: "{group}\Linphone"; Filename: "{app}\bin\linphone.exe" ; WorkingDir: "{app}" +Name: "{userdesktop}\Linphone"; Filename: "{app}\bin\linphone.exe"; WorkingDir: "{app}" ; Tasks: desktopicon [Registry] Root: HKCR; Subkey: "sip"; Root: HKCR; Subkey: "sip"; ValueData: "URL: SIP protocol" ; ValueType:string Root: HKCR; Subkey: "sip"; ValueName: "EditFlags"; ValueData: "02 00 00 00" ; ValueType:binary Root: HKCR; Subkey: "sip"; ValueName: "URL Protocol" ; ValueType:string -Root: HKCR; Subkey: "sip\DefaultIcon"; ValueData: "{app}\bin\linphone-3.exe"; ValueType:string ; Flags:uninsdeletekey +Root: HKCR; Subkey: "sip\DefaultIcon"; ValueData: "{app}\bin\linphone.exe"; ValueType:string ; Flags:uninsdeletekey Root: HKCR; Subkey: "sip\shell" Root: HKCR; Subkey: "sip\shell\open" -Root: HKCR; Subkey: "sip\shell\open\command"; ValueType:string ; ValueData: "{app}\bin\linphone-3.exe --workdir {app} --call %1"; Flags:uninsdeletekey +Root: HKCR; Subkey: "sip\shell\open\command"; ValueType:string ; ValueData: "{app}\bin\linphone.exe --workdir {app} --call %1"; Flags:uninsdeletekey [Run] -Filename: "{app}\bin\linphone-3.exe"; Description: "{cm:LaunchProgram,Linphone}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent +Filename: "{app}\bin\linphone.exe"; Description: "{cm:LaunchProgram,Linphone}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent diff --git a/linphone.kdevelop b/linphone.kdevelop index 27eac2226..2cb0437f5 100644 --- a/linphone.kdevelop +++ b/linphone.kdevelop @@ -16,7 +16,7 @@ executable - gtk-glade/linphone-3 + gtk-glade/linphone diff --git a/scripts/builder-mingw.mk b/scripts/builder-mingw.mk index 7363218af..0a9937cc3 100644 --- a/scripts/builder-mingw.mk +++ b/scripts/builder-mingw.mk @@ -11,7 +11,7 @@ MSX264_ZIP=$(WORKDIR)/msx264.zip INSTALL_ROOT=$(WORKDIR)/root FILELIST=$(WORKDIR)/linphone-bundle.filelist -LINPHONE_VERSION=strings $(INSTALL_ROOT)/bin/linphone-3.exe |grep linphone_ident | sed 's/linphone_ident_string=//' +LINPHONE_VERSION=strings $(INSTALL_ROOT)/bin/linphone.exe |grep linphone_ident | sed 's/linphone_ident_string=//' $(WORKDIR): mkdir -p $(WORKDIR) diff --git a/share/linphone.desktop.in b/share/linphone.desktop.in index 7a490a74d..d8ab62a5b 100644 --- a/share/linphone.desktop.in +++ b/share/linphone.desktop.in @@ -4,7 +4,7 @@ Comment=Linphone is a web-phone Comment[fr]=Linphone est un web-phone. Comment[de]=Linphone ist ein web-phone. Type=Application -Exec=linphone-3 +Exec=linphone Icon=@prefix@/share/pixmaps/linphone/linphone.png Terminal=false -Categories=Network;Telephony; \ No newline at end of file +Categories=Network;Telephony; From c52c697bc6e01541c09fa025119b05bf0b2eb4f2 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 15 Feb 2011 21:35:58 +0100 Subject: [PATCH 5/5] merge patch that allow configuration change of linphonerc in linphonec shell --- console/commands.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/console/commands.c b/console/commands.c index 57711f87a..c110d3731 100644 --- a/console/commands.c +++ b/console/commands.c @@ -78,6 +78,7 @@ static int lpc_cmd_unregister(LinphoneCore *, char *); static int lpc_cmd_duration(LinphoneCore *lc, char *args); static int lpc_cmd_status(LinphoneCore *lc, char *args); static int lpc_cmd_ports(LinphoneCore *lc, char *args); +static int lpc_cmd_param(LinphoneCore *lc, char *args); static int lpc_cmd_speak(LinphoneCore *lc, char *args); static int lpc_cmd_acodec(LinphoneCore *lc, char *args); static int lpc_cmd_vcodec(LinphoneCore *lc, char *args); @@ -315,6 +316,10 @@ static LPC_COMMAND advanced_commands[] = { { "ports", lpc_cmd_ports, "Network ports configuration", "'ports' \t: prints current used ports.\n" "'ports sip '\t: Sets the sip port.\n" }, + { "param", lpc_cmd_param, "parameter set or read as normally given in .linphonerc", + "'param
[]' \t: reads [sets] given parameter.\n" + "NOTES: - changes may become effective after (re)establishing a sip connection.\n" + " - upon exit, .linphonerc will reflect the updated state.\n" }, { "speak", lpc_cmd_speak, "Speak a sentence using espeak TTS engine", "This feature is available only in file mode. (see 'help soundcard')\n" "'speak ' : speak a text using the specified espeak voice.\n" @@ -2015,6 +2020,35 @@ static int lpc_cmd_ports(LinphoneCore *lc, char *args) return 1; } +static int lpc_cmd_param(LinphoneCore *lc, char *args) +{ + char section[20], param[20], value[50]; + const char *string; + + if (args == NULL) { + return 0; + } + switch (sscanf(args,"%s %s %s",section,param,value)) { + // case 1 might show all current settings under a section + case 2: + string = lp_config_get_string(linphone_core_get_config(lc), section, param, "(undef)"); + linphonec_out("current value: %s\n", string); + break; + case 3: + if (lp_config_get_string(linphone_core_get_config(lc), section, param, NULL) != NULL) { + lp_config_set_string(linphone_core_get_config(lc), section, param, value); + // no indication of existence + linphonec_out("updated value: %s\n", value); + } else { + linphonec_out("only update of existing variables are allowed\n"); + } + break; + default: + return 0; + } + return 1; +} + static int lpc_cmd_speak(LinphoneCore *lc, char *args){ #ifndef WIN32 char voice[64];