44 lines
1000 B
Java
44 lines
1000 B
Java
package org.mercury_im.messenger.core.entity;
|
|
|
|
public interface Contact<
|
|
AC extends Account<AD, ?>,
|
|
AD extends Address.UserAddress>
|
|
extends Interlocutor<AC, AD> {
|
|
|
|
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
|
|
}
|
|
}
|