From 163380c454ba18873f0e478c7a3a754aa7d531c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Grisez?= Date: Thu, 12 Jan 2017 17:51:44 +0100 Subject: [PATCH] Move some comments from source files to headers --- coreapi/info.c | 37 --------------------------------- coreapi/linphonecall.c | 10 --------- coreapi/misc.c | 29 -------------------------- coreapi/player.c | 47 ------------------------------------------ 4 files changed, 123 deletions(-) diff --git a/coreapi/info.c b/coreapi/info.c index 0e60f45ef..5fc8587cb 100644 --- a/coreapi/info.c +++ b/coreapi/info.c @@ -34,9 +34,6 @@ struct _LinphoneInfoMessage{ }; -/** - * Destroy a LinphoneInfoMessage -**/ void linphone_info_message_destroy(LinphoneInfoMessage *im){ if (im->content) linphone_content_unref(im->content); if (im->headers) sal_custom_header_free(im->headers); @@ -51,63 +48,29 @@ LinphoneInfoMessage *linphone_info_message_copy(const LinphoneInfoMessage *orig) return im; } -/** - * Creates an empty info message. - * @param lc the LinphoneCore - * @return a new LinphoneInfoMessage. - * - * The info message can later be filled with information using linphone_info_message_add_header() or linphone_info_message_set_content(), - * and finally sent with linphone_core_send_info_message(). -**/ LinphoneInfoMessage *linphone_core_create_info_message(LinphoneCore *lc){ LinphoneInfoMessage *im=ms_new0(LinphoneInfoMessage,1); return im; } -/** - * Send a LinphoneInfoMessage through an established call - * @param call the call - * @param info the info message -**/ int linphone_call_send_info_message(LinphoneCall *call, const LinphoneInfoMessage *info) { SalBodyHandler *body_handler = sal_body_handler_from_content(info->content); sal_op_set_sent_custom_header(call->op, info->headers); return sal_send_info(call->op,NULL, NULL, body_handler); } -/** - * Add a header to an info message to be sent. - * @param im the info message - * @param name the header'name - * @param value the header's value -**/ void linphone_info_message_add_header(LinphoneInfoMessage *im, const char *name, const char *value){ im->headers=sal_custom_header_append(im->headers, name, value); } -/** - * Obtain a header value from a received info message. - * @param im the info message - * @param name the header'name - * @return the corresponding header's value, or NULL if not exists. -**/ const char *linphone_info_message_get_header(const LinphoneInfoMessage *im, const char *name){ return sal_custom_header_find(im->headers,name); } -/** - * Assign a content to the info message. - * @param im the linphone info message - * @param content the content described as a #LinphoneContent structure. - * All fields of the LinphoneContent are copied, thus the application can destroy/modify/recycloe the content object freely ater the function returns. -**/ void linphone_info_message_set_content(LinphoneInfoMessage *im, const LinphoneContent *content){ im->content=linphone_content_copy(content); } -/** - * Returns the info message's content as a #LinphoneContent structure. -**/ const LinphoneContent * linphone_info_message_get_content(const LinphoneInfoMessage *im){ return (im->content && linphone_content_get_type(im->content)) ? im->content : NULL; } diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index ff2f4c4ba..8e44f8fcd 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -2139,7 +2139,6 @@ void linphone_call_send_vfu_request(LinphoneCall *call) { #endif } - int linphone_call_take_video_snapshot(LinphoneCall *call, const char *file){ #ifdef VIDEO_ENABLED if (call->videostream!=NULL && call->videostream->jpegwriter!=NULL){ @@ -3991,9 +3990,6 @@ static void update_local_stats(LinphoneCallStats *stats, MediaStream *stream) { media_stream_get_local_rtp_stats(stream, &stats->rtp_stats); } -/** - * Access last known statistics for audio stream, for a given call. -**/ const LinphoneCallStats *linphone_call_get_audio_stats(LinphoneCall *call) { LinphoneCallStats *stats = &call->stats[LINPHONE_CALL_STATS_AUDIO]; if (call->audiostream){ @@ -4002,9 +3998,6 @@ const LinphoneCallStats *linphone_call_get_audio_stats(LinphoneCall *call) { return stats; } -/** - * Access last known statistics for video stream, for a given call. -**/ const LinphoneCallStats *linphone_call_get_video_stats(LinphoneCall *call) { LinphoneCallStats *stats = &call->stats[LINPHONE_CALL_STATS_VIDEO]; if (call->videostream){ @@ -4013,9 +4006,6 @@ const LinphoneCallStats *linphone_call_get_video_stats(LinphoneCall *call) { return stats; } -/** - * Access last known statistics for video stream, for a given call. -**/ const LinphoneCallStats *linphone_call_get_text_stats(LinphoneCall *call) { LinphoneCallStats *stats = &call->stats[LINPHONE_CALL_STATS_TEXT]; if (call->textstream){ diff --git a/coreapi/misc.c b/coreapi/misc.c index 5a2eff5bf..1092bbb09 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -250,7 +250,6 @@ bool_t linphone_core_is_payload_type_usable_for_bandwidth(LinphoneCore *lc, cons return ret; } -/* return TRUE if codec can be used with bandwidth, FALSE else*/ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, const PayloadType *pt){ int maxbw=get_min_bandwidth(linphone_core_get_download_bandwidth(lc), linphone_core_get_upload_bandwidth(lc)); @@ -1256,10 +1255,6 @@ void linphone_core_set_video_display_filter(LinphoneCore *lc, const char *filter lp_config_set_string(lc->config,"video","displaytype",filter_name); } -/** - * Get the name of the mediastreamer2 filter used for rendering video. - * @ingroup media_parameters -**/ const char *linphone_core_get_video_display_filter(LinphoneCore *lc){ return lp_config_get_string(lc->config,"video","displaytype",NULL); } @@ -1319,16 +1314,6 @@ static void linphone_core_migrate_proxy_config(LinphoneCore *lc, LinphoneTranspo } } -/** - * Migrate configuration so that all SIP transports are enabled. - * Versions of linphone < 3.7 did not support using multiple SIP transport simultaneously. - * This function helps application to migrate the configuration so that all transports are enabled. - * Existing proxy configuration are added a transport parameter so that they continue using the unique transport that was set previously. - * This function must be used just after creating the core, before any call to linphone_core_iterate() - * @param lc the linphone core - * @return 1 if migration was done, 0 if not done because unnecessary or already done, -1 in case of error. - * @ingroup initializing -**/ int linphone_core_migrate_to_multi_transport(LinphoneCore *lc){ if (!lp_config_get_int(lc->config,"sip","multi_transport_migration_done",0)){ LinphoneTransportType tpt; @@ -1392,24 +1377,10 @@ void _linphone_core_set_tone(LinphoneCore *lc, LinphoneReason reason, LinphoneTo lc->tones=bctbx_list_append(lc->tones,tone); } -/** - * Assign an audio file to be played locally upon call failure, for a given reason. - * @param lc the core - * @param reason the #LinphoneReason representing the failure error code. - * @param audiofile a wav file to be played when such call failure happens. - * @ingroup misc -**/ void linphone_core_set_call_error_tone(LinphoneCore *lc, LinphoneReason reason, const char *audiofile){ _linphone_core_set_tone(lc,reason,LinphoneToneUndefined, audiofile); } -/** - * Assign an audio file to be played as a specific tone id. - * This function typically allows to customize telephony tones per country. - * @param lc the core - * @param id the tone id - * @param audiofile a wav file to be played. -**/ void linphone_core_set_tone(LinphoneCore *lc, LinphoneToneID id, const char *audiofile){ _linphone_core_set_tone(lc, LinphoneReasonNone, id, audiofile); } diff --git a/coreapi/player.c b/coreapi/player.c index 0677909f4..b1214aadb 100644 --- a/coreapi/player.c +++ b/coreapi/player.c @@ -20,87 +20,40 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "private.h" -/** - * Open a new source on this player. - * @param obj the player - * @param filename file to open. - * @param cb a callback used to notify end of play. - * @param user_data a user-data provided in the callback to help the application to retrieve its context. - * @return 0 if successful, -1 otherwise -**/ int linphone_player_open(LinphonePlayer *obj, const char *filename, LinphonePlayerEofCallback cb, void *user_data){ obj->user_data=user_data; obj->cb=cb; return obj->open(obj,filename); } -/** - * Start a play operation. The player must have been open previously with linphone_player_open(). - * @param obj the player. - * @return 0 if successful, -1 otherwise -**/ int linphone_player_start(LinphonePlayer *obj){ return obj->start(obj); } -/** - * Suspend a play operation. The player must have been started previously with linphone_player_start(). - * @param obj the player. - * @return 0 if successful, -1 otherwise -**/ int linphone_player_pause(LinphonePlayer *obj){ return obj->pause(obj); } -/** - * Seek at a given position given in milliseconds. The player must be in the paused state. - * @param obj the player. - * @param time_ms the position to seek to. - * @return 0 if successful, -1 otherwise -**/ int linphone_player_seek(LinphonePlayer *obj, int time_ms){ return obj->seek(obj,time_ms); } -/** - * Get the state of play operation. - * @param obj the player. - * @return the state of the player within MSPlayerClosed, MSPlayerStarted, MSPlayerPaused. -**/ MSPlayerState linphone_player_get_state(LinphonePlayer *obj){ return obj->get_state(obj); } -/** - * Get the duration of the media - * @param obj the player - * @return The duration in milliseconds - */ int linphone_player_get_duration(LinphonePlayer *obj) { return obj->get_duration(obj); } -/** - * Get the position of the playback - * @param obj the player - * @return Position of the playback in milliseconds - */ int linphone_player_get_current_position(LinphonePlayer *obj) { return obj->get_position(obj); } -/** - * Close the player. - * @param obj the player. -**/ void linphone_player_close(LinphonePlayer *obj){ obj->close(obj); } -/** - * @brief Destroy a player - * @param obj The player - */ void linphone_player_destroy(LinphonePlayer *obj) { if(obj->destroy) obj->destroy(obj); }