forked from noble/node-bluetooth-hci-socket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
38 lines (30 loc) · 950 Bytes
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// SPDX-Licence-Indentifier: MIT
// By: Yusuf Can INCE <[email protected]>
/// <reference types="node" />
interface Device {
devId: number | null;
devUp: boolean | null;
/** USB-IF vendor ID. */
idVendor: number | null;
/** USB-IF product ID. */
idProduct: number | null;
/** Integer USB device number */
busNumber: number | null;
/** Integer USB device address */
deviceAddress: number | null;
}
declare class BluetoothHciSocket extends NodeJS.EventEmitter {
getDeviceList(): Device[];
isDevUp(): boolean;
start(): void;
stop(): void;
reset(): void;
bindRaw(devId: number): number;
bindUser(devId: number): number;
bindControl(): number;
setFilter(filter: Buffer): void;
write(data: Buffer): void;
on(event: "data", cb: (data: Buffer) => void): this;
on(event: "error", cb: (error: NodeJS.ErrnoException) => void): this;
}
export = BluetoothHciSocket;