mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-25 07:08:11 +00:00
forgot to commit a file
This commit is contained in:
parent
fd4937409b
commit
cc7a707754
1 changed files with 53 additions and 0 deletions
53
java/common/org/linphone/core/LinphoneChatMessage.java
Normal file
53
java/common/org/linphone/core/LinphoneChatMessage.java
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
package org.linphone.core;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
|
||||
public interface LinphoneChatMessage {
|
||||
interface StateListener{
|
||||
void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, State state);
|
||||
}
|
||||
static class State {
|
||||
static private Vector values = new Vector();
|
||||
private final int mValue;
|
||||
public final int value() {return mValue;}
|
||||
|
||||
private final String mStringValue;
|
||||
/**
|
||||
* Idle
|
||||
*/
|
||||
public final static State Idle = new State(0,"Idle");
|
||||
/**
|
||||
* Incoming call received.
|
||||
*/
|
||||
public final static State InProgress = new State(1,"InProgress");
|
||||
/**
|
||||
* Outgoing call initialiazed.
|
||||
*/
|
||||
public final static State Delivered = new State(2,"Delivered");
|
||||
/**
|
||||
* Outgoing call in progress.
|
||||
*/
|
||||
public final static State NotDelivered = new State(3,"NotDelivered");
|
||||
|
||||
private State(int value,String stringValue) {
|
||||
mValue = value;
|
||||
values.addElement(this);
|
||||
mStringValue=stringValue;
|
||||
}
|
||||
|
||||
public static State fromInt(int value) {
|
||||
|
||||
for (int i=0; i<values.size();i++) {
|
||||
State state = (State) values.elementAt(i);
|
||||
if (state.mValue == value) return state;
|
||||
}
|
||||
throw new RuntimeException("state not found ["+value+"]");
|
||||
}
|
||||
public String toString() {
|
||||
return mStringValue;
|
||||
}
|
||||
}
|
||||
Object getUserData();
|
||||
void setUserData();
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue