3 Copyright (C) 2010 Belledonne Communications, Grenoble, France
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 package org.linphone.core;
21 * Call data records object
24 import java.util.Vector;
28 public interface LinphoneCallLog {
30 * Represents call status
33 static class CallStatus {
35 static private Vector values = new Vector();
36 private final int mValue;
37 private final String mStringValue;
41 public final static CallStatus Sucess = new CallStatus(0,"Sucess");
45 public final static CallStatus Aborted = new CallStatus(1,"Aborted");
47 * missed incoming call.
49 public final static CallStatus Missed = new CallStatus(2,"Missed");
51 * remote call declined.
53 public final static CallStatus Declined = new CallStatus(3,"Declined");
56 private CallStatus(int value,String stringValue) {
58 values.addElement(this);
59 mStringValue=stringValue;
61 public static CallStatus fromInt(int value) {
63 for (int i=0; i<values.size();i++) {
64 CallStatus state = (CallStatus) values.elementAt(i);
65 if (state.mValue == value) return state;
67 throw new RuntimeException("CallStatus not found ["+value+"]");
69 public String toString() {
78 * Originator of the call as a LinphoneAddress object.
79 * @return LinphoneAddress
81 public LinphoneAddress getFrom();
83 * Destination of the call as a LinphoneAddress object.
86 public LinphoneAddress getTo ();
88 * The direction of the call
89 * @return CallDirection
91 public CallDirection getDirection();
93 * get status of this call
96 public CallStatus getStatus();
99 * @return a human readble String with the start date/time of the call
101 public String getStartDate();
104 * @return the call duration, in seconds
106 public int getCallDuration();
108 * @return the call id from signaling
110 public int getCallId();