diff --git a/linphone/coreapi/linphonecore.c b/my_version_to_patch/linphone_with_more_info_about_linphonecall/coreapi/linphonecore.c index 3e911ce..d55fbea 100644 --- a/linphone/coreapi/linphonecore.c +++ b/my_version_to_patch/linphone_with_more_info_about_linphonecall/coreapi/linphonecore.c @@ -423,6 +423,19 @@ void linphone_call_log_destroy(LinphoneCallLog *cl){ ms_free(cl); } +/** + * Return True if the _LinphoneCall asked to autoanswer + * +**/ +bool_t linphone_call_asked_to_autoanswer(struct _LinphoneCall *call) +{ + //return TRUE if the unique(for the moment) incoming com asked to be autoanswer + if(call) + return sal_call_autoanswer_asked(call->op); + else + return FALSE; +} + int linphone_core_get_current_call_duration(const LinphoneCore *lc){ LinphoneCall *call=lc->call; if (call==NULL) return 0; @@ -2352,6 +2365,19 @@ bool_t linphone_core_in_call(const LinphoneCore *lc){ return lc->call!=NULL; } +/** + * Returns The _LinphoneCall struct of the current call if one is in call + * + * @ingroup call_control +**/ +struct _LinphoneCall *linphone_core_get_current_call(LinphoneCore *lc) +{ + if(linphone_core_in_call(lc)) + return lc->call; + else + return NULL; +} + int linphone_core_send_publish(LinphoneCore *lc, LinphoneOnlineStatus presence_mode) { diff --git a/linphone/coreapi/linphonecore.h b/my_version_to_patch/linphone_with_more_info_about_linphonecall/coreapi/linphonecore.h index e53022d..9b8c758 100644 --- a/linphone/coreapi/linphonecore.h +++ b/my_version_to_patch/linphone_with_more_info_about_linphonecall/coreapi/linphonecore.h @@ -131,6 +131,7 @@ void *linphone_call_log_get_user_pointer(const LinphoneCallLog *cl); void linphone_call_log_set_ref_key(LinphoneCallLog *cl, const char *refkey); const char *linphone_call_log_get_ref_key(const LinphoneCallLog *cl); char * linphone_call_log_to_str(LinphoneCallLog *cl); +bool_t linphone_call_asked_to_autoanswer(struct _LinphoneCall *call); typedef enum{ LinphoneSPWait, @@ -487,6 +488,8 @@ bool_t linphone_core_inc_invite_pending(LinphoneCore*lc); bool_t linphone_core_in_call(const LinphoneCore *lc); +struct _LinphoneCall *linphone_core_get_current_call(LinphoneCore *lc); + int linphone_core_accept_call(LinphoneCore *lc, const char *url); int linphone_core_terminate_call(LinphoneCore *lc, const char *url);