blob: 17b5146584b2e8af4062feae43c97a6e6b9789df [file] [log] [blame]
module discovery;
interface Discovery {
// TODO(bjornick): Figure out how to do security in mojo
Advertise(Service service) => (DiscoveryStopper Handle);
Scan(string query, DiscoveryHandler handler) => (DiscoveryStopper Handle);
interface DiscoveryStopper {
// Stops the Advertisement/Scanning that is associated with this service
interface DiscoveryHandler {
Found(Service s);
Lost(array<uint8> id);
struct Service {
// The interface name this service implements.
// E.g. '
string InterfaceNames;
map<string, string> Attrs;
array<string> Addrs;