interface StateListener{
void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, State state);
}
- static class State {
- @SuppressWarnings("rawtypes")
- static private Vector values = new Vector();
+ public static class State {
+ static private Vector<State> values = new Vector<State>();
private final int mValue;
public final int value() {return mValue;}
*/
public final static State NotDelivered = new State(3,"NotDelivered");
- @SuppressWarnings("unchecked")
private State(int value,String stringValue) {
mValue = value;
values.addElement(this);
*
* @return text sent along with the message
*/
- String getMessage();
+ String getText();
/**
* get peer address associated to this LinphoneChatMessage
* @param url ex: access-type=URL; URL="http://www.foo.com/file"
*/
void setExternalBodyUrl(String url);
+
+ /**
+ * Add a custom header into the message.
+ * @param name
+ * @param value
+ */
+ void addCustomHeader(String name, String value);
+
+ /**
+ * Obtain a header value.
+ * @param name
+ * @return the value of the header, or null if not found.
+ */
+ String getCustomHeader(String name);
+
+ /**
+ * Gets the time at which the message was sent
+ * @return the time in milliseconds
+ */
+ long getTime();
}