mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
Merge branch 'master' of git.sv.gnu.org:/srv/git/linphone
Conflicts: mediastreamer2
This commit is contained in:
commit
81574fe90a
1 changed files with 54 additions and 1 deletions
|
|
@ -21,8 +21,56 @@ package org.linphone.core;
|
|||
* Call data records object
|
||||
*
|
||||
*/
|
||||
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<values.size();i++) {
|
||||
CallStatus state = (CallStatus) values.elementAt(i);
|
||||
if (state.mValue == value) return state;
|
||||
}
|
||||
throw new RuntimeException("CallStatus not found ["+value+"]");
|
||||
}
|
||||
public String toString() {
|
||||
return mStringValue;
|
||||
}
|
||||
public int toInt() {
|
||||
return mValue;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Originator of the call as a LinphoneAddress object.
|
||||
* @return LinphoneAddress
|
||||
|
|
@ -38,4 +86,9 @@ public interface LinphoneCallLog {
|
|||
* @return CallDirection
|
||||
*/
|
||||
public CallDirection getDirection();
|
||||
/**
|
||||
* get status of this call
|
||||
* @return
|
||||
*/
|
||||
public CallStatus getStatus();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue