rebased with master

This commit is contained in:
Ernir Erlingsson
2016-03-08 23:05:10 +01:00
parent 9af3ce123a
commit 10764d727b
12 changed files with 43 additions and 35 deletions

View File

@@ -1,5 +1,6 @@
package org.briarproject.messaging;
import org.briarproject.api.clients.ClientHelper;
import org.briarproject.api.contact.ContactManager;
import org.briarproject.api.data.BdfReaderFactory;
import org.briarproject.api.data.BdfWriterFactory;
@@ -25,19 +26,18 @@ public class MessagingModule {
@Provides
PrivateMessageFactory providePrivateMessageFactory(
MessageFactory messageFactory,
BdfWriterFactory bdfWriterFactory) {
return new PrivateMessageFactoryImpl(messageFactory, bdfWriterFactory);
ClientHelper clientHelper) {
return new PrivateMessageFactoryImpl(clientHelper);
}
@Provides
@Singleton
PrivateMessageValidator getValidator(ValidationManager validationManager,
BdfReaderFactory bdfReaderFactory, MetadataEncoder metadataEncoder,
ClientHelper clientHelper, MetadataEncoder metadataEncoder,
Clock clock) {
PrivateMessageValidator validator = new PrivateMessageValidator(
bdfReaderFactory, metadataEncoder, clock);
clientHelper, metadataEncoder, clock);
validationManager.registerMessageValidator(CLIENT_ID, validator);
return validator;
}

View File

@@ -14,7 +14,7 @@ import org.briarproject.clients.BdfMessageValidator;
import static org.briarproject.api.messaging.MessagingConstants.MAX_CONTENT_TYPE_LENGTH;
import static org.briarproject.api.messaging.MessagingConstants.MAX_PRIVATE_MESSAGE_BODY_LENGTH;
class PrivateMessageValidator extends BdfMessageValidator {
public class PrivateMessageValidator extends BdfMessageValidator {
PrivateMessageValidator(ClientHelper clientHelper,
MetadataEncoder metadataEncoder, Clock clock) {