blob: 62985f7cf82e21b59c1b6ec3e0a924e51d4beddc [file] [log] [blame]
module ble;
interface V23BLE {
// Exports the given service id with the attributes specified. The
// keys should be string forms of 128-bit uuids. The values can be anything.
// Returns a handle to the service that can be used to stop the Advertisement.
Advertise(Advertisement adv) => (PluginStopper Handler);
// Scans for all services which match the given attributes. The key in
// the attribute map should be 128-bit uuids in human readable format.
// All services that have an exact match for the given attributes are
// returned. Attributes not specified in attributes will not be used
// in the match. Calls handler with each new service found. Returns
// a handle to the Scan operation so it can be canceled when no longer
// relevant
Scan(array<uint8>? id, map<string, string> attributes, PluginScanHandler handler) => (PluginStopper Handler);
};
struct Advertisement {
array<uint8> ServiceId;
Service Service;
};
struct Service {
array<uint8> InstanceId;
map<string, string> Attributes;
};
interface PluginScanHandler {
Found(Advertisement s);
Lost(Advertisement s);
};
interface PluginStopper {
Stop();
};