diff --git a/briar-android-tests/src/test/java/org/briarproject/sync/SimplexMessagingComponent.java b/briar-android-tests/src/test/java/org/briarproject/sync/SimplexMessagingComponent.java
index 2e3e19442..1d0a7d70f 100644
--- a/briar-android-tests/src/test/java/org/briarproject/sync/SimplexMessagingComponent.java
+++ b/briar-android-tests/src/test/java/org/briarproject/sync/SimplexMessagingComponent.java
@@ -14,6 +14,7 @@ import org.briarproject.api.sync.PacketWriterFactory;
import org.briarproject.api.transport.KeyManager;
import org.briarproject.api.transport.StreamReaderFactory;
import org.briarproject.api.transport.StreamWriterFactory;
+import org.briarproject.clients.ClientsModule;
import org.briarproject.contact.ContactModule;
import org.briarproject.crypto.CryptoModule;
import org.briarproject.data.DataModule;
@@ -33,7 +34,7 @@ import dagger.Component;
LifecycleModule.class, ContactModule.class, CryptoModule.class,
DatabaseModule.class, EventModule.class, SyncModule.class,
DataModule.class, TransportModule.class, IdentityModule.class,
- MessagingModule.class})
+ MessagingModule.class, ClientsModule.class})
public interface SimplexMessagingComponent {
void inject(SimplexMessagingIntegrationTest testCase);
LifecycleManager getLifeCycleManager();
diff --git a/briar-android-tests/src/test/java/org/briarproject/sync/SimplexMessagingIntegrationTest.java b/briar-android-tests/src/test/java/org/briarproject/sync/SimplexMessagingIntegrationTest.java
index dbc1b6a4f..d8eefc25b 100644
--- a/briar-android-tests/src/test/java/org/briarproject/sync/SimplexMessagingIntegrationTest.java
+++ b/briar-android-tests/src/test/java/org/briarproject/sync/SimplexMessagingIntegrationTest.java
@@ -1,6 +1,7 @@
package org.briarproject.sync;
import org.briarproject.BriarTestCase;
+import org.briarproject.ImmediateExecutor;
import org.briarproject.TestDatabaseModule;
import org.briarproject.TestUtils;
import org.briarproject.api.TransportId;
@@ -8,7 +9,7 @@ import org.briarproject.api.contact.ContactId;
import org.briarproject.api.contact.ContactManager;
import org.briarproject.api.crypto.SecretKey;
import org.briarproject.api.db.DatabaseComponent;
-import org.briarproject.api.db.StorageStatus;
+import org.briarproject.api.db.Transaction;
import org.briarproject.api.event.Event;
import org.briarproject.api.event.EventBus;
import org.briarproject.api.event.EventListener;
@@ -31,7 +32,6 @@ import org.briarproject.api.transport.KeyManager;
import org.briarproject.api.transport.StreamContext;
import org.briarproject.api.transport.StreamReaderFactory;
import org.briarproject.api.transport.StreamWriterFactory;
-import org.briarproject.plugins.ImmediateExecutor;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -79,6 +79,140 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
read(write());
}
+ private byte[] write() throws Exception {
+ // Instantiate Alice's services
+ LifecycleManager lifecycleManager = alice.getLifeCycleManager();
+ DatabaseComponent db = alice.getDatabaseComponent();
+ IdentityManager identityManager = alice.getIdentityManager();
+ ContactManager contactManager = alice.getContactManager();
+ MessagingManager messagingManager = alice.getMessagingManager();
+ KeyManager keyManager = alice.getKeyManager();
+ PrivateMessageFactory privateMessageFactory =
+ alice.getPrivateMessageFactory();
+ PacketWriterFactory packetWriterFactory =
+ alice.getPacketWriterFactory();
+ EventBus eventBus = alice.getEventBus();
+ StreamWriterFactory streamWriterFactory =
+ alice.getStreamWriterFactory();
+
+ // Start the lifecycle manager
+ lifecycleManager.startServices();
+ lifecycleManager.waitForStartup();
+ // Add a transport
+ Transaction txn = db.startTransaction();
+ try {
+ db.addTransport(txn, transportId, MAX_LATENCY);
+ txn.setComplete();
+ } finally {
+ db.endTransaction(txn);
+ }
+ // Add an identity for Alice
+ LocalAuthor aliceAuthor = new LocalAuthor(aliceId, "Alice",
+ new byte[MAX_PUBLIC_KEY_LENGTH], new byte[123], timestamp);
+ identityManager.addLocalAuthor(aliceAuthor);
+ // Add Bob as a contact
+ Author bobAuthor = new Author(bobId, "Bob",
+ new byte[MAX_PUBLIC_KEY_LENGTH]);
+ ContactId contactId = contactManager.addContact(bobAuthor, aliceId,
+ master, timestamp, true, true);
+
+ // Send Bob a message
+ GroupId groupId = messagingManager.getConversationId(contactId);
+ byte[] body = "Hi Bob!".getBytes("UTF-8");
+ PrivateMessage message = privateMessageFactory.createPrivateMessage(
+ groupId, timestamp, null, "text/plain", body);
+ messagingManager.addLocalMessage(message);
+ // Get a stream context
+ StreamContext ctx = keyManager.getStreamContext(contactId, transportId);
+ assertNotNull(ctx);
+ // Create a stream writer
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ OutputStream streamWriter = streamWriterFactory.createStreamWriter(
+ out, ctx);
+ // Create an outgoing sync session
+ PacketWriter packetWriter = packetWriterFactory.createPacketWriter(
+ streamWriter);
+ SyncSession session = new SimplexOutgoingSession(db,
+ new ImmediateExecutor(), eventBus, contactId, transportId,
+ MAX_LATENCY, packetWriter);
+ // Write whatever needs to be written
+ session.run();
+ streamWriter.close();
+
+ // Clean up
+ lifecycleManager.stopServices();
+ lifecycleManager.waitForShutdown();
+
+ // Return the contents of the stream
+ return out.toByteArray();
+ }
+
+ private void read(byte[] stream) throws Exception {
+ // Instantiate Bob's services
+ LifecycleManager lifecycleManager = bob.getLifeCycleManager();
+ DatabaseComponent db = bob.getDatabaseComponent();
+ IdentityManager identityManager = bob.getIdentityManager();
+ ContactManager contactManager = bob.getContactManager();
+ KeyManager keyManager = bob.getKeyManager();
+ StreamReaderFactory streamReaderFactory = bob.getStreamReaderFactory();
+ PacketReaderFactory packetReaderFactory = bob.getPacketReaderFactory();
+ EventBus eventBus = bob.getEventBus();
+ // Bob needs a MessagingManager even though we're not using it directly
+ bob.getMessagingManager();
+
+ // Start the lifecyle manager
+ lifecycleManager.startServices();
+ lifecycleManager.waitForStartup();
+ // Add a transport
+ Transaction txn = db.startTransaction();
+ try {
+ db.addTransport(txn, transportId, MAX_LATENCY);
+ txn.setComplete();
+ } finally {
+ db.endTransaction(txn);
+ }
+ // Add an identity for Bob
+ LocalAuthor bobAuthor = new LocalAuthor(bobId, "Bob",
+ new byte[MAX_PUBLIC_KEY_LENGTH], new byte[123], timestamp);
+ identityManager.addLocalAuthor(bobAuthor);
+ // Add Alice as a contact
+ Author aliceAuthor = new Author(aliceId, "Alice",
+ new byte[MAX_PUBLIC_KEY_LENGTH]);
+ ContactId contactId = contactManager.addContact(aliceAuthor, bobId,
+ master, timestamp, false, true);
+
+ // Set up an event listener
+ MessageListener listener = new MessageListener();
+ bob.getEventBus().addListener(listener);
+ // Read and recognise the tag
+ ByteArrayInputStream in = new ByteArrayInputStream(stream);
+ byte[] tag = new byte[TAG_LENGTH];
+ int read = in.read(tag);
+ assertEquals(tag.length, read);
+ StreamContext ctx = keyManager.getStreamContext(transportId, tag);
+ assertNotNull(ctx);
+ // Create a stream reader
+ InputStream streamReader = streamReaderFactory.createStreamReader(
+ in, ctx);
+ // Create an incoming sync session
+ PacketReader packetReader = packetReaderFactory.createPacketReader(
+ streamReader);
+ SyncSession session = new IncomingSession(db, new ImmediateExecutor(),
+ eventBus, contactId, transportId, packetReader);
+ // No messages should have been added yet
+ assertFalse(listener.messageAdded);
+ // Read whatever needs to be read
+ session.run();
+ streamReader.close();
+ // The private message from Alice should have been added
+ assertTrue(listener.messageAdded);
+
+ // Clean up
+ lifecycleManager.stopServices();
+ lifecycleManager.waitForShutdown();
+ }
+
+ /*
private byte[] write() throws Exception {
// Instantiate Alice's services
LifecycleManager lifecycleManager = alice.getLifeCycleManager();
@@ -201,6 +335,7 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
lifecycleManager.stopServices();
lifecycleManager.waitForShutdown();
}
+ */
@After
public void tearDown() {
diff --git a/briar-android/res/values/roboguice.xml b/briar-android/res/values/roboguice.xml
deleted file mode 100644
index 60265f1c2..000000000
--- a/briar-android/res/values/roboguice.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
- - org.briarproject.android.AndroidModule
- - org.briarproject.clients.ClientsModule
- - org.briarproject.contact.ContactModule
- - org.briarproject.crypto.CryptoModule
- - org.briarproject.data.DataModule
- - org.briarproject.db.DatabaseModule
- - org.briarproject.event.EventModule
- - org.briarproject.forum.ForumModule
- - org.briarproject.identity.IdentityModule
- - org.briarproject.invitation.InvitationModule
- - org.briarproject.lifecycle.LifecycleModule
- - org.briarproject.messaging.MessagingModule
- - org.briarproject.plugins.AndroidPluginsModule
- - org.briarproject.properties.PropertiesModule
- - org.briarproject.sync.SyncModule
- - org.briarproject.system.AndroidSystemModule
- - org.briarproject.transport.TransportModule
- - org.briarproject.settings.SettingsModule
-
-
diff --git a/briar-android/src/org/briarproject/android/AndroidComponent.java b/briar-android/src/org/briarproject/android/AndroidComponent.java
index e360a10ec..caf43416a 100644
--- a/briar-android/src/org/briarproject/android/AndroidComponent.java
+++ b/briar-android/src/org/briarproject/android/AndroidComponent.java
@@ -14,6 +14,7 @@ import org.briarproject.android.identity.CreateIdentityActivity;
import org.briarproject.android.invitation.AddContactActivity;
import org.briarproject.android.panic.PanicPreferencesActivity;
import org.briarproject.android.panic.PanicResponderActivity;
+import org.briarproject.clients.ClientsModule;
import org.briarproject.contact.ContactModule;
import org.briarproject.crypto.CryptoModule;
import org.briarproject.data.DataModule;
@@ -44,7 +45,7 @@ import dagger.Component;
EventModule.class, DataModule.class, ContactModule.class,
AndroidSystemModule.class, AndroidPluginsModule.class,
PropertiesModule.class, TransportModule.class, SyncModule.class,
- SettingsModule.class})
+ SettingsModule.class, ClientsModule.class})
public interface AndroidComponent {
void inject(SplashScreenActivity activity);
void inject(SetupActivity activity);
diff --git a/briar-core/src/org/briarproject/clients/ClientHelperImpl.java b/briar-core/src/org/briarproject/clients/ClientHelperImpl.java
index 65740a391..40640c17a 100644
--- a/briar-core/src/org/briarproject/clients/ClientHelperImpl.java
+++ b/briar-core/src/org/briarproject/clients/ClientHelperImpl.java
@@ -1,7 +1,5 @@
package org.briarproject.clients;
-import com.google.inject.Inject;
-
import org.briarproject.api.FormatException;
import org.briarproject.api.clients.ClientHelper;
import org.briarproject.api.data.BdfDictionary;
@@ -30,6 +28,8 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
+import javax.inject.Inject;
+
import static org.briarproject.api.sync.SyncConstants.MESSAGE_HEADER_LENGTH;
class ClientHelperImpl implements ClientHelper {
diff --git a/briar-core/src/org/briarproject/clients/ClientsModule.java b/briar-core/src/org/briarproject/clients/ClientsModule.java
index b4c1a306c..10bcbc3c7 100644
--- a/briar-core/src/org/briarproject/clients/ClientsModule.java
+++ b/briar-core/src/org/briarproject/clients/ClientsModule.java
@@ -1,19 +1,36 @@
package org.briarproject.clients;
-import com.google.inject.AbstractModule;
-
import org.briarproject.api.clients.ClientHelper;
-import org.briarproject.api.clients.MessageQueueManager;
import org.briarproject.api.clients.PrivateGroupFactory;
-import org.briarproject.api.clients.QueueMessageFactory;
+import org.briarproject.api.data.BdfReaderFactory;
+import org.briarproject.api.data.BdfWriterFactory;
+import org.briarproject.api.data.MetadataEncoder;
+import org.briarproject.api.data.MetadataParser;
+import org.briarproject.api.db.DatabaseComponent;
+import org.briarproject.api.sync.GroupFactory;
+import org.briarproject.api.sync.MessageFactory;
-public class ClientsModule extends AbstractModule {
+import dagger.Module;
+import dagger.Provides;
- @Override
- protected void configure() {
- bind(ClientHelper.class).to(ClientHelperImpl.class);
- bind(MessageQueueManager.class).to(MessageQueueManagerImpl.class);
- bind(PrivateGroupFactory.class).to(PrivateGroupFactoryImpl.class);
- bind(QueueMessageFactory.class).to(QueueMessageFactoryImpl.class);
+@Module
+public class ClientsModule {
+
+ @Provides
+ ClientHelper provideClientHelper(DatabaseComponent db,
+ MessageFactory messageFactory, BdfReaderFactory bdfReaderFactory,
+ BdfWriterFactory bdfWriterFactory, MetadataParser metadataParser,
+ MetadataEncoder metadataEncoder) {
+ return new ClientHelperImpl(db, messageFactory, bdfReaderFactory,
+ bdfWriterFactory, metadataParser, metadataEncoder);
}
+
+ @Provides
+ PrivateGroupFactory providePrivateGroupFactory(GroupFactory groupFactory,
+ BdfWriterFactory bdfWriterFactory) {
+ return new PrivateGroupFactoryImpl(groupFactory, bdfWriterFactory);
+ }
+
+ bind(QueueMessageFactory.class).to(QueueMessageFactoryImpl.class);
+
}
diff --git a/briar-core/src/org/briarproject/contact/ContactManagerImpl.java b/briar-core/src/org/briarproject/contact/ContactManagerImpl.java
index 83de8540d..df75b73e1 100644
--- a/briar-core/src/org/briarproject/contact/ContactManagerImpl.java
+++ b/briar-core/src/org/briarproject/contact/ContactManagerImpl.java
@@ -19,22 +19,9 @@ import java.util.Collections;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-<<<<<<< 08099714bab27d1ed48a8bee431a35a38098ecec
-class ContactManagerImpl implements ContactManager, RemoveIdentityHook {
-=======
import javax.inject.Inject;
-import static java.util.logging.Level.WARNING;
-import static org.briarproject.api.db.StorageStatus.ACTIVE;
-import static org.briarproject.api.db.StorageStatus.ADDING;
-import static org.briarproject.api.db.StorageStatus.REMOVING;
-
-class ContactManagerImpl implements ContactManager, Service,
- RemoveIdentityHook {
-
- private static final Logger LOG =
- Logger.getLogger(ContactManagerImpl.class.getName());
->>>>>>> Switched Roboguice/Guice out for Dagger 2
+class ContactManagerImpl implements ContactManager, RemoveIdentityHook {
private final DatabaseComponent db;
private final KeyManager keyManager;
diff --git a/briar-core/src/org/briarproject/contact/ContactModule.java b/briar-core/src/org/briarproject/contact/ContactModule.java
index 55bb854b3..f2009be57 100644
--- a/briar-core/src/org/briarproject/contact/ContactModule.java
+++ b/briar-core/src/org/briarproject/contact/ContactModule.java
@@ -17,7 +17,6 @@ public class ContactModule {
ContactManager getContactManager(LifecycleManager lifecycleManager,
IdentityManager identityManager,
ContactManagerImpl contactManager) {
- lifecycleManager.register(contactManager);
identityManager.registerRemoveIdentityHook(contactManager);
return contactManager;
}
diff --git a/briar-core/src/org/briarproject/forum/ForumModule.java b/briar-core/src/org/briarproject/forum/ForumModule.java
index e58b7e2a0..5712c165e 100644
--- a/briar-core/src/org/briarproject/forum/ForumModule.java
+++ b/briar-core/src/org/briarproject/forum/ForumModule.java
@@ -27,11 +27,10 @@ public class ForumModule {
@Provides
@Singleton
ForumManager provideForumManager(DatabaseComponent db,
- ContactManager contactManager,
- BdfReaderFactory bdfReaderFactory, MetadataEncoder metadataEncoder,
- MetadataParser metadataParser) {
- return new ForumManagerImpl(db, contactManager, bdfReaderFactory,
- metadataEncoder, metadataParser);
+ ContactManager contactManager, BdfReaderFactory bdfReaderFactory,
+ MetadataEncoder metadataEncoder, MetadataParser metadataParser) {
+ return new ForumManagerImpl(db, bdfReaderFactory, metadataEncoder,
+ metadataParser);
}
@Provides
diff --git a/briar-core/src/org/briarproject/forum/ForumSharingManagerImpl.java b/briar-core/src/org/briarproject/forum/ForumSharingManagerImpl.java
index c916a54e6..b0e8fd486 100644
--- a/briar-core/src/org/briarproject/forum/ForumSharingManagerImpl.java
+++ b/briar-core/src/org/briarproject/forum/ForumSharingManagerImpl.java
@@ -37,12 +37,8 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
-<<<<<<< 08099714bab27d1ed48a8bee431a35a38098ecec
-=======
import javax.inject.Inject;
-import static java.util.logging.Level.WARNING;
->>>>>>> Switched Roboguice/Guice out for Dagger 2
import static org.briarproject.api.forum.ForumConstants.FORUM_SALT_LENGTH;
import static org.briarproject.api.forum.ForumConstants.MAX_FORUM_NAME_LENGTH;
import static org.briarproject.api.sync.SyncConstants.MESSAGE_HEADER_LENGTH;
diff --git a/briar-core/src/org/briarproject/identity/IdentityManagerImpl.java b/briar-core/src/org/briarproject/identity/IdentityManagerImpl.java
index a35a85f6d..997456d29 100644
--- a/briar-core/src/org/briarproject/identity/IdentityManagerImpl.java
+++ b/briar-core/src/org/briarproject/identity/IdentityManagerImpl.java
@@ -11,22 +11,9 @@ import java.util.Collection;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
-<<<<<<< 08099714bab27d1ed48a8bee431a35a38098ecec
-class IdentityManagerImpl implements IdentityManager {
-=======
import javax.inject.Inject;
-import static java.util.logging.Level.WARNING;
-import static org.briarproject.api.db.StorageStatus.ACTIVE;
-import static org.briarproject.api.db.StorageStatus.ADDING;
-import static org.briarproject.api.db.StorageStatus.REMOVING;
-
-class IdentityManagerImpl implements IdentityManager, Service {
-
- private static final Logger LOG =
- Logger.getLogger(IdentityManagerImpl.class.getName());
->>>>>>> Switched Roboguice/Guice out for Dagger 2
-
+class IdentityManagerImpl implements IdentityManager {
private final DatabaseComponent db;
private final List addHooks;
private final List removeHooks;
diff --git a/briar-core/src/org/briarproject/identity/IdentityModule.java b/briar-core/src/org/briarproject/identity/IdentityModule.java
index 78d2b776c..99e8eeb0f 100644
--- a/briar-core/src/org/briarproject/identity/IdentityModule.java
+++ b/briar-core/src/org/briarproject/identity/IdentityModule.java
@@ -1,8 +1,14 @@
package org.briarproject.identity;
+import org.briarproject.api.crypto.CryptoComponent;
+import org.briarproject.api.data.BdfWriterFactory;
+import org.briarproject.api.data.ObjectReader;
import org.briarproject.api.db.DatabaseComponent;
import org.briarproject.api.event.EventBus;
+import org.briarproject.api.identity.Author;
+import org.briarproject.api.identity.AuthorFactory;
import org.briarproject.api.identity.IdentityManager;
+import org.briarproject.api.system.Clock;
import javax.inject.Singleton;
@@ -13,8 +19,18 @@ import dagger.Provides;
public class IdentityModule {
@Provides
- @Singleton
- IdentityManager provideIdendityModule(DatabaseComponent db, EventBus eventBus) {
- return new IdentityManagerImpl(db, eventBus);
+ AuthorFactory provideAuthorFactory(CryptoComponent crypto,
+ BdfWriterFactory bdfWriterFactory, Clock clock) {
+ return new AuthorFactoryImpl(crypto, bdfWriterFactory, clock);
+ }
+
+ @Provides
+ IdentityManager provideIdendityModule(DatabaseComponent db) {
+ return new IdentityManagerImpl(db);
+ }
+
+ @Provides
+ ObjectReader provideAuthorReader(AuthorFactory authorFactory) {
+ return new AuthorReader(authorFactory);
}
}
diff --git a/briar-core/src/org/briarproject/invitation/InvitationModule.java b/briar-core/src/org/briarproject/invitation/InvitationModule.java
index de6d8bde2..1a604c9e6 100644
--- a/briar-core/src/org/briarproject/invitation/InvitationModule.java
+++ b/briar-core/src/org/briarproject/invitation/InvitationModule.java
@@ -30,13 +30,12 @@ public class InvitationModule {
BdfWriterFactory bdfWriterFactory,
StreamReaderFactory streamReaderFactory,
StreamWriterFactory streamWriterFactory,
- AuthorFactory authorFactory, GroupFactory groupFactory,
- KeyManager keyManager, ConnectionManager connectionManager,
+ AuthorFactory authorFactory, ConnectionManager connectionManager,
IdentityManager identityManager, ContactManager contactManager,
Clock clock, PluginManager pluginManager) {
return new InvitationTaskFactoryImpl(crypto, bdfReaderFactory,
bdfWriterFactory, streamReaderFactory, streamWriterFactory,
- authorFactory, groupFactory, keyManager, connectionManager,
- identityManager, contactManager, clock, pluginManager);
+ authorFactory, connectionManager, identityManager,
+ contactManager, clock, pluginManager);
}
}
diff --git a/briar-core/src/org/briarproject/plugins/PluginsModule.java b/briar-core/src/org/briarproject/plugins/PluginsModule.java
index 67f27b08b..6b750c214 100644
--- a/briar-core/src/org/briarproject/plugins/PluginsModule.java
+++ b/briar-core/src/org/briarproject/plugins/PluginsModule.java
@@ -5,6 +5,7 @@ import javax.inject.Singleton;
import org.briarproject.api.event.EventBus;
import org.briarproject.api.lifecycle.IoExecutor;
import org.briarproject.api.lifecycle.LifecycleManager;
+import org.briarproject.api.plugins.BackoffFactory;
import org.briarproject.api.plugins.ConnectionManager;
import org.briarproject.api.plugins.ConnectionRegistry;
import org.briarproject.api.plugins.PluginManager;
@@ -14,6 +15,7 @@ import org.briarproject.api.transport.KeyManager;
import org.briarproject.api.transport.StreamReaderFactory;
import org.briarproject.api.transport.StreamWriterFactory;
+import java.security.SecureRandom;
import java.util.concurrent.Executor;
import dagger.Module;
@@ -23,10 +25,16 @@ import dagger.Provides;
@Module
public class PluginsModule {
+ @Provides
+ BackoffFactory provideBackoffFactory() {
+ return new BackoffFactoryImpl();
+ }
+
@Provides
Poller providePoller(@IoExecutor Executor ioExecutor,
- ConnectionRegistry connectionRegistry, Timer timer) {
- return new PollerImpl(ioExecutor, connectionRegistry, timer);
+ ConnectionRegistry connectionRegistry, SecureRandom random,
+ Timer timer) {
+ return new PollerImpl(ioExecutor, connectionRegistry, random, timer);
}
@Provides
diff --git a/briar-core/src/org/briarproject/sync/SyncModule.java b/briar-core/src/org/briarproject/sync/SyncModule.java
index d52c9fa35..654f029e6 100644
--- a/briar-core/src/org/briarproject/sync/SyncModule.java
+++ b/briar-core/src/org/briarproject/sync/SyncModule.java
@@ -9,12 +9,10 @@ import org.briarproject.api.event.EventBus;
import org.briarproject.api.identity.Author;
import org.briarproject.api.identity.AuthorFactory;
import org.briarproject.api.lifecycle.LifecycleManager;
-import org.briarproject.api.sync.Group;
import org.briarproject.api.sync.GroupFactory;
import org.briarproject.api.sync.MessageFactory;
import org.briarproject.api.sync.PacketReaderFactory;
import org.briarproject.api.sync.PacketWriterFactory;
-import org.briarproject.api.sync.PrivateGroupFactory;
import org.briarproject.api.sync.SyncSessionFactory;
import org.briarproject.api.sync.ValidationManager;
import org.briarproject.api.system.Clock;
@@ -29,12 +27,6 @@ import dagger.Provides;
@Module
public class SyncModule {
- @Provides
- AuthorFactory provideAuthFactory(CryptoComponent crypto,
- BdfWriterFactory bdfWriterFactory, Clock clock) {
- return new AuthorFactoryImpl(crypto, bdfWriterFactory, clock);
- }
-
@Provides
GroupFactory provideGroupFactory(CryptoComponent crypto) {
return new GroupFactoryImpl(crypto);
@@ -55,12 +47,6 @@ public class SyncModule {
return new PacketWriterFactoryImpl();
}
- @Provides
- PrivateGroupFactory providePrivateGroupFactory(GroupFactory groupFactory,
- BdfWriterFactory bdfWriterFactory) {
- return new PrivateGroupFactoryImpl(groupFactory, bdfWriterFactory);
- }
-
@Provides
@Singleton
SyncSessionFactory provideSyncSessionFactory(DatabaseComponent db,
@@ -71,12 +57,6 @@ public class SyncModule {
packetReaderFactory, packetWriterFactory);
}
-
- @Provides
- ObjectReader getAuthorReader(AuthorFactory authorFactory) {
- return new AuthorReader(authorFactory);
- }
-
@Provides
@Singleton
ValidationManager getValidationManager(LifecycleManager lifecycleManager,