From: Sylvain Berfini Date: Wed, 13 Jun 2012 13:11:25 +0000 (+0200) Subject: Added resetMissedCallsCount to linphone core and exported via JNI X-Git-Url: http://sjero.net/git/?p=linphone;a=commitdiff_plain;h=0d922d4c801cf6c9179638e5311485e871889284 Added resetMissedCallsCount to linphone core and exported via JNI --- diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 134d38d3..41b9e2dd 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3493,6 +3493,10 @@ int linphone_core_get_missed_calls_count(LinphoneCore *lc) { return lc->missed_calls; } +void linphone_core_reset_missed_calls_count(LinphoneCore *lc) { + lc->missed_calls=0; +} + void linphone_core_remove_call_log(LinphoneCore *lc, void *data) { lc->call_logs = ms_list_remove(lc->call_logs, data); call_logs_write_to_config_file(lc); diff --git a/coreapi/linphonecore.h b/coreapi/linphonecore.h index 531950d7..c9c6fc1a 100644 --- a/coreapi/linphonecore.h +++ b/coreapi/linphonecore.h @@ -971,6 +971,7 @@ void linphone_core_set_rtp_no_xmit_on_audio_mute(LinphoneCore *lc, bool_t val); const MSList * linphone_core_get_call_logs(LinphoneCore *lc); void linphone_core_clear_call_logs(LinphoneCore *lc); int linphone_core_get_missed_calls_count(LinphoneCore *lc); +void linphone_core_reset_missed_calls_count(LinphoneCore *lc); void linphone_core_remove_call_log(LinphoneCore *lc, void *data); /* video support */ diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index d45f6009..4393e3a3 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -648,6 +648,12 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_getMissedCallsCount(JNIE linphone_core_get_missed_calls_count((LinphoneCore*)lc); } +extern "C" void Java_org_linphone_core_LinphoneCoreImpl_resetMissedCallsCount(JNIEnv* env + ,jobject thiz + ,jlong lc) { + linphone_core_reset_missed_calls_count((LinphoneCore*)lc); +} + extern "C" void Java_org_linphone_core_LinphoneCoreImpl_removeCallLog(JNIEnv* env ,jobject thiz ,jlong lc, jlong log) { diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index b6830863..86559f43 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -770,4 +770,9 @@ public interface LinphoneCore { * @return count of missed calls */ public int getMissedCallsCount(); + + /** + * Set missed calls count to zero + */ + public void resetMissedCallsCount(); }