]> sjero.net Git - linphone/commitdiff
Exported JNI method to get call duration from log
authorSylvain Berfini <Sylvain.Berfini@Belledonne-Communications.com>
Wed, 13 Jun 2012 12:15:48 +0000 (14:15 +0200)
committerSylvain Berfini <Sylvain.Berfini@Belledonne-Communications.com>
Wed, 13 Jun 2012 12:15:48 +0000 (14:15 +0200)
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCallLog.java

index 35ee7f26df0376b0858cb7ff7dae39cc0373be9c..d45f6009bdb962ef8aae5f0ec7606b556ec820cc 100644 (file)
@@ -1152,6 +1152,11 @@ extern "C" jstring Java_org_linphone_core_LinphoneCallLogImpl_getStartDate(JNIEn
        jstring jvalue =env->NewStringUTF(((LinphoneCallLog*)ptr)->start_date);
        return jvalue;
 }
+extern "C" jint Java_org_linphone_core_LinphoneCallLogImpl_getCallDuration(JNIEnv*  env
+                                                                                                                                               ,jobject  thiz
+                                                                                                                                               ,jlong ptr) {
+       return ((LinphoneCallLog*)ptr)->duration;
+}
 
 /*payloadType*/
 extern "C" jstring Java_org_linphone_core_PayloadTypeImpl_toString(JNIEnv*  env,jobject  thiz,jlong ptr) {
index fa1bc2ae57638a1dc1ad4348eebeb639fc792db3..98bf40c50e640ef71ed8813468c5645caaee9df0 100644 (file)
@@ -101,4 +101,9 @@ public interface LinphoneCallLog {
         * @return a human readble String with the start date/time of the call
         */
        public String getStartDate();
+       
+       /**
+        * @return the call duration, in seconds
+        */
+       public int getCallDuration();
 }