Create local state for clients at startup. #279

This commit is contained in:
akwizgran
2016-04-01 15:51:57 +01:00
parent 845d3fa47e
commit 945b5eb1ac
20 changed files with 209 additions and 105 deletions

View File

@@ -0,0 +1,12 @@
package org.briarproject.api.clients;
import org.briarproject.api.db.DbException;
import org.briarproject.api.db.Transaction;
public interface Client {
/**
* Called at startup to create any local state needed by the client.
*/
void createLocalState(Transaction txn) throws DbException;
}

View File

@@ -6,6 +6,9 @@ import org.briarproject.api.sync.Group;
public interface PrivateGroupFactory {
/** Creates a group that is not shared with any contacts. */
Group createLocalGroup(ClientId clientId);
/** Creates a group for the given client to share with the given contact. */
Group createPrivateGroup(ClientId clientId, Contact contact);
}