Add a method for getting a client's visibility.

This commit is contained in:
akwizgran
2018-04-13 16:51:44 +01:00
parent cc6fed0298
commit a9f77f0f90
2 changed files with 30 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
package org.briarproject.bramble.api.sync;
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.lifecycle.LifecycleManager;
@@ -34,6 +35,13 @@ public interface ClientVersioningManager {
void registerClientVersioningHook(ClientId clientId, int clientVersion,
ClientVersioningHook hook);
/**
* Returns the visibility of the given client with respect to the given
* contact.
*/
Visibility getClientVisibility(Transaction txn, ContactId contactId,
ClientId clientId, int clientVersion) throws DbException;
interface ClientVersioningHook {
void onClientVisibilityChanging(Transaction txn, Contact c,