mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-11 18:29:05 +01:00
Clarify sharing state docs
This commit is contained in:
@@ -85,7 +85,8 @@ public interface GroupInvitationManager extends ConversationClient {
|
||||
* This indicates whether the {@link PrivateGroup} can be shared
|
||||
* with the contact.
|
||||
*
|
||||
* @throws ProtocolStateException if {@link PrivateGroup} was already left.
|
||||
* @throws ProtocolStateException if {@link PrivateGroup}
|
||||
* was already dissolved.
|
||||
*/
|
||||
SharingStatus getSharingStatus(Contact c, GroupId g) throws DbException;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public interface SharingManager<S extends Shareable>
|
||||
* This indicates whether the {@link Shareable} can be shared
|
||||
* with the contact.
|
||||
*
|
||||
* @throws ProtocolStateException if {@link Shareable} was already left.
|
||||
* @throws ProtocolStateException if we already left the {@link Shareable}.
|
||||
*/
|
||||
SharingStatus getSharingStatus(GroupId g, Contact c) throws DbException;
|
||||
|
||||
@@ -126,7 +126,7 @@ public interface SharingManager<S extends Shareable>
|
||||
* This indicates whether the {@link Shareable} can be shared
|
||||
* with the contact.
|
||||
*
|
||||
* @throws ProtocolStateException if {@link Shareable} was already left.
|
||||
* @throws ProtocolStateException if we already left the {@link Shareable}.
|
||||
*/
|
||||
SharingStatus getSharingStatus(Transaction txn, GroupId g, Contact c)
|
||||
throws DbException;
|
||||
|
||||
@@ -539,7 +539,8 @@ class GroupInvitationManagerImpl extends ConversationClientImpl
|
||||
if (state == START) return SharingStatus.SHAREABLE;
|
||||
if (state == INVITED) return SharingStatus.INVITE_RECEIVED;
|
||||
if (state == JOINED) return SharingStatus.SHARING;
|
||||
// The creator can also be a LEFT state, after re-adding a contact
|
||||
// Apart from the common case that the contact LEFT the group,
|
||||
// the creator can also be a LEFT state, after re-adding a contact
|
||||
// and re-creating the session with #recreateSession()
|
||||
if (state == CreatorState.LEFT) return SharingStatus.SHARING;
|
||||
if (state == DISSOLVED) throw new ProtocolStateException();
|
||||
|
||||
Reference in New Issue
Block a user