2019-11-08 00:47:17 +01:00
|
|
|
package org.mercury_im.messenger.core.entity.contact;
|
|
|
|
|
2019-11-18 00:04:28 +01:00
|
|
|
public interface Contact extends Peer {
|
2019-11-03 06:33:52 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|