mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Add JNI glue to get timestamp for logs
This commit is contained in:
parent
5397f98c3e
commit
58c708a10b
3 changed files with 15 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue