blob: 868238b3a6179e8ea0a40f3390001b9f112c56f9 [file] [log] [blame]
package io.v.v23.discovery;
import java.util.List;
import io.v.impl.google.lib.discovery.ScanHandler;
import io.v.v23.context.VContext;
import io.v.v23.security.BlessingPattern;
/**
* An interface that exposes the Vanadium Discovery Api.
*/
public interface VDiscovery {
interface DoneCallback {
/**
* Called when the advertisement or scan finishes.
*/
void done();
}
interface UpdateCallback {
/**
* Called when a new update for a Service that matches the scan query.
* @param update
*/
void handleUpdate(Update update);
}
void advertise(VContext ctx, Service service, List<BlessingPattern> patterns, DoneCallback cb);
void scan(VContext ctx, String query, UpdateCallback updateCb);
}