Contact manager hooks. #209

This commit is contained in:
akwizgran
2016-01-19 19:16:35 +00:00
parent 33ef09a6bf
commit 82cf12040f
29 changed files with 333 additions and 195 deletions

View File

@@ -6,6 +6,26 @@ package org.briarproject.api.sync;
*/
public interface ValidationManager {
enum Status {
UNKNOWN(0), INVALID(1), VALID(2);
private final int value;
Status(int value) {
this.value = value;
}
public int getValue() {
return value;
}
public static Status fromValue(int value) {
for (Status s : values()) if (s.value == value) return s;
throw new IllegalArgumentException();
}
}
/** Sets the message validator for the given client. */
void setMessageValidator(ClientId c, MessageValidator v);
}