Add a stub for a GroupInvitationManager

This commit is contained in:
Torsten Grote
2016-10-17 10:35:29 -02:00
parent 8eeaf4e347
commit a33d7d1663
14 changed files with 372 additions and 24 deletions

View File

@@ -0,0 +1,48 @@
package org.briarproject.api.privategroup.invitation;
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;
import org.briarproject.api.privategroup.PrivateGroup;
import org.briarproject.api.sharing.InvitationMessage;
import org.briarproject.api.sync.ClientId;
import org.briarproject.api.sync.GroupId;
import java.util.Collection;
public interface GroupInvitationManager extends MessageTracker {
/** Returns the unique ID of the private group invitation client. */
ClientId getClientId();
/**
* Sends an invitation to share the given forum with the given contact
* and sends an optional message along with it.
*/
void sendInvitation(GroupId groupId, ContactId contactId,
String message) throws DbException;
/**
* Responds to a pending private group invitation
*/
void respondToInvitation(PrivateGroup g, Contact c, boolean accept)
throws DbException;
/**
* Responds to a pending private group invitation
*/
void respondToInvitation(SessionId id, boolean accept) throws DbException;
/**
* Returns all private group invitation messages related to the contact
* identified by contactId.
*/
Collection<InvitationMessage> getInvitationMessages(
ContactId contactId) throws DbException;
/** Returns all private groups to which the user has been invited. */
Collection<GroupInvitationItem> getInvitations() throws DbException;
}