|
|
|
|
@ -17,56 +17,27 @@
|
|
|
|
|
*
|
|
|
|
|
* @author Emil Ivov
|
|
|
|
|
*/
|
|
|
|
|
public class Contact
|
|
|
|
|
public interface Contact
|
|
|
|
|
{
|
|
|
|
|
private String address = null;
|
|
|
|
|
private byte[] image = null;
|
|
|
|
|
private Hashtable contactProperties = new Hashtable();
|
|
|
|
|
private boolean isLocal = false;
|
|
|
|
|
|
|
|
|
|
public Contact(String address, boolean isLocal)
|
|
|
|
|
{
|
|
|
|
|
this.address = address;
|
|
|
|
|
this.isLocal = isLocal;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//address
|
|
|
|
|
|
|
|
|
|
public String getAddress()
|
|
|
|
|
{
|
|
|
|
|
return address;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setAddres(String address)
|
|
|
|
|
{
|
|
|
|
|
this.address = address;
|
|
|
|
|
}
|
|
|
|
|
public String getAddress();
|
|
|
|
|
|
|
|
|
|
//image
|
|
|
|
|
public byte[] getImage()
|
|
|
|
|
{
|
|
|
|
|
return image;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setImage(byte[] image)
|
|
|
|
|
{
|
|
|
|
|
this.image = image;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//properties
|
|
|
|
|
public void setProperty(String name, Object property)
|
|
|
|
|
{
|
|
|
|
|
contactProperties.put(name, property);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Object getProperty(String name)
|
|
|
|
|
{
|
|
|
|
|
return contactProperties.get(name);
|
|
|
|
|
}
|
|
|
|
|
public byte[] getImage();
|
|
|
|
|
|
|
|
|
|
//islocal
|
|
|
|
|
public boolean isLocal()
|
|
|
|
|
{
|
|
|
|
|
return isLocal;
|
|
|
|
|
}
|
|
|
|
|
public boolean isLocal();
|
|
|
|
|
|
|
|
|
|
//getLastReceivedPresenceStatus
|
|
|
|
|
/**
|
|
|
|
|
* Returns the status of the contact as per the last status update we've
|
|
|
|
|
* received for it. Note that this method is not to perform any network
|
|
|
|
|
* operations and will simply return the status received in the last
|
|
|
|
|
* status update message. If you want a reliable way of retrieving someone's
|
|
|
|
|
* status, you should use the <code>queryContactStatus()</code> method in
|
|
|
|
|
* <code>OperationSetPresence</code>.
|
|
|
|
|
* @return the PresenceStatus that we've received in the last status update
|
|
|
|
|
* pertaining to this contact.
|
|
|
|
|
*/
|
|
|
|
|
public PresenceStatus getPresenceStatus();
|
|
|
|
|
}
|
|
|
|
|
|