43 lines
890 B
Java
43 lines
890 B
Java
package org.mercury_im.messenger.entity.contact;
|
|
|
|
import org.mercury_im.messenger.entity.Account;
|
|
|
|
/**
|
|
* Defines a user on the network (eg. a contact, chat partner, group chat member etc).
|
|
* Basically anyone that may send you a message is a Peer.
|
|
*
|
|
* An implementation can be found as {@link IPeer}.
|
|
*/
|
|
public interface Peer {
|
|
|
|
long getId();
|
|
|
|
void setId(long id);
|
|
|
|
Account getAccount();
|
|
|
|
void setAccount(Account account);
|
|
|
|
String getAddress();
|
|
|
|
void setAddress(String address);
|
|
|
|
String getName();
|
|
|
|
void setName(String name);
|
|
|
|
SubscriptionDirection getSubscriptionDirection();
|
|
|
|
void setSubscriptionDirection(SubscriptionDirection mode);
|
|
|
|
boolean isSubscriptionPending();
|
|
|
|
void setSubscriptionPending(boolean pending);
|
|
|
|
boolean isSubscriptionApproved();
|
|
|
|
void setSubscriptionApproved(boolean approved);
|
|
|
|
boolean isContact();
|
|
}
|