mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Introduce more sharing states
This commit is contained in:
@@ -84,6 +84,8 @@ public interface GroupInvitationManager extends ConversationClient {
|
||||
* and {@link PrivateGroup} identified by the given {@link GroupId}.
|
||||
* This indicates whether the {@link PrivateGroup} can be shared
|
||||
* with the contact.
|
||||
*
|
||||
* @throws ProtocolStateException if {@link PrivateGroup} was already left.
|
||||
*/
|
||||
SharingStatus getSharingStatus(Contact c, GroupId g) throws DbException;
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.briarproject.bramble.api.contact.ContactId;
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.bramble.api.db.Transaction;
|
||||
import org.briarproject.bramble.api.sync.GroupId;
|
||||
import org.briarproject.briar.api.client.ProtocolStateException;
|
||||
import org.briarproject.briar.api.client.SessionId;
|
||||
import org.briarproject.briar.api.conversation.ConversationManager.ConversationClient;
|
||||
import org.briarproject.nullsafety.NotNullByDefault;
|
||||
@@ -24,10 +25,14 @@ public interface SharingManager<S extends Shareable>
|
||||
SHAREABLE,
|
||||
/**
|
||||
* The {@link Shareable} can not be shared with the requested contact,
|
||||
* because of an ongoing sharing session.
|
||||
* In most cases, this means that the contact was already invited.
|
||||
* because the contact was already invited.
|
||||
*/
|
||||
INVITED,
|
||||
INVITE_SENT,
|
||||
/**
|
||||
* The {@link Shareable} can not be shared with the requested contact,
|
||||
* because the contact has already invited us.
|
||||
*/
|
||||
INVITE_RECEIVED,
|
||||
/**
|
||||
* The {@link Shareable} can not be shared with the requested contact,
|
||||
* because it is already being shared.
|
||||
@@ -38,7 +43,11 @@ public interface SharingManager<S extends Shareable>
|
||||
* because it is not supported by that contact.
|
||||
* This could be a missing or outdated client.
|
||||
*/
|
||||
NOT_SUPPORTED
|
||||
NOT_SUPPORTED,
|
||||
/**
|
||||
* The sharing session has encountered an error.
|
||||
*/
|
||||
ERROR
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,6 +115,8 @@ public interface SharingManager<S extends Shareable>
|
||||
* and {@link Shareable} identified by the given {@link GroupId}.
|
||||
* This indicates whether the {@link Shareable} can be shared
|
||||
* with the contact.
|
||||
*
|
||||
* @throws ProtocolStateException if {@link Shareable} was already left.
|
||||
*/
|
||||
SharingStatus getSharingStatus(GroupId g, Contact c) throws DbException;
|
||||
|
||||
@@ -114,6 +125,8 @@ public interface SharingManager<S extends Shareable>
|
||||
* and {@link Shareable} identified by the given {@link GroupId}.
|
||||
* This indicates whether the {@link Shareable} can be shared
|
||||
* with the contact.
|
||||
*
|
||||
* @throws ProtocolStateException if {@link Shareable} was already left.
|
||||
*/
|
||||
SharingStatus getSharingStatus(Transaction txn, GroupId g, Contact c)
|
||||
throws DbException;
|
||||
|
||||
Reference in New Issue
Block a user