From 0740271bec6b81b561bb3fc804dd5c9daa8d49b1 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 30 Mar 2011 15:16:37 +0200 Subject: [PATCH] add IOS section in doxygen --- coreapi/help/doxygen.dox | 147 ++++++++++++++++++++++++++++++++++- coreapi/linphonecore.c | 8 +- coreapi/linphonecore.h | 11 ++- coreapi/linphonecore_utils.h | 13 ++-- 4 files changed, 170 insertions(+), 9 deletions(-) diff --git a/coreapi/help/doxygen.dox b/coreapi/help/doxygen.dox index 32ed3da1a..8217eaf6b 100644 --- a/coreapi/help/doxygen.dox +++ b/coreapi/help/doxygen.dox @@ -25,7 +25,7 @@ /** * @page liblinphone_license COPYING - * @verbinclude COPYING + * @include COPYING */ /** @@ -196,5 +196,150 @@ void text_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddre * **/ +/** + * @defgroup port Portability: + * +**/ +/** + * @defgroup IOS IOS + * @ingroup port + *
+ Multitasking +
liblinphone for IOS natively supports multitasking assuming application follows multitasking guides provided by Apple. First step is to declare application as multitasked. It means adding background mode for both audio and voip to Info.plist file. +
+ \code + UIBackgroundModes + + voip + audio + +\endcode +
+ +Networking +
+ +DTMF feebacks +
liblinphone provides functions \link #linphone_core_play_dtmf() to play dtmf \endlink . Usually this is used to play a sound when the a user type a digit. On IOS, libLinphone relies on Audio unit for interfacing with the audio system. Audio unit initialization is a quit long operation that may trigger a bad user experience if performed each time a DTMF is played. On IOS, liblinphone introduce 2 functions for \link linphone_core_start_dtmf_stream() preloading \endlink \link #linphone_core_start_dtmf_stream() unloading \endlink underlying audio graph responsible of playing DTMFs. +
For application using function #linphone_core_play_dtmf() , it is recommanded to call #linphone_core_start_dtmf_stream() when entering in foreground and #linphone_core_stop_dtmf_stream() upon entering background mode. +*/ diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 9ddc77c6b..a59597b30 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3583,7 +3583,11 @@ static MSFilter *get_dtmf_gen(LinphoneCore *lc){ } /** - * Plays a dtmf to the local user. + * @ingroup media_parameters + * Plays a dtmf sound to the local user. + * @param lc #LinphoneCore + * @param dtmf DTMF to play ['0'..'16'] | '#' | '#' + * @param duration_ms duration in ms, -1 means play until next further call to #linphone_core_stop_dtmf() **/ void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms){ MSFilter *f=get_dtmf_gen(lc); @@ -3598,6 +3602,8 @@ void linphone_core_play_dtmf(LinphoneCore *lc, char dtmf, int duration_ms){ } /** + * @ingroup media_parameters + * * Stops playing a dtmf started by linphone_core_play_dtmf(). **/ void linphone_core_stop_dtmf(LinphoneCore *lc){ diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 6e55ea2e3..6f3b48c01 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -787,7 +787,12 @@ int linphone_core_get_sip_port(LinphoneCore *lc); int linphone_core_set_sip_transports(LinphoneCore *lc, const LCSipTransports *transports); int linphone_core_get_sip_transports(LinphoneCore *lc, LCSipTransports *transports); - +/** + * @ingroup IOS + * Give access to the UDP sip socket. Can be useful to configure this socket as persistent I.E kCFStreamNetworkServiceType set to kCFStreamNetworkServiceTypeVoIP) + * @param lc #LinphoneCore + * @return socket file descriptor + */ ortp_socket_t linphone_core_get_sip_socket(LinphoneCore *lc); void linphone_core_set_inc_timeout(LinphoneCore *lc, int seconds); @@ -927,6 +932,7 @@ int linphone_core_get_mtu(const LinphoneCore *lc); void linphone_core_set_mtu(LinphoneCore *lc, int mtu); /** + * @ingroup network_parameters * This method is called by the application to notify the linphone core library when network is reachable. * Calling this method with true trigger linphone to initiate a registration process for all proxy * configuration with parameter register set to enable. @@ -935,15 +941,18 @@ void linphone_core_set_mtu(LinphoneCore *lc, int mtu); */ void linphone_core_set_network_reachable(LinphoneCore* lc,bool_t value); /** + * @ingroup network_parameters * return network state either as positioned by the application or by linphone */ bool_t linphone_core_is_network_reachabled(LinphoneCore* lc); /** + * @ingroup network_parameters * enable signaling keep alive. small udp packet sent periodically to keep udp NAT association */ void linphone_core_enable_keep_alive(LinphoneCore* lc,bool_t enable); /** + * @ingroup network_parameters * Is signaling keep alive */ bool_t linphone_core_keep_alive_enabled(LinphoneCore* lc); diff --git a/coreapi/linphonecore_utils.h b/coreapi/linphonecore_utils.h index a6845da9e..0c7e3233b 100644 --- a/coreapi/linphonecore_utils.h +++ b/coreapi/linphonecore_utils.h @@ -65,19 +65,20 @@ typedef enum { typedef void (*LinphoneEcCalibrationCallback)(LinphoneCore *lc, LinphoneEcCalibratorStatus status, int delay_ms, void *data); /** + * * Start an echo calibration of the sound devices, in order to find adequate settings for the echo canceller automatically. **/ int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibrationCallback cb, void *cb_data); -#if TARGET_OS_IPHONE /** - * IOS special function to warm up dtmf feeback stream. #linphone_core_stop_dtmf_stream must be called before entering BG mode + * @ingroup IOS + * Special function to warm up dtmf feeback stream. #linphone_core_stop_dtmf_stream must() be called before entering FG mode */ -void linphone_core_start_dtmf_stream(const LinphoneCore* lc); +void linphone_core_start_dtmf_stream(LinphoneCore* lc); /** - * IOS special function to stop dtmf feed back function. Must be called before entering BG mode + * @ingroup IOS + * Special function to stop dtmf feed back function. Must be called before entering BG mode */ -void linphone_core_stop_dtmf_stream(const LinphoneCore* lc); -#endif +void linphone_core_stop_dtmf_stream(LinphoneCore* lc); #ifdef __cplusplus