Add linphone_call_get_ring_duration() method

This commit is contained in:
Guillaume BIENKOWSKI 2014-01-31 10:58:55 +01:00
parent d66f586542
commit 920f5d052d
2 changed files with 12 additions and 0 deletions

View file

@ -1082,6 +1082,17 @@ int linphone_call_get_duration(const LinphoneCall *call){
return time(NULL)-call->media_start_time;
}
/**
* Returns the call ring duration in seconds. This is only useful if the call is in state #LinphoneCallOutgoingRinging
* @param call the call
* @return ringing time
*/
int linphone_call_get_ring_duration(const LinphoneCall* call){
if( call->start_time == 0) return 0;
return time(NULL)-call->start_time;
}
/**
* Returns the call object this call is replacing, if any.
* Call replacement can occur during call transfers.

View file

@ -639,6 +639,7 @@ LINPHONE_PUBLIC LinphoneCall *linphone_call_get_transferer_call(const LinphoneCa
LINPHONE_PUBLIC LinphoneCall *linphone_call_get_transfer_target_call(const LinphoneCall *call);
LINPHONE_PUBLIC LinphoneCall *linphone_call_get_replaced_call(LinphoneCall *call);
LINPHONE_PUBLIC int linphone_call_get_duration(const LinphoneCall *call);
LINPHONE_PUBLIC int linphone_call_get_ring_duration(const LinphoneCall* call);
LINPHONE_PUBLIC const LinphoneCallParams * linphone_call_get_current_params(LinphoneCall *call);
LINPHONE_PUBLIC const LinphoneCallParams * linphone_call_get_remote_params(LinphoneCall *call);
LINPHONE_PUBLIC void linphone_call_enable_camera(LinphoneCall *lc, bool_t enabled);