Skip to content

Commit

Permalink
feat: Improve mac bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Crespi committed Apr 12, 2021
1 parent 2819426 commit f18e577
Show file tree
Hide file tree
Showing 40 changed files with 457 additions and 181 deletions.
5 changes: 3 additions & 2 deletions lib/bindings/mac/Adapter.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ export declare class MacAdapter extends Adapter {
dispose(): void;
startScanning(serviceUUIDs?: string[], allowDuplicates?: boolean): Promise<void>;
private onDiscover;
private onNotification;
stopScanning(): Promise<void>;
getScannedPeripherals(): Promise<Peripheral[]>;
isAdvertising(): Promise<boolean>;
startAdvertising(deviceName: string, serviceUUIDs?: string[]): Promise<void>;
startAdvertising(): Promise<void>;
stopAdvertising(): Promise<void>;
setupGatt(maxMtu?: number): Promise<GattLocal>;
setupGatt(): Promise<GattLocal>;
}
//# sourceMappingURL=Adapter.d.ts.map
2 changes: 1 addition & 1 deletion lib/bindings/mac/Adapter.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 25 additions & 6 deletions lib/bindings/mac/Adapter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/bindings/mac/Adapter.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions lib/bindings/mac/Peripheral.d.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/// <reference types="node" />
import { AddressType, ConnectOptions, GattRemote, Peripheral } from "../../models";
import { MacAdapter } from "./Adapter";
import { AddressType, GattRemote, Peripheral } from '../../models';
import { MacAdapter } from './Adapter';
export declare class MacPeripheral extends Peripheral {
readonly adapter: MacAdapter;
constructor(adapter: MacAdapter, uuid: string, name: string, addressType: AddressType, address: string, manufacturerData: Buffer, rssi: number);
connect(options?: ConnectOptions): Promise<GattRemote>;
connect(): Promise<GattRemote>;
disconnect(): Promise<void>;
}
//# sourceMappingURL=Peripheral.d.ts.map
2 changes: 1 addition & 1 deletion lib/bindings/mac/Peripheral.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions lib/bindings/mac/Peripheral.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/bindings/mac/Peripheral.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions lib/bindings/mac/gatt/Characteristic.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/// <reference types="node" />
import { GattCharacteristic, GattDescriptor } from "../../../models";
import { MacGattService } from "./Service";
import { GattCharacteristic, GattDescriptor } from '../../../models';
import { MacGattService } from './Service';
export declare class MacGattCharacteristic extends GattCharacteristic {
readonly service: MacGattService;
discoverDescriptors(): Promise<GattDescriptor[]>;
read(): Promise<Buffer>;
write(data: Buffer, withoutResponse: boolean): Promise<void>;
broadcast(broadcast: boolean): Promise<void>;
write(value: Buffer): Promise<void>;
broadcast(): Promise<void>;
notify(notify: boolean): Promise<void>;
addDescriptor(uuid: string, value: Buffer): Promise<GattDescriptor>;
addDescriptor(): Promise<GattDescriptor>;
}
//# sourceMappingURL=Characteristic.d.ts.map
2 changes: 1 addition & 1 deletion lib/bindings/mac/gatt/Characteristic.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f18e577

Please sign in to comment.