Create an identity at startup if the database doesn't exist.

This commit is contained in:
akwizgran
2013-04-08 16:01:52 +01:00
parent ce7e9e73c9
commit de472ba2a6
47 changed files with 934 additions and 419 deletions

View File

@@ -37,12 +37,8 @@ import net.sf.briar.api.transport.TemporarySecret;
*/
public interface DatabaseComponent {
/**
* Opens the database.
* @param resume true to reopen an existing database or false to create a
* new one.
*/
void open(boolean resume) throws DbException, IOException;
/** Opens the database and returns true if the database already existed. */
boolean open() throws DbException, IOException;
/** Waits for any open transactions to finish and closes the database. */
void close() throws DbException, IOException;

View File

@@ -4,7 +4,9 @@ import java.io.File;
public interface DatabaseConfig {
File getDataDirectory();
boolean databaseExists();
File getDatabaseDirectory();
char[] getPassword();