react-native-bluebreeze 0.0.11 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -13
- package/android/build.gradle +2 -3
- package/android/generated/jni/CMakeLists.txt +1 -9
- package/android/generated/jni/RNBlueBreezeSpec-generated.cpp +1 -1
- package/android/generated/jni/react/renderer/components/RNBlueBreezeSpec/RNBlueBreezeSpecJSI.h +234 -279
- package/android/src/main/java/com/bluebreeze/BlueBreezeModule.kt +140 -120
- package/ios/BlueBreezeImpl.swift +30 -24
- package/ios/Bluebreeze.h +1 -1
- package/ios/Bluebreeze.mm +2 -7
- package/ios/generated/{RNBlueBreezeSpecJSI.h → ReactCodegen/RNBlueBreezeSpecJSI.h} +234 -279
- package/lib/commonjs/implementation/bluebreeze_characteristic.js +42 -11
- package/lib/commonjs/implementation/bluebreeze_characteristic.js.map +1 -1
- package/lib/commonjs/implementation/bluebreeze_connection_status.js +2 -0
- package/lib/commonjs/implementation/bluebreeze_connection_status.js.map +1 -0
- package/lib/commonjs/implementation/bluebreeze_device.js +53 -13
- package/lib/commonjs/implementation/bluebreeze_device.js.map +1 -1
- package/lib/commonjs/implementation/bluebreeze_scan_result.js +19 -0
- package/lib/commonjs/implementation/bluebreeze_scan_result.js.map +1 -1
- package/lib/commonjs/implementation/bluebreeze_service.js +9 -0
- package/lib/commonjs/implementation/bluebreeze_service.js.map +1 -1
- package/lib/commonjs/implementation/native_bridge.js +108 -0
- package/lib/commonjs/implementation/native_bridge.js.map +1 -0
- package/lib/commonjs/index.js +29 -100
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/package.json +1 -0
- package/lib/module/implementation/bluebreeze_characteristic.js +43 -10
- package/lib/module/implementation/bluebreeze_characteristic.js.map +1 -1
- package/lib/module/implementation/bluebreeze_connection_status.js +2 -0
- package/lib/module/implementation/bluebreeze_connection_status.js.map +1 -0
- package/lib/module/implementation/bluebreeze_device.js +54 -12
- package/lib/module/implementation/bluebreeze_device.js.map +1 -1
- package/lib/module/implementation/bluebreeze_scan_result.js +19 -0
- package/lib/module/implementation/bluebreeze_scan_result.js.map +1 -1
- package/lib/module/implementation/bluebreeze_service.js +9 -0
- package/lib/module/implementation/bluebreeze_service.js.map +1 -1
- package/lib/module/implementation/native_bridge.js +99 -0
- package/lib/module/implementation/native_bridge.js.map +1 -0
- package/lib/module/index.js +29 -100
- package/lib/module/index.js.map +1 -1
- package/lib/module/package.json +1 -0
- package/lib/typescript/commonjs/src/NativeBlueBreeze.d.ts +1 -1
- package/lib/typescript/commonjs/src/NativeBlueBreeze.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/implementation/bluebreeze_authorization.d.ts +10 -1
- package/lib/typescript/commonjs/src/implementation/bluebreeze_authorization.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/implementation/bluebreeze_characteristic.d.ts +29 -0
- package/lib/typescript/commonjs/src/implementation/bluebreeze_characteristic.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/implementation/bluebreeze_connection_status.d.ts +7 -0
- package/lib/typescript/commonjs/src/implementation/bluebreeze_connection_status.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/implementation/bluebreeze_device.d.ts +42 -1
- package/lib/typescript/commonjs/src/implementation/bluebreeze_device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/implementation/bluebreeze_scan_result.d.ts +11 -0
- package/lib/typescript/commonjs/src/implementation/bluebreeze_scan_result.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/implementation/bluebreeze_service.d.ts +6 -0
- package/lib/typescript/commonjs/src/implementation/bluebreeze_service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/implementation/bluebreeze_state.d.ts +16 -1
- package/lib/typescript/commonjs/src/implementation/bluebreeze_state.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/implementation/native_bridge.d.ts +17 -0
- package/lib/typescript/commonjs/src/implementation/native_bridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +0 -13
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/NativeBlueBreeze.d.ts +1 -1
- package/lib/typescript/module/src/NativeBlueBreeze.d.ts.map +1 -1
- package/lib/typescript/module/src/implementation/bluebreeze_authorization.d.ts +10 -1
- package/lib/typescript/module/src/implementation/bluebreeze_authorization.d.ts.map +1 -1
- package/lib/typescript/module/src/implementation/bluebreeze_characteristic.d.ts +29 -0
- package/lib/typescript/module/src/implementation/bluebreeze_characteristic.d.ts.map +1 -1
- package/lib/typescript/module/src/implementation/bluebreeze_connection_status.d.ts +7 -0
- package/lib/typescript/module/src/implementation/bluebreeze_connection_status.d.ts.map +1 -0
- package/lib/typescript/module/src/implementation/bluebreeze_device.d.ts +43 -2
- package/lib/typescript/module/src/implementation/bluebreeze_device.d.ts.map +1 -1
- package/lib/typescript/module/src/implementation/bluebreeze_scan_result.d.ts +12 -1
- package/lib/typescript/module/src/implementation/bluebreeze_scan_result.d.ts.map +1 -1
- package/lib/typescript/module/src/implementation/bluebreeze_service.d.ts +7 -1
- package/lib/typescript/module/src/implementation/bluebreeze_service.d.ts.map +1 -1
- package/lib/typescript/module/src/implementation/bluebreeze_state.d.ts +16 -1
- package/lib/typescript/module/src/implementation/bluebreeze_state.d.ts.map +1 -1
- package/lib/typescript/module/src/implementation/native_bridge.d.ts +17 -0
- package/lib/typescript/module/src/implementation/native_bridge.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +6 -19
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/package.json +13 -23
- package/react-native-bluebreeze.podspec +1 -1
- package/src/NativeBlueBreeze.ts +1 -1
- package/src/implementation/bluebreeze_authorization.ts +10 -1
- package/src/implementation/bluebreeze_characteristic.ts +48 -10
- package/src/implementation/bluebreeze_connection_status.ts +6 -0
- package/src/implementation/bluebreeze_device.ts +62 -13
- package/src/implementation/bluebreeze_scan_result.ts +18 -0
- package/src/implementation/bluebreeze_service.ts +8 -0
- package/src/implementation/bluebreeze_state.ts +16 -1
- package/src/implementation/native_bridge.ts +196 -0
- package/src/index.tsx +24 -202
- package/android/generated/jni/react/renderer/components/RNBlueBreezeSpec/RNBlueBreezeSpecJSI-generated.cpp +0 -179
- package/ios/generated/RNBlueBreezeSpecJSI-generated.cpp +0 -179
- /package/ios/generated/{RNBlueBreezeSpec → ReactCodegen/RNBlueBreezeSpec}/RNBlueBreezeSpec-generated.mm +0 -0
- /package/ios/generated/{RNBlueBreezeSpec → ReactCodegen/RNBlueBreezeSpec}/RNBlueBreezeSpec.h +0 -0
|
@@ -1,23 +1,56 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { deviceCharacteristicData, deviceCharacteristicNotifyEnabled, deviceCharacteristicRead, deviceCharacteristicSubscribe, deviceCharacteristicUnsubscribe, deviceCharacteristicWrite } from "./native_bridge.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A GATT characteristic belonging to a {@link BBService}.
|
|
7
|
+
*
|
|
8
|
+
* Rediscovered (and replaced with a new instance) every time services are discovered.
|
|
9
|
+
* Do not hold onto a `BBCharacteristic` reference across a disconnect/reconnect cycle.
|
|
10
|
+
*/
|
|
4
11
|
export class BBCharacteristic {
|
|
5
12
|
constructor(deviceId, serviceId, id, name, properties) {
|
|
6
13
|
this.id = id;
|
|
7
14
|
this.name = name;
|
|
8
15
|
this.properties = properties;
|
|
9
|
-
this.data =
|
|
10
|
-
this.notifyEnabled =
|
|
11
|
-
this.read = () =>
|
|
12
|
-
this.write = (data, withResponse) =>
|
|
13
|
-
this.subscribe = () =>
|
|
14
|
-
this.unsubscribe = () =>
|
|
16
|
+
this.data = deviceCharacteristicData(deviceId, serviceId, id);
|
|
17
|
+
this.notifyEnabled = deviceCharacteristicNotifyEnabled(deviceId, serviceId, id);
|
|
18
|
+
this.read = () => deviceCharacteristicRead(deviceId, serviceId, id);
|
|
19
|
+
this.write = (data, withResponse) => deviceCharacteristicWrite(deviceId, serviceId, id, data, withResponse);
|
|
20
|
+
this.subscribe = () => deviceCharacteristicSubscribe(deviceId, serviceId, id);
|
|
21
|
+
this.unsubscribe = () => deviceCharacteristicUnsubscribe(deviceId, serviceId, id);
|
|
15
22
|
}
|
|
16
23
|
|
|
17
|
-
|
|
24
|
+
/** The characteristic's UUID. */
|
|
25
|
+
|
|
26
|
+
/** A human-readable name for well-known (Bluetooth SIG assigned-number) characteristics, if recognized. */
|
|
27
|
+
|
|
28
|
+
/** The GATT properties this characteristic declares. */
|
|
29
|
+
|
|
30
|
+
/** The last value read or notified for this characteristic. Empty until first populated. */
|
|
31
|
+
|
|
32
|
+
/** Whether this app is currently subscribed to notifications for this characteristic. */
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Reads this characteristic's current value, also updating {@link data}.
|
|
36
|
+
* @throws if the read fails or times out.
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Writes a value to this characteristic.
|
|
41
|
+
* @param data The bytes to write.
|
|
42
|
+
* @param withResponse Whether to wait for the peripheral's write acknowledgment.
|
|
43
|
+
* @throws if the write fails or times out.
|
|
44
|
+
*/
|
|
18
45
|
|
|
19
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Subscribes to notifications.
|
|
48
|
+
* @throws if the subscribe request fails or times out.
|
|
49
|
+
*/
|
|
20
50
|
|
|
21
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Unsubscribes from notifications.
|
|
53
|
+
* @throws if the unsubscribe request fails or times out.
|
|
54
|
+
*/
|
|
22
55
|
}
|
|
23
56
|
//# sourceMappingURL=bluebreeze_characteristic.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["deviceCharacteristicData","deviceCharacteristicNotifyEnabled","deviceCharacteristicRead","deviceCharacteristicSubscribe","deviceCharacteristicUnsubscribe","deviceCharacteristicWrite","BBCharacteristic","constructor","deviceId","serviceId","id","name","properties","data","notifyEnabled","read","write","withResponse","subscribe","unsubscribe"],"sourceRoot":"../../../src","sources":["implementation/bluebreeze_characteristic.ts"],"mappings":";;AACA,SACIA,wBAAwB,EACxBC,iCAAiC,EACjCC,wBAAwB,EACxBC,6BAA6B,EAC7BC,+BAA+B,EAC/BC,yBAAyB,QACtB,oBAAiB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,CAAC;EAC1BC,WAAWA,CACPC,QAAgB,EAChBC,SAAiB,EACjBC,EAAU,EACVC,IAAwB,EACxBC,UAAoB,EACtB;IACE,IAAI,CAACF,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,UAAU,GAAGA,UAAU;IAE5B,IAAI,CAACC,IAAI,GAAGb,wBAAwB,CAACQ,QAAQ,EAAEC,SAAS,EAAEC,EAAE,CAAC;IAC7D,IAAI,CAACI,aAAa,GAAGb,iCAAiC,CAACO,QAAQ,EAAEC,SAAS,EAAEC,EAAE,CAAC;IAE/E,IAAI,CAACK,IAAI,GAAG,MAAMb,wBAAwB,CAACM,QAAQ,EAAEC,SAAS,EAAEC,EAAE,CAAC;IACnE,IAAI,CAACM,KAAK,GAAG,CAACH,IAAc,EAAEI,YAAqB,KAAKZ,yBAAyB,CAACG,QAAQ,EAAEC,SAAS,EAAEC,EAAE,EAAEG,IAAI,EAAEI,YAAY,CAAC;IAC9H,IAAI,CAACC,SAAS,GAAG,MAAMf,6BAA6B,CAACK,QAAQ,EAAEC,SAAS,EAAEC,EAAE,CAAC;IAC7E,IAAI,CAACS,WAAW,GAAG,MAAMf,+BAA+B,CAACI,QAAQ,EAAEC,SAAS,EAAEC,EAAE,CAAC;EACrF;;EAEA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;AACJ;AACA;AACA;;EAGI;AACJ;AACA;AACA;AACA;AACA;;EAGI;AACJ;AACA;AACA;;EAGI;AACJ;AACA;AACA;AAEA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["implementation/bluebreeze_connection_status.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,25 +1,67 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import { deviceConnect, deviceConnectionStatus, deviceDisconnect, deviceDiscoverServices, deviceMTU, deviceRequestMTU, deviceServices } from "./native_bridge.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A Bluetooth Low Energy peripheral, either seen while scanning or already connected from a
|
|
7
|
+
* prior session. Obtained via `BlueBreeze.devices` -- never constructed directly.
|
|
8
|
+
*
|
|
9
|
+
* A `BBDevice` stays valid for the app's lifetime once created: it isn't recreated across a
|
|
10
|
+
* connect/disconnect cycle, so its {@link connectionStatus}, {@link mtu}, and object identity
|
|
11
|
+
* all stay stable. Its {@link services} list, however, is rebuilt from scratch on every
|
|
12
|
+
* {@link discoverServices} call -- including one after a reconnect -- so a {@link BBService} or
|
|
13
|
+
* its {@link BBCharacteristic}s should not be held onto across a disconnect/reconnect; re-read
|
|
14
|
+
* `services` instead.
|
|
15
|
+
*/
|
|
4
16
|
export class BBDevice {
|
|
5
17
|
constructor(id, name) {
|
|
6
18
|
this.id = id;
|
|
7
19
|
this.name = name;
|
|
8
|
-
this.services =
|
|
9
|
-
this.connectionStatus =
|
|
10
|
-
this.mtu =
|
|
11
|
-
this.connect = () =>
|
|
12
|
-
this.disconnect = () =>
|
|
13
|
-
this.discoverServices = () =>
|
|
14
|
-
this.requestMTU = mtu =>
|
|
20
|
+
this.services = deviceServices(id);
|
|
21
|
+
this.connectionStatus = deviceConnectionStatus(id);
|
|
22
|
+
this.mtu = deviceMTU(id);
|
|
23
|
+
this.connect = () => deviceConnect(id);
|
|
24
|
+
this.disconnect = () => deviceDisconnect(id);
|
|
25
|
+
this.discoverServices = () => deviceDiscoverServices(id);
|
|
26
|
+
this.requestMTU = mtu => deviceRequestMTU(id, mtu);
|
|
15
27
|
}
|
|
16
28
|
|
|
17
|
-
|
|
29
|
+
/** The device's unique identifier. */
|
|
30
|
+
|
|
31
|
+
/** The device's advertised name, if any. */
|
|
32
|
+
|
|
33
|
+
/** The device's services discovered so far. Empty until {@link discoverServices} has been called and completed. */
|
|
34
|
+
|
|
35
|
+
/** Current connection status of the device. */
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The negotiated ATT MTU in bytes. Stays at the platform default until {@link requestMTU}
|
|
39
|
+
* has been called and resolved.
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Connects the device.
|
|
44
|
+
* @throws if the connection attempt fails or times out.
|
|
45
|
+
*/
|
|
18
46
|
|
|
19
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Disconnects the device.
|
|
49
|
+
* @throws if the disconnect attempt fails or times out.
|
|
50
|
+
*/
|
|
20
51
|
|
|
21
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Discovers all of the device's services and their characteristics, populating
|
|
54
|
+
* {@link services}. Requires an active connection.
|
|
55
|
+
* @throws if discovery fails or times out.
|
|
56
|
+
*/
|
|
22
57
|
|
|
23
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Requests a larger MTU, updating {@link mtu} with whatever size the device actually
|
|
60
|
+
* negotiates. Requires an active connection.
|
|
61
|
+
*
|
|
62
|
+
* @param mtu The desired MTU size in bytes.
|
|
63
|
+
* @returns The negotiated MTU size.
|
|
64
|
+
* @throws if the request fails or times out.
|
|
65
|
+
*/
|
|
24
66
|
}
|
|
25
67
|
//# sourceMappingURL=bluebreeze_device.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["deviceConnect","deviceConnectionStatus","deviceDisconnect","deviceDiscoverServices","deviceMTU","deviceRequestMTU","deviceServices","BBDevice","constructor","id","name","services","connectionStatus","mtu","connect","disconnect","discoverServices","requestMTU"],"sourceRoot":"../../../src","sources":["implementation/bluebreeze_device.ts"],"mappings":";;AAGA,SACIA,aAAa,EACbC,sBAAsB,EACtBC,gBAAgB,EAChBC,sBAAsB,EACtBC,SAAS,EACTC,gBAAgB,EAChBC,cAAc,QACX,oBAAiB;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,CAAC;EAClBC,WAAWA,CACPC,EAAU,EACVC,IAAa,EACf;IACE,IAAI,CAACD,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,IAAI,GAAGA,IAAI;IAEhB,IAAI,CAACC,QAAQ,GAAGL,cAAc,CAACG,EAAE,CAAC;IAClC,IAAI,CAACG,gBAAgB,GAAGX,sBAAsB,CAACQ,EAAE,CAAC;IAClD,IAAI,CAACI,GAAG,GAAGT,SAAS,CAACK,EAAE,CAAC;IAExB,IAAI,CAACK,OAAO,GAAG,MAAMd,aAAa,CAACS,EAAE,CAAC;IACtC,IAAI,CAACM,UAAU,GAAG,MAAMb,gBAAgB,CAACO,EAAE,CAAC;IAC5C,IAAI,CAACO,gBAAgB,GAAG,MAAMb,sBAAsB,CAACM,EAAE,CAAC;IACxD,IAAI,CAACQ,UAAU,GAAIJ,GAAW,IAAKR,gBAAgB,CAACI,EAAE,EAAEI,GAAG,CAAC;EAChE;;EAEA;;EAGA;;EAGA;;EAGA;;EAGA;AACJ;AACA;AACA;;EAGI;AACJ;AACA;AACA;;EAGI;AACJ;AACA;AACA;;EAGI;AACJ;AACA;AACA;AACA;;EAGI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AAEA","ignoreList":[]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* A single BLE advertisement seen while scanning.
|
|
5
|
+
*/
|
|
3
6
|
export class BBScanResult {
|
|
4
7
|
constructor(device, name, rssi, connectable, advertisedServices, manufacturerId, manufacturerName, manufacturerData) {
|
|
5
8
|
this.device = device;
|
|
@@ -11,5 +14,21 @@ export class BBScanResult {
|
|
|
11
14
|
this.manufacturerName = manufacturerName;
|
|
12
15
|
this.manufacturerData = manufacturerData;
|
|
13
16
|
}
|
|
17
|
+
|
|
18
|
+
/** The device that sent this advertisement. */
|
|
19
|
+
|
|
20
|
+
/** The advertised local name, if any. Falls back to {@link device}'s name. */
|
|
21
|
+
|
|
22
|
+
/** Received signal strength, in dBm. */
|
|
23
|
+
|
|
24
|
+
/** Whether this advertisement indicates the device currently accepts connections. */
|
|
25
|
+
|
|
26
|
+
/** Service UUIDs included in this advertisement. */
|
|
27
|
+
|
|
28
|
+
/** The Bluetooth SIG-assigned company identifier for manufacturer-specific data, if present. */
|
|
29
|
+
|
|
30
|
+
/** A human-readable name for {@link manufacturerId}, if recognized. */
|
|
31
|
+
|
|
32
|
+
/** Raw manufacturer-specific advertisement data, if present. */
|
|
14
33
|
}
|
|
15
34
|
//# sourceMappingURL=bluebreeze_scan_result.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BBScanResult","constructor","device","name","rssi","connectable","advertisedServices","manufacturerId","manufacturerName","manufacturerData"],"sourceRoot":"../../../src","sources":["implementation/bluebreeze_scan_result.ts"],"mappings":";;AAEA,OAAO,MAAMA,YAAY,CAAC;EACtBC,WAAWA,CACPC,MAAgB,EAChBC,IAAwB,EACxBC,IAAY,EACZC,WAAoB,EACpBC,kBAA4B,EAC5BC,cAAuB,EACvBC,gBAAyB,EACzBC,gBAA2B,EAC7B;IACE,IAAI,CAACP,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,kBAAkB,GAAGA,kBAAkB;IAC5C,IAAI,CAACC,cAAc,GAAGA,cAAc;IACpC,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB;IACxC,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB;EAC5C;
|
|
1
|
+
{"version":3,"names":["BBScanResult","constructor","device","name","rssi","connectable","advertisedServices","manufacturerId","manufacturerName","manufacturerData"],"sourceRoot":"../../../src","sources":["implementation/bluebreeze_scan_result.ts"],"mappings":";;AAEA;AACA;AACA;AACA,OAAO,MAAMA,YAAY,CAAC;EACtBC,WAAWA,CACPC,MAAgB,EAChBC,IAAwB,EACxBC,IAAY,EACZC,WAAoB,EACpBC,kBAA4B,EAC5BC,cAAuB,EACvBC,gBAAyB,EACzBC,gBAA2B,EAC7B;IACE,IAAI,CAACP,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,WAAW,GAAGA,WAAW;IAC9B,IAAI,CAACC,kBAAkB,GAAGA,kBAAkB;IAC5C,IAAI,CAACC,cAAc,GAAGA,cAAc;IACpC,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB;IACxC,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB;EAC5C;;EAEA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;;EAGA;AAEJ","ignoreList":[]}
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* A GATT service belonging to a {@link BBDevice}.
|
|
5
|
+
*/
|
|
3
6
|
export class BBService {
|
|
4
7
|
constructor(id, name, characteristics) {
|
|
5
8
|
this.id = id;
|
|
6
9
|
this.name = name;
|
|
7
10
|
this.characteristics = characteristics;
|
|
8
11
|
}
|
|
12
|
+
|
|
13
|
+
/** The service's UUID. */
|
|
14
|
+
|
|
15
|
+
/** A human-readable name for well-known (Bluetooth SIG assigned-number) services, if recognized. */
|
|
16
|
+
|
|
17
|
+
/** This service's characteristics. */
|
|
9
18
|
}
|
|
10
19
|
//# sourceMappingURL=bluebreeze_service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BBService","constructor","id","name","characteristics"],"sourceRoot":"../../../src","sources":["implementation/bluebreeze_service.ts"],"mappings":";;AAEA,OAAO,MAAMA,SAAS,CAAC;EACnBC,WAAWA,CACPC,EAAU,EACVC,IAAwB,EACxBC,eAAmC,EACrC;IACE,IAAI,CAACF,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,eAAe,GAAGA,eAAe;EAC1C;
|
|
1
|
+
{"version":3,"names":["BBService","constructor","id","name","characteristics"],"sourceRoot":"../../../src","sources":["implementation/bluebreeze_service.ts"],"mappings":";;AAEA;AACA;AACA;AACA,OAAO,MAAMA,SAAS,CAAC;EACnBC,WAAWA,CACPC,EAAU,EACVC,IAAwB,EACxBC,eAAmC,EACrC;IACE,IAAI,CAACF,EAAE,GAAGA,EAAE;IACZ,IAAI,CAACC,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,eAAe,GAAGA,eAAe;EAC1C;;EAEA;;EAGA;;EAGA;AAEJ","ignoreList":[]}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { StateValueEmitter } from 'react-native-value-emitter';
|
|
4
|
+
import NativeBlueBreeze from "../NativeBlueBreeze.js";
|
|
5
|
+
import { BBCharacteristic } from "./bluebreeze_characteristic.js";
|
|
6
|
+
import { BBService } from "./bluebreeze_service.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Per-device/per-characteristic wiring between the native module and {@link BBDevice}/
|
|
10
|
+
* {@link BBCharacteristic}. Not part of the package's public API: everything here is consumed
|
|
11
|
+
* directly by those two classes' constructors and is intentionally not re-exported from the
|
|
12
|
+
* package entry point (`src/index.tsx`) -- callers use `BBDevice`/`BBCharacteristic` methods
|
|
13
|
+
* instead of these raw, ID-keyed functions.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
function mapGetOrSet(map, key, defaultValue) {
|
|
17
|
+
if (map.get(key) == undefined) {
|
|
18
|
+
map.set(key, defaultValue());
|
|
19
|
+
}
|
|
20
|
+
return map.get(key);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Device services
|
|
24
|
+
|
|
25
|
+
const _deviceServices = new Map();
|
|
26
|
+
export const deviceServices = id => {
|
|
27
|
+
return mapGetOrSet(_deviceServices, id, () => new StateValueEmitter(NativeBlueBreeze.deviceServices(id).map(s => convertDeviceService(id, s))));
|
|
28
|
+
};
|
|
29
|
+
NativeBlueBreeze.deviceServicesEmitter(value => {
|
|
30
|
+
deviceServices(value.id).add(value.value.map(s => convertDeviceService(value.id, s)));
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Device connection status
|
|
34
|
+
|
|
35
|
+
const _deviceConnectionStatus = new Map();
|
|
36
|
+
export const deviceConnectionStatus = id => {
|
|
37
|
+
return mapGetOrSet(_deviceConnectionStatus, id, () => new StateValueEmitter(NativeBlueBreeze.deviceConnectionStatus(id)));
|
|
38
|
+
};
|
|
39
|
+
NativeBlueBreeze.deviceConnectionStatusEmitter(value => {
|
|
40
|
+
deviceConnectionStatus(value.id).add(value.value);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Device MTU
|
|
44
|
+
|
|
45
|
+
const _deviceMTU = new Map();
|
|
46
|
+
export const deviceMTU = id => {
|
|
47
|
+
return mapGetOrSet(_deviceMTU, id, () => new StateValueEmitter(NativeBlueBreeze.deviceMTU(id)));
|
|
48
|
+
};
|
|
49
|
+
NativeBlueBreeze.deviceMTUEmitter(value => {
|
|
50
|
+
deviceMTU(value.id).add(value.value);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
// Device operations
|
|
54
|
+
|
|
55
|
+
export const deviceConnect = NativeBlueBreeze.deviceConnect;
|
|
56
|
+
export const deviceDisconnect = NativeBlueBreeze.deviceDisconnect;
|
|
57
|
+
export const deviceDiscoverServices = NativeBlueBreeze.deviceDiscoverServices;
|
|
58
|
+
export const deviceRequestMTU = NativeBlueBreeze.deviceRequestMTU;
|
|
59
|
+
|
|
60
|
+
// Device characteristic notify enabled
|
|
61
|
+
|
|
62
|
+
const _deviceCharacteristicNotifyEnabled = new Map();
|
|
63
|
+
export const deviceCharacteristicNotifyEnabled = (id, serviceId, characteristicId) => {
|
|
64
|
+
const deviceMap = mapGetOrSet(_deviceCharacteristicNotifyEnabled, id, () => new Map());
|
|
65
|
+
const serviceMap = mapGetOrSet(deviceMap, serviceId, () => new Map());
|
|
66
|
+
return mapGetOrSet(serviceMap, characteristicId, () => new StateValueEmitter(NativeBlueBreeze.deviceCharacteristicNotifyEnabled(id, serviceId, characteristicId)));
|
|
67
|
+
};
|
|
68
|
+
NativeBlueBreeze.deviceCharacteristicNotifyEnabledEmitter(value => {
|
|
69
|
+
deviceCharacteristicNotifyEnabled(value.id, value.serviceId, value.characteristicId).add(value.value);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// Device characteristic data
|
|
73
|
+
|
|
74
|
+
const _deviceCharacteristicData = new Map();
|
|
75
|
+
export const deviceCharacteristicData = (id, serviceId, characteristicId) => {
|
|
76
|
+
const deviceMap = mapGetOrSet(_deviceCharacteristicData, id, () => new Map());
|
|
77
|
+
const serviceMap = mapGetOrSet(deviceMap, serviceId, () => new Map());
|
|
78
|
+
return mapGetOrSet(serviceMap, characteristicId, () => new StateValueEmitter(NativeBlueBreeze.deviceCharacteristicData(id, serviceId, characteristicId)));
|
|
79
|
+
};
|
|
80
|
+
NativeBlueBreeze.deviceCharacteristicDataEmitter(value => {
|
|
81
|
+
deviceCharacteristicData(value.id, value.serviceId, value.characteristicId).add(value.value);
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// Device characteristic operations
|
|
85
|
+
|
|
86
|
+
export const deviceCharacteristicRead = NativeBlueBreeze.deviceCharacteristicRead;
|
|
87
|
+
export const deviceCharacteristicWrite = NativeBlueBreeze.deviceCharacteristicWrite;
|
|
88
|
+
export const deviceCharacteristicSubscribe = NativeBlueBreeze.deviceCharacteristicSubscribe;
|
|
89
|
+
export const deviceCharacteristicUnsubscribe = NativeBlueBreeze.deviceCharacteristicUnsubscribe;
|
|
90
|
+
|
|
91
|
+
// Object decoders
|
|
92
|
+
|
|
93
|
+
const convertDeviceService = (deviceId, service) => {
|
|
94
|
+
return new BBService(service.id, service.name, service.characteristics.map(c => convertDeviceCharacteristic(deviceId, service.id, c)));
|
|
95
|
+
};
|
|
96
|
+
const convertDeviceCharacteristic = (deviceId, serviceId, characteristic) => {
|
|
97
|
+
return new BBCharacteristic(deviceId, serviceId, characteristic.id, characteristic.name, characteristic.properties);
|
|
98
|
+
};
|
|
99
|
+
//# sourceMappingURL=native_bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StateValueEmitter","NativeBlueBreeze","BBCharacteristic","BBService","mapGetOrSet","map","key","defaultValue","get","undefined","set","_deviceServices","Map","deviceServices","id","s","convertDeviceService","deviceServicesEmitter","value","add","_deviceConnectionStatus","deviceConnectionStatus","deviceConnectionStatusEmitter","_deviceMTU","deviceMTU","deviceMTUEmitter","deviceConnect","deviceDisconnect","deviceDiscoverServices","deviceRequestMTU","_deviceCharacteristicNotifyEnabled","deviceCharacteristicNotifyEnabled","serviceId","characteristicId","deviceMap","serviceMap","deviceCharacteristicNotifyEnabledEmitter","_deviceCharacteristicData","deviceCharacteristicData","deviceCharacteristicDataEmitter","deviceCharacteristicRead","deviceCharacteristicWrite","deviceCharacteristicSubscribe","deviceCharacteristicUnsubscribe","deviceId","service","name","characteristics","c","convertDeviceCharacteristic","characteristic","properties"],"sourceRoot":"../../../src","sources":["implementation/native_bridge.ts"],"mappings":";;AAAA,SAASA,iBAAiB,QAAQ,4BAA4B;AAC9D,OAAOC,gBAAgB,MAAiE,wBAAqB;AAC7G,SAASC,gBAAgB,QAAQ,gCAA6B;AAE9D,SAASC,SAAS,QAAQ,yBAAsB;;AAEhD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASC,WAA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,oBAAoB,GAAGA,CACzB4B,QAAgB,EAChBC,OAA0B,KACd;EACZ,OAAO,IAAI1C,SAAS,CAChB0C,OAAO,CAAC/B,EAAE,EACV+B,OAAO,CAACC,IAAI,EACZD,OAAO,CAACE,eAAe,CAAC1C,GAAG,CACtB2C,CAAC,IAAKC,2BAA2B,CAACL,QAAQ,EAAEC,OAAO,CAAC/B,EAAE,EAAEkC,CAAC,CAC9D,CACJ,CAAC;AACL,CAAC;AAED,MAAMC,2BAA2B,GAAGA,CAChCL,QAAgB,EAChBZ,SAAiB,EACjBkB,cAAwC,KACrB;EACnB,OAAO,IAAIhD,gBAAgB,CACvB0C,QAAQ,EACRZ,SAAS,EACTkB,cAAc,CAACpC,EAAE,EACjBoC,cAAc,CAACJ,IAAI,EACnBI,cAAc,CAACC,UACnB,CAAC;AACL,CAAC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import NativeBlueBreeze from "./NativeBlueBreeze.js";
|
|
|
9
9
|
|
|
10
10
|
// State
|
|
11
11
|
|
|
12
|
+
/** The power/availability state of the device's Bluetooth adapter. */
|
|
12
13
|
const state = new StateValueEmitter(NativeBlueBreeze.state());
|
|
13
14
|
NativeBlueBreeze.stateEmitter(value => {
|
|
14
15
|
state.add(value);
|
|
@@ -16,114 +17,61 @@ NativeBlueBreeze.stateEmitter(value => {
|
|
|
16
17
|
|
|
17
18
|
// Authorization to use BLE
|
|
18
19
|
|
|
20
|
+
/** Whether this app is currently allowed to use Bluetooth. */
|
|
19
21
|
const authorizationStatus = new StateValueEmitter(NativeBlueBreeze.authorizationStatus());
|
|
20
22
|
NativeBlueBreeze.authorizationStatusEmitter(value => {
|
|
21
23
|
authorizationStatus.add(value);
|
|
22
24
|
});
|
|
25
|
+
|
|
26
|
+
/** Requests Bluetooth authorization from the user, if not already granted or permanently denied. */
|
|
23
27
|
const authorizationRequest = NativeBlueBreeze.authorizationRequest;
|
|
28
|
+
|
|
29
|
+
/** Opens the OS settings screen for this app, for a user to grant Bluetooth authorization after denying it. */
|
|
24
30
|
const authorizationOpenSettings = NativeBlueBreeze.authorizationOpenSettings;
|
|
25
31
|
|
|
26
32
|
// Scanning
|
|
27
33
|
|
|
34
|
+
/** Whether a BLE scan is currently running. */
|
|
28
35
|
const scanEnabled = new StateValueEmitter(NativeBlueBreeze.scanEnabled());
|
|
29
36
|
NativeBlueBreeze.scanEnabledEmitter(value => {
|
|
30
37
|
scanEnabled.add(value);
|
|
31
38
|
});
|
|
39
|
+
|
|
40
|
+
/** Emits every advertisement seen while scanning, including repeat sightings of the same device. */
|
|
32
41
|
const scanResults = new ValueEmitter();
|
|
33
42
|
NativeBlueBreeze.scanResultEmitter(value => {
|
|
34
|
-
|
|
43
|
+
let device = devices.value?.get(value.id);
|
|
44
|
+
|
|
45
|
+
// The native "device discovered" and "scan result" events are emitted independently.
|
|
46
|
+
// We register a new device locally rather than dropping the result.
|
|
35
47
|
if (device == undefined) {
|
|
36
|
-
|
|
48
|
+
device = convertDevice(value);
|
|
49
|
+
devices.add(new Map(devices.value).set(value.id, device));
|
|
37
50
|
}
|
|
38
51
|
scanResults.add(convertScanResult(device, value));
|
|
39
52
|
});
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Starts a BLE scan.
|
|
56
|
+
* @param ids Service UUIDs to filter for. When omitted, every nearby advertisement is reported.
|
|
57
|
+
*/
|
|
40
58
|
const scanStart = (ids = undefined) => NativeBlueBreeze.scanStart(ids);
|
|
59
|
+
|
|
60
|
+
/** Stops the current BLE scan. */
|
|
41
61
|
const scanStop = NativeBlueBreeze.scanStop;
|
|
42
62
|
|
|
43
|
-
//
|
|
63
|
+
// Devices
|
|
44
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Every device seen so far, either via scanning or a prior connection this session, keyed by
|
|
67
|
+
* platform device ID. A device is added here the moment it's first seen in a scan result and
|
|
68
|
+
* stays here for the app's lifetime.
|
|
69
|
+
*/
|
|
45
70
|
const devices = new StateValueEmitter(new Map(NativeBlueBreeze.devices().map(d => [d.id, convertDevice(d)])));
|
|
46
71
|
NativeBlueBreeze.devicesEmitter(value => {
|
|
47
72
|
devices.add(new Map(value.map(d => [d.id, devices.value?.get(d.id) ?? convertDevice(d)])));
|
|
48
73
|
});
|
|
49
74
|
|
|
50
|
-
// Device services
|
|
51
|
-
|
|
52
|
-
const _deviceServices = new Map();
|
|
53
|
-
const deviceServices = id => {
|
|
54
|
-
return mapGetOrSet(_deviceServices, id, () => new StateValueEmitter(NativeBlueBreeze.deviceServices(id).map(s => convertDeviceService(id, s))));
|
|
55
|
-
};
|
|
56
|
-
NativeBlueBreeze.deviceServicesEmitter(value => {
|
|
57
|
-
deviceServices(value.id).add(value.value.map(s => convertDeviceService(value.id, s)));
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// Device connection status
|
|
61
|
-
|
|
62
|
-
const _deviceConnectionStatus = new Map();
|
|
63
|
-
const deviceConnectionStatus = id => {
|
|
64
|
-
return mapGetOrSet(_deviceConnectionStatus, id, () => new StateValueEmitter(NativeBlueBreeze.deviceConnectionStatus(id)));
|
|
65
|
-
};
|
|
66
|
-
NativeBlueBreeze.deviceConnectionStatusEmitter(value => {
|
|
67
|
-
deviceConnectionStatus(value.id).add(value.value);
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
// Device MTU
|
|
71
|
-
|
|
72
|
-
const _deviceMTU = new Map();
|
|
73
|
-
const deviceMTU = id => {
|
|
74
|
-
return mapGetOrSet(_deviceMTU, id, () => new StateValueEmitter(NativeBlueBreeze.deviceMTU(id)));
|
|
75
|
-
};
|
|
76
|
-
NativeBlueBreeze.deviceMTUEmitter(value => {
|
|
77
|
-
deviceMTU(value.id).add(value.value);
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
// Device operation
|
|
81
|
-
|
|
82
|
-
const deviceConnect = NativeBlueBreeze.deviceConnect;
|
|
83
|
-
const deviceDisconnect = NativeBlueBreeze.deviceDisconnect;
|
|
84
|
-
const deviceDiscoverServices = NativeBlueBreeze.deviceDiscoverServices;
|
|
85
|
-
const deviceRequestMTU = NativeBlueBreeze.deviceRequestMTU;
|
|
86
|
-
|
|
87
|
-
// Device characteristic notify enabled
|
|
88
|
-
|
|
89
|
-
const _deviceCharacteristicNotifyEnabled = new Map();
|
|
90
|
-
const deviceCharacteristicNotifyEnabled = (id, serviceId, characteristicId) => {
|
|
91
|
-
const deviceMap = mapGetOrSet(_deviceCharacteristicNotifyEnabled, id, () => new Map());
|
|
92
|
-
const serviceMap = mapGetOrSet(deviceMap, serviceId, () => new Map());
|
|
93
|
-
return mapGetOrSet(serviceMap, characteristicId, () => new StateValueEmitter(NativeBlueBreeze.deviceCharacteristicNotifyEnabled(id, serviceId, characteristicId)));
|
|
94
|
-
};
|
|
95
|
-
NativeBlueBreeze.deviceCharacteristicNotifyEnabledEmitter(value => {
|
|
96
|
-
deviceCharacteristicNotifyEnabled(value.id, value.serviceId, value.characteristicId).add(value.value);
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
// Device characteristic data
|
|
100
|
-
|
|
101
|
-
const _deviceCharacteristicData = new Map();
|
|
102
|
-
const deviceCharacteristicData = (id, serviceId, characteristicId) => {
|
|
103
|
-
const deviceMap = mapGetOrSet(_deviceCharacteristicData, id, () => new Map());
|
|
104
|
-
const serviceMap = mapGetOrSet(deviceMap, serviceId, () => new Map());
|
|
105
|
-
return mapGetOrSet(serviceMap, characteristicId, () => new StateValueEmitter(NativeBlueBreeze.deviceCharacteristicData(id, serviceId, characteristicId)));
|
|
106
|
-
};
|
|
107
|
-
NativeBlueBreeze.deviceCharacteristicDataEmitter(value => {
|
|
108
|
-
deviceCharacteristicData(value.id, value.serviceId, value.characteristicId).add(value.value);
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
// Device characteristic operations
|
|
112
|
-
|
|
113
|
-
const deviceCharacteristicRead = NativeBlueBreeze.deviceCharacteristicRead;
|
|
114
|
-
const deviceCharacteristicWrite = NativeBlueBreeze.deviceCharacteristicWrite;
|
|
115
|
-
const deviceCharacteristicSubscribe = NativeBlueBreeze.deviceCharacteristicSubscribe;
|
|
116
|
-
const deviceCharacteristicUnsubscribe = NativeBlueBreeze.deviceCharacteristicUnsubscribe;
|
|
117
|
-
|
|
118
|
-
// Map helper
|
|
119
|
-
|
|
120
|
-
function mapGetOrSet(map, key, defaultValue) {
|
|
121
|
-
if (map.get(key) == undefined) {
|
|
122
|
-
map.set(key, defaultValue());
|
|
123
|
-
}
|
|
124
|
-
return map.get(key);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
75
|
// Object decoders
|
|
128
76
|
|
|
129
77
|
const convertDevice = device => {
|
|
@@ -132,12 +80,6 @@ const convertDevice = device => {
|
|
|
132
80
|
const convertScanResult = (device, scanResult) => {
|
|
133
81
|
return new BBScanResult(device, scanResult.name, scanResult.rssi, scanResult.connectable, scanResult.advertisedServices, scanResult.manufacturerId, scanResult.manufacturerName, scanResult.manufacturerData);
|
|
134
82
|
};
|
|
135
|
-
const convertDeviceService = (deviceId, service) => {
|
|
136
|
-
return new BBService(service.id, service.name, service.characteristics.map(c => convertDeviceCharacteristic(deviceId, service.id, c)));
|
|
137
|
-
};
|
|
138
|
-
const convertDeviceCharacteristic = (deviceId, serviceId, characteristic) => {
|
|
139
|
-
return new BBCharacteristic(deviceId, serviceId, characteristic.id, characteristic.name, characteristic.properties);
|
|
140
|
-
};
|
|
141
83
|
|
|
142
84
|
// Export
|
|
143
85
|
|
|
@@ -150,20 +92,7 @@ export default {
|
|
|
150
92
|
scanResults,
|
|
151
93
|
scanStart,
|
|
152
94
|
scanStop,
|
|
153
|
-
devices
|
|
154
|
-
deviceServices,
|
|
155
|
-
deviceConnectionStatus,
|
|
156
|
-
deviceMTU,
|
|
157
|
-
deviceConnect,
|
|
158
|
-
deviceDisconnect,
|
|
159
|
-
deviceDiscoverServices,
|
|
160
|
-
deviceRequestMTU,
|
|
161
|
-
deviceCharacteristicNotifyEnabled,
|
|
162
|
-
deviceCharacteristicData,
|
|
163
|
-
deviceCharacteristicRead,
|
|
164
|
-
deviceCharacteristicWrite,
|
|
165
|
-
deviceCharacteristicSubscribe,
|
|
166
|
-
deviceCharacteristicUnsubscribe
|
|
95
|
+
devices
|
|
167
96
|
};
|
|
168
97
|
export { BBCharacteristic, BBDevice, BBScanResult, BBService };
|
|
169
98
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StateValueEmitter","ValueEmitter","BBCharacteristic","BBDevice","BBScanResult","BBService","NativeBlueBreeze","state","stateEmitter","value","add","authorizationStatus","authorizationStatusEmitter","authorizationRequest","authorizationOpenSettings","scanEnabled","scanEnabledEmitter","scanResults","scanResultEmitter","device","devices","get","id","undefined","
|
|
1
|
+
{"version":3,"names":["StateValueEmitter","ValueEmitter","BBCharacteristic","BBDevice","BBScanResult","BBService","NativeBlueBreeze","state","stateEmitter","value","add","authorizationStatus","authorizationStatusEmitter","authorizationRequest","authorizationOpenSettings","scanEnabled","scanEnabledEmitter","scanResults","scanResultEmitter","device","devices","get","id","undefined","convertDevice","Map","set","convertScanResult","scanStart","ids","scanStop","map","d","devicesEmitter","name","scanResult","rssi","connectable","advertisedServices","manufacturerId","manufacturerName","manufacturerData"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,iBAAiB,EAAEC,YAAY,QAAQ,4BAA4B;AAE5E,SAASC,gBAAgB,QAAQ,+CAA4C;AAC7E,SAASC,QAAQ,QAAQ,uCAAoC;AAC7D,SAASC,YAAY,QAAQ,4CAAyC;AACtE,SAASC,SAAS,QAAQ,wCAAqC;AAE/D,OAAOC,gBAAgB,MAAgD,uBAAoB;;AAE3F;;AAEA;AACA,MAAMC,KAAK,GAAG,IAAIP,iBAAiB,CAAUM,gBAAgB,CAACC,KAAK,CAAC,CAAY,CAAC;AAEjFD,gBAAgB,CAACE,YAAY,CAAEC,KAAK,IAAK;EACrCF,KAAK,CAACG,GAA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AAgB,EAChBC,QAAQ,EACRC,YAAY,EACZC,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TurboModule } from 'react-native';
|
|
2
|
-
import type { EventEmitter } from 'react-native/Libraries/Types/
|
|
2
|
+
import type { EventEmitter } from 'react-native/Libraries/Types/CodegenTypesNamespace';
|
|
3
3
|
export interface SpecScanResult {
|
|
4
4
|
id: string;
|
|
5
5
|
name?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeBlueBreeze.d.ts","sourceRoot":"","sources":["../../../../src/NativeBlueBreeze.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NativeBlueBreeze.d.ts","sourceRoot":"","sources":["../../../../src/NativeBlueBreeze.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oDAAoD,CAAA;AAItF,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;IACpB,kBAAkB,EAAE,MAAM,EAAE,CAAA;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;CAC9B;AAED,MAAM,WAAW,UAAU;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,wBAAwB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CA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AE,YAAY,CAAC,wCAAwC,CAAC,CAAA;IAGzG,wBAAwB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IACpG,yBAAyB,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACxI,6BAA6B,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACrG,+BAA+B,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CAC1G;;AAED,wBAAmE"}
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/** Whether this app is currently allowed to use Bluetooth. */
|
|
2
|
+
export type BBAuthorization =
|
|
3
|
+
/** Not yet determined. */
|
|
4
|
+
'unknown'
|
|
5
|
+
/** Permission has been denied once but not permanently. Android only. */
|
|
6
|
+
| 'showRationale'
|
|
7
|
+
/** Permission has been permanently denied. */
|
|
8
|
+
| 'denied'
|
|
9
|
+
/** Permission has been granted. */
|
|
10
|
+
| 'authorized';
|
|
2
11
|
//# sourceMappingURL=bluebreeze_authorization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bluebreeze_authorization.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_authorization.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"bluebreeze_authorization.d.ts","sourceRoot":"","sources":["../../../../../src/implementation/bluebreeze_authorization.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,MAAM,MAAM,eAAe;AACvB,0BAA0B;AACxB,SAAS;AACX,yEAAyE;GACvE,eAAe;AACjB,8CAA8C;GAC5C,QAAQ;AACV,mCAAmC;GACjC,YAAY,CAAA"}
|