Commit 920f5d05 authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI
Browse files

Add linphone_call_get_ring_duration() method

parent d66f5865
......@@ -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.
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment