RemoteWipeManager WIP

This commit is contained in:
ameba23
2021-05-05 14:35:30 +02:00
parent 55e0ba8888
commit 0224733b10
3 changed files with 320 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
package org.briarproject.briar.api.remotewipe;
import org.briarproject.bramble.api.FormatException;
import org.briarproject.bramble.api.contact.Contact;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.bramble.api.db.DbException;
import org.briarproject.bramble.api.db.Transaction;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import org.briarproject.bramble.api.sync.ClientId;
import org.briarproject.briar.api.conversation.ConversationManager;
import org.briarproject.briar.api.conversation.ConversationMessageHeader;
import java.util.Collection;
import java.util.List;
@NotNullByDefault
public interface RemoteWipeManager extends ConversationManager.ConversationClient {
/**
* The unique ID of the remote wipe client.
*/
ClientId CLIENT_ID = new ClientId("pw.darkcrystal.remotewipe");
/**
* The current major version of the remote wipe client.
*/
int MAJOR_VERSION = 0;
/**
* The current minor version of the remote wipe client.
*/
int MINOR_VERSION = 0;
void setup(Transaction txn, List<ContactId> wipers)
throws DbException, FormatException;
void wipe(Transaction txn, Contact contact)
throws DbException, FormatException;
@Override
Collection<ConversationMessageHeader> getMessageHeaders(
Transaction txn, ContactId contactId) throws DbException;
}