From 3f875141ef349f226dff0580e418038f2bf8b2ed Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Mon, 22 Nov 2010 12:34:29 +0100 Subject: [PATCH] add call status to java call logs --- .../org/linphone/core/LinphoneCallLog.java | 54 ++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/java/common/org/linphone/core/LinphoneCallLog.java b/java/common/org/linphone/core/LinphoneCallLog.java index 08cdb8034..0e459f81c 100644 --- a/java/common/org/linphone/core/LinphoneCallLog.java +++ b/java/common/org/linphone/core/LinphoneCallLog.java @@ -18,12 +18,64 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.linphone.core; -public interface LinphoneCallLog { +import java.util.Vector; + + +public interface LinphoneCallLog { + /** + * Represents call status + * + */ + static class CallStatus { + static private Vector values = new Vector(); + private final int mValue; + private final String mStringValue; + /** + * Call success. + */ + public final static CallStatus Sucess = new CallStatus(0,"Sucess"); + /** + * Call aborted. + */ + public final static CallStatus Aborted = new CallStatus(1,"Aborted"); + /** + * missed incoming call. + */ + public final static CallStatus Missed = new CallStatus(2,"Missed"); + /** + * remote call declined. + */ + public final static CallStatus Declined = new CallStatus(3,"Declined"); + private CallStatus(int value,String stringValue) { + mValue = value; + values.addElement(this); + mStringValue=stringValue; + } + public static CallStatus fromInt(int value) { + + for (int i=0; i