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 import java.util.Vector;
25 public interface LinphoneCallLog {
27 * Represents call status
30 static class CallStatus {
31 static private Vector values = new Vector();
32 private final int mValue;
33 private final String mStringValue;
37 public final static CallStatus Sucess = new CallStatus(0,"Sucess");
41 public final static CallStatus Aborted = new CallStatus(1,"Aborted");
43 * missed incoming call.
45 public final static CallStatus Missed = new CallStatus(2,"Missed");
47 * remote call declined.
49 public final static CallStatus Declined = new CallStatus(3,"Declined");
50 private CallStatus(int value,String stringValue) {
52 values.addElement(this);
53 mStringValue=stringValue;
55 public static CallStatus fromInt(int value) {
57 for (int i=0; i<values.size();i++) {
58 CallStatus state = (CallStatus) values.elementAt(i);
59 if (state.mValue == value) return state;
61 throw new RuntimeException("CallStatus not found ["+value+"]");
63 public String toString() {
71 public LinphoneAddress getFrom();
73 public LinphoneAddress getTo ();
75 public CallDirection getDirection();
77 * get status of this call
80 public CallStatus getStatus();