Commit 160dc76b authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Created and exported some methods to manage call logs from Java

parent 3a4c17df
......@@ -3485,6 +3485,14 @@ void linphone_core_clear_call_logs(LinphoneCore *lc){
call_logs_write_to_config_file(lc);
}
int linphone_core_get_missed_calls_count(LinphoneCore *lc) {
return lc->missed_calls;
}
void linphone_core_remove_call_log(LinphoneCore *lc, void *data) {
lc->call_logs = ms_list_remove(lc->call_logs, data);
}
static void toggle_video_preview(LinphoneCore *lc, bool_t val){
#ifdef VIDEO_ENABLED
if (val){
......
......@@ -969,6 +969,8 @@ void linphone_core_set_rtp_no_xmit_on_audio_mute(LinphoneCore *lc, bool_t val);
/* returns a list of LinphoneCallLog */
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_remove_call_log(LinphoneCore *lc, void *data);
/* video support */
bool_t linphone_core_video_supported(LinphoneCore *lc);
......
......@@ -642,6 +642,18 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_stopDtmf( JNIEnv* env
linphone_core_stop_dtmf((LinphoneCore*)lc);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_getMissedCallsCount(JNIEnv* env
,jobject thiz
,jlong lc) {
linphone_core_get_missed_calls_count((LinphoneCore*)lc);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_removeCallLog(JNIEnv* env
,jobject thiz
,jlong lc, jlong log) {
linphone_core_remove_call_log((LinphoneCore*)lc, (void*) log);
}
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_clearCallLogs(JNIEnv* env
,jobject thiz
,jlong lc) {
......
......@@ -94,4 +94,6 @@ public interface LinphoneCallLog {
* @return
*/
public CallStatus getStatus();
public long getNativePtr();
}
......@@ -20,6 +20,7 @@ package org.linphone.core;
import java.util.Vector;
import org.linphone.core.LinphoneCallLog;
import org.linphone.core.LinphoneCallParams;
/**
......@@ -759,4 +760,14 @@ public interface LinphoneCore {
void setUserAgent(String name, String version);
void setCpuCount(int count);
/**
* remove a call log
*/
public void removeCallLog(LinphoneCallLog log);
/**
* @return count of missed calls
*/
public int getMissedCallsCount();
}
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