/** * Web Bluetooth-backed `SensorDeviceClient`. A single generic * client wraps either of `@dg-kit/protocol`'s sensor adapters * (`PawPrintsSensorAdapter`, `CivetPressureSensorAdapter`) — they share the * exact same `WebBluetoothSensorAdapter` shape * (onConnected/onDisconnected/getState/subscribe/onStateChanged), only their * LED-setting method name differs (`setLedSolid` vs `setIndicatorColor`), * which is why `setIndicatorColor` is threaded in as a constructor callback * rather than called directly on the adapter. */ import { type CivetPressureReading, type PawPrintsReading, type WebBluetoothSensorAdapter } from '@dg-kit/protocol'; import type { BluetoothDeviceLike, BluetoothRemoteGATTServerLike, NavigatorBluetoothLike, RequestDeviceOptionsLike } from '@dg-kit/protocol'; import type { SensorState } from '@dg-kit/core'; import type { SensorDeviceClient } from '@dg-kit/core'; export interface WebBluetoothSensorClientOptions { adapter: WebBluetoothSensorAdapter; requestDeviceOptions: RequestDeviceOptionsLike; navigatorRef?: NavigatorBluetoothLike; setIndicatorColor: (color: number) => Promise; } export declare class WebBluetoothSensorClient implements SensorDeviceClient { private readonly options; private readonly listeners; private device; constructor(options: WebBluetoothSensorClientOptions); connect(): Promise; /** * Attach to an already-obtained `(device, server)` pair instead of * running this client's own chooser prompt — see * `aux-device-connect.ts`'s `attachAuxDevice()` doc comment. */ connectDevice(device: BluetoothDeviceLike, server: BluetoothRemoteGATTServerLike): Promise; disconnect(): Promise; getState(): Promise; subscribe(listener: (reading: TReading) => void): () => void; onStateChanged(listener: (state: SensorState) => void): () => void; setIndicatorColor(color: number): Promise; private readonly handleGattDisconnected; private emit; } export interface WebBluetoothAuxSensorClientOptions { navigatorRef?: NavigatorBluetoothLike; /** Overrides the default kind-scoped scan filter — mainly for tests. */ requestDeviceOptions?: RequestDeviceOptionsLike; } export declare class WebBluetoothPawPrintsClient extends WebBluetoothSensorClient { constructor(options?: WebBluetoothAuxSensorClientOptions); } export declare class WebBluetoothCivetEdgingClient extends WebBluetoothSensorClient { constructor(options?: WebBluetoothAuxSensorClientOptions); } //# sourceMappingURL=sensor-client.d.ts.map