Commit 58c708a1 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Add JNI glue to get timestamp for logs

parent 5397f98c
......@@ -1294,6 +1294,11 @@ extern "C" jstring Java_org_linphone_core_LinphoneCallLogImpl_getStartDate(JNIEn
jstring jvalue =env->NewStringUTF(((LinphoneCallLog*)ptr)->start_date);
return jvalue;
}
extern "C" jlong Java_org_linphone_core_LinphoneCallLogImpl_getTimestamp(JNIEnv* env
,jobject thiz
,jlong ptr) {
return static_cast<long> (((LinphoneCallLog*)ptr)->start_date_time);
}
extern "C" jint Java_org_linphone_core_LinphoneCallLogImpl_getCallDuration(JNIEnv* env
,jobject thiz
,jlong ptr) {
......
......@@ -100,6 +100,11 @@ public interface LinphoneCallLog {
*/
public String getStartDate();
/**
* @return a timestamp of the start date/time of the call in milliseconds since January 1st 1970
*/
public long getTimestamp();
/**
* @return the call duration, in seconds
*/
......
......@@ -30,6 +30,7 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
private native String getStartDate(long nativePtr);
private native int getCallDuration(long nativePtr);
private native int getCallId(long nativePtr);
private native long getTimestamp(long nativePtr);
LinphoneCallLogImpl(long aNativePtr) {
nativePtr = aNativePtr;
......@@ -64,4 +65,8 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
public int getCallId() {
return getCallId(nativePtr);
}
public long getTimestamp() {
return getTimestamp(nativePtr);
}
}
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