package person.bangbang.im.Androidgin.Framework;
import java.util.Date;
public class Message {
public static int TYPE_SEND = 1<<0; // Outgoing message.
public static int TYPE_RECV = 1<<1; // Incoming message.
public static int TYPE_SYSTEM = 1<<2; // System message.
public static int TYPE_AUTO_RESP = 1<<3; // Auto response.
/**
* Hint to the UI that this message should not be shown in
* conversations which are only open for internal UI purposes (e.g.
* for contact-aware conversations).
*/
public static int TYPE_ACTIVE_ONLY = 1<<4;
public static int TYPE_NICK = 1<<5; // Contains your nick.
public static int TYPE_NO_LOG = 1<<6; // Do not log.
public static int TYPE_WHISPER = 1<<7; // Whispered message.
public static int TYPE_ERROR = 1<<8; // Error message.
public static int TYPE_DELAYED = 1<<9; // Delayed message.
public static int TYPE_RAW = 1<<10; // "Raw" message - don't apply formatting
public static int TYPE_IMAGES = 1<<11; // Message contains images.
public static int TYPE_NOTIFY = 1<<12 ; // Message is a notification.
public static int TYPE_NO_LINKIFY = 1<<13; // Message should not be auto- linkified.
public static int TYPE_INVISIBLE = 1<<14; // Message should not be displayed.
private String message;
private Buddy from;
private Buddy to;
private Date date;
private int type;
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public Message(Buddy from, Buddy to, String message) {
super();
this.message = message;
this.from = from;
this.to = to;
this.date = new Date();
}
public String getMessage() {
return message;
}
public Buddy getFrom() {
return from;
}
public Buddy getTo() {
return to;
}
public Date getDate() {
return date;
}
}
|