/* call.h Copyright (C) 2016 Belledonne Communications SARL This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LINPHONE_CALL_H #define LINPHONE_CALL_H #include #ifndef LINPHONE_PUBLIC #define LINPHONE_PUBLIC MS2_PUBLIC #endif #include "linphone/address.h" #include "linphone/call_log.h" #include "linphone/call_params.h" #include "linphone/conference.h" #include "linphone/error_info.h" /** * @addtogroup call_control * @{ */ /** * LinphoneCallState enum represents the different state a call can reach into. * The application is notified of state changes through the LinphoneCoreVTable::call_state_changed callback. **/ typedef enum _LinphoneCallState{ LinphoneCallIdle, /** * 3-4 = average quality
* 2-3 = poor quality
* 1-2 = very poor quality
* 0-1 = can't be worse, mostly unusable
* * @return The function returns -1 if no quality measurement is available, for example if no * active audio stream exist. Otherwise it returns the quality rating. **/ LINPHONE_PUBLIC float linphone_call_get_current_quality(LinphoneCall *call); /** * Returns call quality averaged over all the duration of the call. * * See linphone_call_get_current_quality() for more details about quality measurement. **/ LINPHONE_PUBLIC float linphone_call_get_average_quality(LinphoneCall *call); /** * Start call recording. * The output file where audio is recorded must be previously specified with linphone_call_params_set_record_file(). **/ LINPHONE_PUBLIC void linphone_call_start_recording(LinphoneCall *call); /** * Stop call recording. **/ LINPHONE_PUBLIC void linphone_call_stop_recording(LinphoneCall *call); LINPHONE_PUBLIC LinphonePlayer * linphone_call_get_player(LinphoneCall *call); /** * Indicates whether an operation is in progress at the media side. * It can be a bad idea to initiate signaling operations (adding video, pausing the call, removing video, changing video parameters) while * the media is busy in establishing the connection (typically ICE connectivity checks). It can result in failures generating loss of time * in future operations in the call. * Applications are invited to check this function after each call state change to decide whether certain operations are permitted or not. * @param call the call * @return TRUE if media is busy in establishing the connection, FALSE otherwise. **/ LINPHONE_PUBLIC bool_t linphone_call_media_in_progress(LinphoneCall *call); /** * @} */ #ifdef __cplusplus } #endif #endif /* LINPHONE_CALL_H */