mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Store threshold as constant
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
package org.briarproject.briar.remotewipe;
|
package org.briarproject.briar.remotewipe;
|
||||||
|
|
||||||
public interface RemoteWipeConstants {
|
public interface RemoteWipeConstants {
|
||||||
// Group metadata keys
|
|
||||||
String GROUP_KEY_CONTACT_ID = "contactId";
|
|
||||||
String GROUP_KEY_WIPERS = "wipers";
|
|
||||||
String GROUP_KEY_RECEIVED_WIPE = "receivedWipe";
|
|
||||||
|
|
||||||
// Message metadata keys
|
int THRESHOLD = 2;
|
||||||
String MSG_KEY_TIMESTAMP = "timestamp";
|
|
||||||
String MSG_KEY_MESSAGE_TYPE = "messageType";
|
// Group metadata keys
|
||||||
String MSG_KEY_LOCAL = "local";
|
String GROUP_KEY_CONTACT_ID = "contactId";
|
||||||
|
String GROUP_KEY_WIPERS = "wipers";
|
||||||
|
String GROUP_KEY_RECEIVED_WIPE = "receivedWipe";
|
||||||
|
|
||||||
|
// Message metadata keys
|
||||||
|
String MSG_KEY_TIMESTAMP = "timestamp";
|
||||||
|
String MSG_KEY_MESSAGE_TYPE = "messageType";
|
||||||
|
String MSG_KEY_LOCAL = "local";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ import static org.briarproject.briar.remotewipe.RemoteWipeConstants.GROUP_KEY_WI
|
|||||||
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.MSG_KEY_LOCAL;
|
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.MSG_KEY_LOCAL;
|
||||||
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.MSG_KEY_MESSAGE_TYPE;
|
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.MSG_KEY_MESSAGE_TYPE;
|
||||||
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.MSG_KEY_TIMESTAMP;
|
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.MSG_KEY_TIMESTAMP;
|
||||||
|
import static org.briarproject.briar.remotewipe.RemoteWipeConstants.THRESHOLD;
|
||||||
|
|
||||||
public class RemoteWipeManagerImpl extends ConversationClientImpl
|
public class RemoteWipeManagerImpl extends ConversationClientImpl
|
||||||
implements RemoteWipeManager, ContactManager.ContactHook,
|
implements RemoteWipeManager, ContactManager.ContactHook,
|
||||||
@@ -63,7 +64,6 @@ public class RemoteWipeManagerImpl extends ConversationClientImpl
|
|||||||
private final ContactManager contactManager;
|
private final ContactManager contactManager;
|
||||||
private final MessageEncoder messageEncoder;
|
private final MessageEncoder messageEncoder;
|
||||||
private final MessageParser messageParser;
|
private final MessageParser messageParser;
|
||||||
private static int THRESHOLD = 2; // TODO
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
protected RemoteWipeManagerImpl(
|
protected RemoteWipeManagerImpl(
|
||||||
|
|||||||
Reference in New Issue
Block a user