41 lines
908 B
Java
41 lines
908 B
Java
package org.mercury_im.messenger.core.entity.contact;
|
|
|
|
public interface Contact extends Peer {
|
|
|
|
SubscriptionMode getSubscriptionMode();
|
|
|
|
void setSubscriptionMode(SubscriptionMode mode);
|
|
|
|
enum SubscriptionMode {
|
|
/**
|
|
* No subscription between us an them.
|
|
*/
|
|
NONE,
|
|
|
|
/**
|
|
* We sent a subscription request, which is now pending to be accepted.
|
|
*/
|
|
TO_THEM_PENDING,
|
|
|
|
/**
|
|
* We sent a subscription request and they accepted it.
|
|
*/
|
|
TO_THEM_ACCEPTED,
|
|
|
|
/**
|
|
* They sent us a subscription request, but we did not yet accept it.
|
|
*/
|
|
FROM_THEM_PENDING,
|
|
|
|
/**
|
|
* They sent us a subscription request and we accepted it.
|
|
*/
|
|
FROM_THEM_ACCEPTED,
|
|
|
|
/**
|
|
* They accepted us and we accepted them.
|
|
*/
|
|
BIDIRECTIONAL
|
|
}
|
|
}
|