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

45 lines
914 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;
2019-12-21 16:30:14 +01:00
import java.util.UUID;
/**
* 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 {
2019-12-21 16:30:14 +01:00
UUID getId();
2019-12-21 16:30:14 +01:00
void setId(UUID 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();
}