Commit 64a18a5b authored by Sandrine Avakian's avatar Sandrine Avakian
Browse files

Documenting functions

parent 95387d37
......@@ -203,9 +203,12 @@ LINPHONE_PUBLIC int linphone_call_take_preview_snapshot(LinphoneCall *call, cons
**/
LINPHONE_PUBLIC LinphoneReason linphone_call_get_reason(const LinphoneCall *call);
/**
* Returns full details about call errors or termination reasons.
**/
* @param call LinphoneCall object on which we want the information error
* @return LinphoneErrorInfo object holding the reason error.
*/
LINPHONE_PUBLIC const LinphoneErrorInfo *linphone_call_get_error_info(const LinphoneCall *call);
/**
......@@ -382,6 +385,7 @@ LINPHONE_PUBLIC int linphone_call_resume(LinphoneCall *call);
/**
* Terminates a call.
* @param[in] call LinphoneCall object
* @param[in] ei LinphoneErrorInfo
* @return 0 on success, -1 on failure
**/
LINPHONE_PUBLIC int linphone_call_terminate_with_error_info(LinphoneCall *call, const LinphoneErrorInfo *ei);
......
......@@ -112,7 +112,8 @@ LINPHONE_PUBLIC int linphone_error_info_get_protocol_code(const LinphoneErrorInf
LINPHONE_PUBLIC void linphone_error_info_set(LinphoneErrorInfo *ei, const char *protocol, LinphoneReason reason, int code, const char *status_string, const char *warning);
/**
* [linphone_error_info_set_sub_error_info description]
* Set the sub_ei in LinphoneErrorInfo to another LinphoneErrorInfo.
* Used when there is more than one reason header.
* @param[in] ei LinphoneErrorInfo object to which the other LinphoneErrorInfo will be appended as ei->sub_ei.
* @param[in] appended_ei LinphoneErrorInfo to append
*/
......
......@@ -1216,13 +1216,13 @@ static void call_declined_with_error(void) {
if (in_call) {
linphone_call_ref(in_call);
linphone_call_decline_with_error(in_call, ei);
// linphone_call_terminate(in_call);
BC_ASSERT_TRUE(wait_for(caller_mgr->lc,callee_mgr->lc,&callee_mgr->stat.number_of_LinphoneCallEnd,1));
BC_ASSERT_TRUE(wait_for(callee_mgr->lc,caller_mgr->lc,&caller_mgr->stat.number_of_LinphoneCallEnd,1));
rcvd_ei = linphone_call_get_error_info(out_call);
sub_rcvd_ei = linphone_error_info_get_sub(rcvd_ei);
BC_ASSERT_STRING_EQUAL(linphone_error_info_get_phrase(rcvd_ei), "Decline");
BC_ASSERT_STRING_EQUAL(linphone_error_info_get_protocol(rcvd_ei), "SIP");
BC_ASSERT_STRING_EQUAL(linphone_error_info_get_phrase(sub_rcvd_ei), "J'ai plus de batterie");
......
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