Mercury-IM/entity/src/main/java/org/mercury_im/messenger/entity/contact/Peer.java

43 lines
890 B
Java
Raw Normal View History

2019-11-18 23:51:27 +01:00
package org.mercury_im.messenger.entity.contact;
2019-11-18 23:51:27 +01:00
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.
2019-12-06 20:48:27 +01:00
*
* 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);
2019-12-21 05:34:19 +01:00
SubscriptionDirection getSubscriptionDirection();
2019-12-21 05:34:19 +01:00
void setSubscriptionDirection(SubscriptionDirection mode);
boolean isSubscriptionPending();
void setSubscriptionPending(boolean pending);
boolean isSubscriptionApproved();
void setSubscriptionApproved(boolean approved);
boolean isContact();
}