Move remote wipe MessageType enum to briar-api

This commit is contained in:
ameba23
2021-05-25 12:55:26 +02:00
parent 76c37431ba
commit d42c25ebf7
2 changed files with 11 additions and 5 deletions

View File

@@ -1,29 +0,0 @@
package org.briarproject.briar.remotewipe;
import org.briarproject.bramble.api.FormatException;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import javax.annotation.concurrent.Immutable;
@Immutable
@NotNullByDefault
enum MessageType {
SETUP(0), WIPE(1);
private final int value;
MessageType(int value) {
this.value = value;
}
int getValue() {
return value;
}
static MessageType fromValue(int value) throws
FormatException {
for (MessageType m : values()) if (m.value == value) return m;
throw new FormatException();
}
}