Created interfaces for use by UI. #172 #173

This commit is contained in:
akwizgran
2015-12-16 13:10:05 +00:00
parent 545a2c04bb
commit 9fbdb08cf1
4 changed files with 173 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
package org.briarproject.api.contact;
import org.briarproject.api.Author;
import org.briarproject.api.AuthorId;
import org.briarproject.api.Contact;
import org.briarproject.api.ContactId;
import org.briarproject.api.db.DbException;
import java.util.Collection;
public interface ContactManager {
/**
* Stores a contact associated with the given local and remote pseudonyms,
* and returns an ID for the contact.
*/
ContactId addContact(Author remote, AuthorId local) throws DbException;
/** Returns the contact with the given ID. */
Contact getContact(ContactId c) throws DbException;
/** Returns all contacts. */
Collection<Contact> getContacts() throws DbException;
/** Removes a contact and all associated state. */
void removeContact(ContactId c) throws DbException;
}