Allow responding to sharing invitations based on SessionId

This commit is contained in:
Torsten Grote
2016-10-18 08:49:34 -02:00
parent 96666273d3
commit e00219c15f
3 changed files with 52 additions and 26 deletions

View File

@@ -1,6 +1,7 @@
package org.briarproject.api.sharing;
import org.briarproject.api.clients.MessageTracker;
import org.briarproject.api.clients.SessionId;
import org.briarproject.api.contact.Contact;
import org.briarproject.api.contact.ContactId;
import org.briarproject.api.db.DbException;
@@ -30,7 +31,14 @@ public interface SharingManager<S extends Shareable> extends MessageTracker {
throws DbException;
/**
* Returns all group sharing messages sent by the given contact.
* Responds to a pending group invitation
*/
void respondToInvitation(SessionId id, boolean accept)
throws DbException;
/**
* Returns all group sharing messages sent by the Contact
* identified by contactId.
*/
Collection<InvitationMessage> getInvitationMessages(
ContactId contactId) throws DbException;