mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
@@ -0,0 +1,32 @@
|
||||
package org.briarproject.api.sharing;
|
||||
|
||||
import org.briarproject.api.contact.Contact;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
public class InvitationItem {
|
||||
|
||||
private final Shareable shareable;
|
||||
private final boolean subscribed;
|
||||
private final Collection<Contact> newSharers;
|
||||
|
||||
public InvitationItem(Shareable shareable, boolean subscribed,
|
||||
Collection<Contact> newSharers) {
|
||||
|
||||
this.shareable = shareable;
|
||||
this.subscribed = subscribed;
|
||||
this.newSharers = newSharers;
|
||||
}
|
||||
|
||||
public Shareable getShareable() {
|
||||
return shareable;
|
||||
}
|
||||
|
||||
public boolean isSubscribed() {
|
||||
return subscribed;
|
||||
}
|
||||
|
||||
public Collection<Contact> getNewSharers() {
|
||||
return newSharers;
|
||||
}
|
||||
}
|
||||
@@ -33,8 +33,8 @@ public interface SharingManager<S extends Shareable> {
|
||||
Collection<InvitationMessage> getInvitationMessages(
|
||||
ContactId contactId) throws DbException;
|
||||
|
||||
/** Returns all shareables to which the user has been invited. */
|
||||
Collection<S> getInvited() throws DbException;
|
||||
/** Returns all invitations to shareables. */
|
||||
Collection<InvitationItem> getInvitations() throws DbException;
|
||||
|
||||
/** Returns all contacts who are sharing the given group with us. */
|
||||
Collection<Contact> getSharedBy(GroupId g) throws DbException;
|
||||
|
||||
Reference in New Issue
Block a user