unified-ble-manager 4.0.0-alpha.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/LICENSE +202 -0
- package/MIGRATION_4.0.md +46 -0
- package/README.md +885 -0
- package/ROADMAP.4.0.md +87 -0
- package/ROADMAP.md +712 -0
- package/android/build.gradle +116 -0
- package/android/gradle.properties +5 -0
- package/android/src/legacy/java/com/sfourdrinier/unifiedblemanager/adapter/BleModule.java +1666 -0
- package/android/src/legacy/java/com/sfourdrinier/unifiedblemanager/adapter/utils/DisposableMap.java +39 -0
- package/android/src/legacy/java/com/sfourdrinier/unifiedblemanager/adapter/utils/RefreshGattCustomOperation.java +53 -0
- package/android/src/legacy/java/com/sfourdrinier/unifiedblemanager/adapter/utils/mapper/RxBleDeviceToDeviceMapper.java +19 -0
- package/android/src/legacy/java/com/sfourdrinier/unifiedblemanager/adapter/utils/mapper/RxScanResultToScanResultMapper.java +22 -0
- package/android/src/main/AndroidManifest.xml +41 -0
- package/android/src/main/AndroidManifestNew.xml +44 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/BlePlxForegroundService.java +398 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/BlePlxModule.java +1237 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/BlePlxPackage.java +60 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/Event.java +18 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/AdvertisementData.java +251 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/BleAdapter.java +269 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/BleAdapterCreator.java +7 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/BleAdapterFactory.java +22 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/Characteristic.java +169 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/ConnectionOptions.java +72 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/ConnectionState.java +12 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/Descriptor.java +113 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/Device.java +95 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/OnErrorCallback.java +8 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/OnEventCallback.java +6 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/OnSuccessCallback.java +6 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/RefreshGattMoment.java +20 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/ScanResult.java +184 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/Service.java +58 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/errors/BleError.java +32 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/errors/BleErrorCode.java +61 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/errors/BleErrorUtils.java +86 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/errors/ErrorConverter.java +34 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/exceptions/CannotMonitorCharacteristicException.java +15 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/utils/Base64Converter.java +34 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/utils/ByteUtils.java +15 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/utils/Constants.java +66 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/utils/IdGenerator.java +22 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/utils/IdGeneratorKey.java +37 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/utils/LogLevel.java +51 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/utils/SafeExecutor.java +33 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/utils/ServiceFactory.java +16 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/adapter/utils/UUIDConverter.java +51 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/converter/BleErrorToJsObjectConverter.java +65 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/converter/CharacteristicToJsObjectConverter.java +52 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/converter/DescriptorToJsObjectConverter.java +38 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/converter/DeviceToJsObjectConverter.java +64 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/converter/JSObjectConverter.java +17 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/converter/ScanResultToJsObjectConverter.java +118 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/converter/ServiceToJsObjectConverter.java +26 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/protocol/ProtocolCommandDecoder.kt +221 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/protocol/ProtocolWireEncoder.kt +129 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/protocol/UnifiedBleProtocolAndroidDispatcher.kt +685 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/protocol/UnifiedBleProtocolControlModule.java +367 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/protocol/UnifiedBleProtocolJsiBinding.java +130 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/protocol/generated/NativeProtocolV1Schema.kt +302 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/radio/OwnedAdapterLifecycleCoordinator.kt +107 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/radio/OwnedAndroidGattRadio.kt +1599 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/radio/OwnedAndroidLog.kt +23 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/radio/OwnedBleAdapter.kt +1689 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/radio/OwnedBondedDevicesOperation.kt +32 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/utils/Base64Converter.java +30 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/utils/BlePlxDebugLogging.java +47 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/utils/ErrorDefaults.java +9 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/utils/ReadableArrayConverter.java +28 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/utils/SafePromise.java +54 -0
- package/android/src/main/java/com/sfourdrinier/unifiedblemanager/utils/UUIDConverter.java +70 -0
- package/android/src/main/jni/CMakeLists.txt +50 -0
- package/android/src/main/jni/UnifiedBleProtocolControlJni.cpp +253 -0
- package/android/src/main/jni/UnifiedBleProtocolJsiBinding.cpp +1400 -0
- package/android/src/main/jni/UnifiedBleProtocolRuntimeHandle.hpp +12 -0
- package/android/src/test/java/com/sfourdrinier/unifiedblemanager/protocol/UnifiedBleProtocolAndroidDispatcherLifecycleTest.kt +51 -0
- package/android/src/test/java/com/sfourdrinier/unifiedblemanager/radio/OwnedAdapterLifecycleCoordinatorTest.kt +110 -0
- package/app.plugin.js +1 -0
- package/bin/ubm.js +18 -0
- package/docs/ADR/2026-07-4.0-backend-contract.md +133 -0
- package/docs/ADR/2026-07-4.0-boundary.md +128 -0
- package/docs/ADR/2026-07-4.0-capability-registry.md +116 -0
- package/docs/ADR/2026-07-4.0-open-source-governance.md +105 -0
- package/docs/ADR/2026-07-4.0-packaging.md +114 -0
- package/docs/ADR/2026-07-4.0-public-api.md +129 -0
- package/docs/ADR/2026-07-4.0-rn-restoration-bootstrap.md +122 -0
- package/docs/BACKEND_AUTHORING.md +13 -0
- package/docs/BACKGROUND.md +19 -0
- package/docs/BONDING.md +66 -0
- package/docs/CLI.md +18 -0
- package/docs/CONNECTION_MANAGER.md +188 -0
- package/docs/DISCOVERY_AND_PROFILES.md +143 -0
- package/docs/ELECTRON.md +29 -0
- package/docs/EXPO_PLUGIN.md +19 -0
- package/docs/FIX_TRACKER.4.0-round2.md +170 -0
- package/docs/FIX_TRACKER.4.0-round3.md +96 -0
- package/docs/FIX_TRACKER.4.0.md +168 -0
- package/docs/FORK.md +89 -0
- package/docs/GAPS.4.0.md +87 -0
- package/docs/GETTING_STARTED.md +37 -0
- package/docs/HELPERS.md +140 -0
- package/docs/MIGRATION_V1.md +6 -0
- package/docs/NODE.md +19 -0
- package/docs/PERFORMANCE.md +20 -0
- package/docs/PLATFORMS.md +51 -0
- package/docs/PROFILES_AND_COMMANDS.md +139 -0
- package/docs/README_V1.md +173 -0
- package/docs/TCK.md +21 -0
- package/docs/TUTORIALS.md +108 -0
- package/docs/TVOS.md +16 -0
- package/docs/UNIFIED_BLE_4.0_IMPLEMENTATION_PLAN.md +3053 -0
- package/docs/UNIFIED_SEMANTICS.md +965 -0
- package/docs/WEB.md +19 -0
- package/docs/generated/BACKEND_SDK_REFERENCE.md +52 -0
- package/docs/logo.png +0 -0
- package/docs/platforms/META_QUEST_4.1_SCOPE.md +21 -0
- package/docs/security/UNIFIED_BLE_4.0_THREAT_MODEL.md +126 -0
- package/ios/BlePlx-Bridging-Header.h +4 -0
- package/ios/BlePlx.h +21 -0
- package/ios/BlePlx.mm +885 -0
- package/ios/BlePlx.xcodeproj/project.pbxproj +288 -0
- package/ios/BlePlxDebugLogging.h +6 -0
- package/ios/BlePlxDebugLogging.m +33 -0
- package/ios/BlePlxRuntimeDispatch.h +8 -0
- package/ios/BlePlxTurboModule.mm +39 -0
- package/ios/Generated/NativeProtocolV1Schema.swift +302 -0
- package/ios/NativeProtocol/UnifiedBleProtocolAppleBinaryDelivery.hpp +25 -0
- package/ios/NativeProtocol/UnifiedBleProtocolAppleBinaryDelivery.mm +63 -0
- package/ios/NativeProtocol/UnifiedBleProtocolAppleExecution.hpp +46 -0
- package/ios/NativeProtocol/UnifiedBleProtocolAppleExecution.mm +883 -0
- package/ios/Owned/BlePlxRadioQueue.swift +23 -0
- package/ios/Owned/OwnedCoreBluetoothAdapter.swift +1704 -0
- package/ios/Owned/OwnedCoreBluetoothProtocolRadio.swift +870 -0
- package/ios/PrivacyInfo.xcprivacy +14 -0
- package/ios/Restoration/BlePlxDebugLogging.swift +26 -0
- package/ios/Restoration/BlePlxRestorationAdapter.swift +231 -0
- package/ios/Restoration/BlePlxRestorationState.swift +44 -0
- package/ios/Restoration/BleRestorationRegistry.swift +219 -0
- package/ios/UnifiedBleProtocolControl.mm +392 -0
- package/ios/vendor/MultiplatformBleAdapter/LICENSE +201 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/AdvertisementData.swift +62 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Array+Utils.swift +11 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/BluetoothError.swift +195 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/BluetoothManager.swift +357 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/BluetoothState.swift +12 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Boxes.swift +63 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/CBCentral+Uuid.swift +9 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/CBCentralManagerDelegateWrapper.swift +75 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/CBPeripheralDelegateWrapper.swift +163 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Characteristic.swift +121 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Descriptor.swift +74 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/DeviceIdentifiers.swift +51 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Logging.swift +218 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/ManagerType.swift +41 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Observable+Absorb.swift +25 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Observable+QueueSubscribeOn.swift +125 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Peripheral+Convenience.swift +213 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Peripheral.swift +516 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RestoredState.swift +59 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxCBCentralManager.swift +149 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxCBCharacteristic.swift +51 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxCBDescriptor.swift +32 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxCBPeripheral.swift +394 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxCBService.swift +42 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxCentralManagerType.swift +23 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxCharacteristicType.swift +24 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxDescriptorType.swift +21 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxPeripheralType.swift +76 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/RxServiceType.swift +21 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/ScanOperation.swift +30 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/ScannedPeripheral.swift +22 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Service.swift +75 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/UUIDIdentifiable.swift +25 -0
- package/ios/vendor/MultiplatformBleAdapter/RxBluetoothKit/Unimplemented.swift +13 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/AnyObserver.swift +69 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Binder.swift +59 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Cancelable.swift +13 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Concurrency/AsyncLock.swift +100 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Concurrency/Lock.swift +23 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Concurrency/LockOwnerType.swift +16 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Concurrency/SynchronizedDisposeType.swift +18 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Concurrency/SynchronizedOnType.swift +18 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Concurrency/SynchronizedUnsubscribeType.swift +13 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/ConnectableObservableType.swift +19 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Date+Dispatch.swift +64 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposable.swift +13 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/AnonymousDisposable.swift +59 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/BinaryDisposable.swift +53 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/BooleanDisposable.swift +34 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/CompositeDisposable.swift +147 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/Disposables.swift +13 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/DisposeBag.swift +144 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/DisposeBase.swift +22 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/NopDisposable.swift +30 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/RefCountDisposable.swift +112 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/ScheduledDisposable.swift +50 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/SerialDisposable.swift +73 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/SingleAssignmentDisposable.swift +72 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Disposables/SubscriptionDisposable.swift +21 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Errors.swift +52 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Event.swift +104 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Extensions/Bag+Rx.swift +50 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/GroupedObservable.swift +35 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/ImmediateSchedulerType.swift +36 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observable+Concurrency.swift +79 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observable.swift +31 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/ObservableConvertibleType.swift +18 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/ObservableType+Extensions.swift +174 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/ObservableType.swift +45 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/AddRef.swift +44 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Amb.swift +157 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/AsMaybe.swift +48 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/AsSingle.swift +51 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Buffer.swift +138 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Catch.swift +275 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/CombineLatest+Collection.swift +165 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/CombineLatest+arity.swift +843 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/CombineLatest.swift +131 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/CompactMap.swift +76 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Concat.swift +131 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Create.swift +78 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Debounce.swift +119 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Debug.swift +102 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Decode.swift +34 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/DefaultIfEmpty.swift +66 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Deferred.swift +75 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Delay.swift +174 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/DelaySubscription.swift +58 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Dematerialize.swift +51 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/DistinctUntilChanged.swift +137 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Do.swift +112 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/ElementAt.swift +105 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Empty.swift +27 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Enumerated.swift +61 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Error.swift +33 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Filter.swift +86 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/First.swift +41 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Generate.swift +87 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/GroupBy.swift +133 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Just.swift +87 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Map.swift +76 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Materialize.swift +44 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Merge.swift +600 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Multicast.swift +405 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Never.swift +27 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/ObserveOn.swift +243 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Optional.swift +95 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Producer.swift +92 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Range.swift +73 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Reduce.swift +109 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Repeat.swift +57 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/RetryWhen.swift +211 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Sample.swift +139 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Scan.swift +100 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Sequence.swift +89 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/ShareReplayScope.swift +443 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/SingleAsync.swift +104 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Sink.swift +75 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Skip.swift +158 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/SkipUntil.swift +152 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/SkipWhile.swift +87 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/StartWith.swift +42 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/SubscribeOn.swift +103 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Switch.swift +251 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/SwitchIfEmpty.swift +104 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Take.swift +193 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/TakeLast.swift +78 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/TakeWithPredicate.swift +285 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Throttle.swift +160 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Timeout.swift +151 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Timer.swift +117 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/ToArray.swift +64 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Using.swift +90 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Window.swift +168 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/WithLatestFrom.swift +151 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/WithUnretained.swift +58 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Zip+Collection.swift +168 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Zip+arity.swift +934 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observables/Zip.swift +135 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/ObserverType.swift +40 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observers/AnonymousObserver.swift +30 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observers/ObserverBase.swift +32 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Observers/TailRecursiveSink.swift +151 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Platform/AtomicInt.swift +72 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Platform/DataStructures/Bag.swift +181 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Platform/DataStructures/InfiniteSequence.swift +23 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Platform/DataStructures/PriorityQueue.swift +111 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Platform/DataStructures/Queue.swift +148 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Platform/DispatchQueue+Extensions.swift +21 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Platform/Platform.Darwin.swift +35 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Platform/Platform.Linux.swift +32 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Platform/RecursiveLock.swift +34 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Reactive.swift +80 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Rx.swift +142 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/RxMutableBox.swift +53 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/SchedulerType.swift +71 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/ConcurrentDispatchQueueScheduler.swift +82 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/ConcurrentMainScheduler.swift +87 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/CurrentThreadScheduler.swift +131 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/HistoricalScheduler.swift +22 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/HistoricalSchedulerTimeConverter.swift +67 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/Internal/DispatchQueueConfiguration.swift +97 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/Internal/InvocableScheduledItem.swift +22 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/Internal/InvocableType.swift +17 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/Internal/ScheduledItem.swift +35 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/Internal/ScheduledItemType.swift +13 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/MainScheduler.swift +80 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/OperationQueueScheduler.swift +54 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/RecursiveScheduler.swift +220 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/SchedulerServices+Emulation.swift +61 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/SerialDispatchQueueScheduler.swift +131 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/VirtualTimeConverterType.swift +97 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Schedulers/VirtualTimeScheduler.swift +267 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Subjects/AsyncSubject.swift +154 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Subjects/BehaviorSubject.swift +157 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Subjects/PublishSubject.swift +140 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Subjects/ReplaySubject.swift +271 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Subjects/SubjectType.swift +21 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/SwiftSupport/SwiftSupport.swift +18 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/Infallible/Infallible+CombineLatest+Collection.swift +36 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/Infallible/Infallible+CombineLatest+arity.swift +276 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/Infallible/Infallible+Concurrency.swift +37 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/Infallible/Infallible+Create.swift +55 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/Infallible/Infallible+Debug.swift +26 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/Infallible/Infallible+Operators.swift +711 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/Infallible/Infallible+Zip+arity.swift +138 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/Infallible/Infallible.swift +102 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/Infallible/ObservableConvertibleType+Infallible.swift +35 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/PrimitiveSequence/Completable+AndThen.swift +132 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/PrimitiveSequence/Completable.swift +320 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/PrimitiveSequence/Maybe.swift +387 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/PrimitiveSequence/ObservableType+PrimitiveSequence.swift +55 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/PrimitiveSequence/PrimitiveSequence+Concurrency.swift +164 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/PrimitiveSequence/PrimitiveSequence+Zip+arity.swift +521 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/PrimitiveSequence/PrimitiveSequence.swift +342 -0
- package/ios/vendor/MultiplatformBleAdapter/RxSwift/Traits/PrimitiveSequence/Single.swift +403 -0
- package/ios/vendor/MultiplatformBleAdapter/classes/BleAdapter.swift +236 -0
- package/ios/vendor/MultiplatformBleAdapter/classes/BleAdapterFactory.swift +25 -0
- package/ios/vendor/MultiplatformBleAdapter/classes/BleError.swift +309 -0
- package/ios/vendor/MultiplatformBleAdapter/classes/BleEvent.swift +48 -0
- package/ios/vendor/MultiplatformBleAdapter/classes/BleExtensions.swift +239 -0
- package/ios/vendor/MultiplatformBleAdapter/classes/BleModule.swift +1373 -0
- package/ios/vendor/MultiplatformBleAdapter/classes/BleUtils.swift +110 -0
- package/ios/vendor/MultiplatformBleAdapter/classes/Utils/DisposableMap.swift +32 -0
- package/ios/vendor/MultiplatformBleAdapter/classes/Utils/SafePromise.swift +37 -0
- package/lib/commonjs/backend-contract/advertisement.js +6 -0
- package/lib/commonjs/backend-contract/advertisement.js.map +1 -0
- package/lib/commonjs/backend-contract/backend-sdk.js +6 -0
- package/lib/commonjs/backend-contract/backend-sdk.js.map +1 -0
- package/lib/commonjs/backend-contract/backend.js +138 -0
- package/lib/commonjs/backend-contract/backend.js.map +1 -0
- package/lib/commonjs/backend-contract/capabilities.js +124 -0
- package/lib/commonjs/backend-contract/capabilities.js.map +1 -0
- package/lib/commonjs/backend-contract/connection-controls.js +13 -0
- package/lib/commonjs/backend-contract/connection-controls.js.map +1 -0
- package/lib/commonjs/backend-contract/electron.js +323 -0
- package/lib/commonjs/backend-contract/electron.js.map +1 -0
- package/lib/commonjs/backend-contract/errors.js +30 -0
- package/lib/commonjs/backend-contract/errors.js.map +1 -0
- package/lib/commonjs/backend-contract/gatt.js +22 -0
- package/lib/commonjs/backend-contract/gatt.js.map +1 -0
- package/lib/commonjs/backend-contract/host/electron-main.js +13 -0
- package/lib/commonjs/backend-contract/host/electron-main.js.map +1 -0
- package/lib/commonjs/backend-contract/host/electron-renderer.js +6 -0
- package/lib/commonjs/backend-contract/host/electron-renderer.js.map +1 -0
- package/lib/commonjs/backend-contract/host/node.js +6 -0
- package/lib/commonjs/backend-contract/host/node.js.map +1 -0
- package/lib/commonjs/backend-contract/host/web.js +6 -0
- package/lib/commonjs/backend-contract/host/web.js.map +1 -0
- package/lib/commonjs/backend-contract/identity.js +13 -0
- package/lib/commonjs/backend-contract/identity.js.map +1 -0
- package/lib/commonjs/backend-contract/index.js +181 -0
- package/lib/commonjs/backend-contract/index.js.map +1 -0
- package/lib/commonjs/backend-contract/operations.js +44 -0
- package/lib/commonjs/backend-contract/operations.js.map +1 -0
- package/lib/commonjs/backend-contract/primitives.js +244 -0
- package/lib/commonjs/backend-contract/primitives.js.map +1 -0
- package/lib/commonjs/backend-contract/restoration.js +6 -0
- package/lib/commonjs/backend-contract/restoration.js.map +1 -0
- package/lib/commonjs/backend-contract/serializable.js +173 -0
- package/lib/commonjs/backend-contract/serializable.js.map +1 -0
- package/lib/commonjs/backend-contract/streams.js +6 -0
- package/lib/commonjs/backend-contract/streams.js.map +1 -0
- package/lib/commonjs/backend-sdk-authoring.js +104 -0
- package/lib/commonjs/backend-sdk-authoring.js.map +1 -0
- package/lib/commonjs/backend-sdk.js +80 -0
- package/lib/commonjs/backend-sdk.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-backend-handles.js +216 -0
- package/lib/commonjs/backends/bluez/bluez-backend-handles.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-backend-provider.js +107 -0
- package/lib/commonjs/backends/bluez/bluez-backend-provider.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-backend-runtime.js +615 -0
- package/lib/commonjs/backends/bluez/bluez-backend-runtime.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-backend.js +77 -0
- package/lib/commonjs/backends/bluez/bluez-backend.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-dbus-contract.js +25 -0
- package/lib/commonjs/backends/bluez/bluez-dbus-contract.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-dbus-next-boundary.js +408 -0
- package/lib/commonjs/backends/bluez/bluez-dbus-next-boundary.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-gatt-operations.js +100 -0
- package/lib/commonjs/backends/bluez/bluez-gatt-operations.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-object-store.js +383 -0
- package/lib/commonjs/backends/bluez/bluez-object-store.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-operation-dispatcher.js +163 -0
- package/lib/commonjs/backends/bluez/bluez-operation-dispatcher.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-property-waiters.js +153 -0
- package/lib/commonjs/backends/bluez/bluez-property-waiters.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-runtime-models.js +240 -0
- package/lib/commonjs/backends/bluez/bluez-runtime-models.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-runtime-types.js +20 -0
- package/lib/commonjs/backends/bluez/bluez-runtime-types.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-scan-runtime.js +242 -0
- package/lib/commonjs/backends/bluez/bluez-scan-runtime.js.map +1 -0
- package/lib/commonjs/backends/bluez/bluez-subscription-runtime.js +131 -0
- package/lib/commonjs/backends/bluez/bluez-subscription-runtime.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-backend.js +696 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-backend.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-boundary.js +2 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-boundary.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-connection-controls.js +59 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-connection-controls.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-gatt-operations.js +215 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-gatt-operations.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-handles.js +280 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-handles.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-identity.js +22 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-identity.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-operation-dispatcher.js +79 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-operation-dispatcher.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-operation-lifecycle.js +93 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-operation-lifecycle.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-provider.js +65 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-provider.js.map +1 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-stream-limits.js +20 -0
- package/lib/commonjs/backends/corebluetooth/corebluetooth-stream-limits.js.map +1 -0
- package/lib/commonjs/backends/reactnative/react-native-android-provider.js +155 -0
- package/lib/commonjs/backends/reactnative/react-native-android-provider.js.map +1 -0
- package/lib/commonjs/backends/reactnative/react-native-apple-provider.js +152 -0
- package/lib/commonjs/backends/reactnative/react-native-apple-provider.js.map +1 -0
- package/lib/commonjs/backends/winrt/winrt-adapter-state.js +49 -0
- package/lib/commonjs/backends/winrt/winrt-adapter-state.js.map +1 -0
- package/lib/commonjs/backends/winrt/winrt-backend-helpers.js +84 -0
- package/lib/commonjs/backends/winrt/winrt-backend-helpers.js.map +1 -0
- package/lib/commonjs/backends/winrt/winrt-backend.js +683 -0
- package/lib/commonjs/backends/winrt/winrt-backend.js.map +1 -0
- package/lib/commonjs/backends/winrt/winrt-boundary.js +2 -0
- package/lib/commonjs/backends/winrt/winrt-boundary.js.map +1 -0
- package/lib/commonjs/backends/winrt/winrt-gatt-operations.js +244 -0
- package/lib/commonjs/backends/winrt/winrt-gatt-operations.js.map +1 -0
- package/lib/commonjs/backends/winrt/winrt-handles.js +297 -0
- package/lib/commonjs/backends/winrt/winrt-handles.js.map +1 -0
- package/lib/commonjs/backends/winrt/winrt-operation-dispatcher.js +159 -0
- package/lib/commonjs/backends/winrt/winrt-operation-dispatcher.js.map +1 -0
- package/lib/commonjs/backends/winrt/winrt-provider.js +83 -0
- package/lib/commonjs/backends/winrt/winrt-provider.js.map +1 -0
- package/lib/commonjs/backends/winrt/winrt-subscription-runtime.js +76 -0
- package/lib/commonjs/backends/winrt/winrt-subscription-runtime.js.map +1 -0
- package/lib/commonjs/cli-json.js +199 -0
- package/lib/commonjs/cli-json.js.map +1 -0
- package/lib/commonjs/cli.js +485 -0
- package/lib/commonjs/cli.js.map +1 -0
- package/lib/commonjs/codecs-primitives.js +19 -0
- package/lib/commonjs/codecs-primitives.js.map +1 -0
- package/lib/commonjs/codecs.js +51 -0
- package/lib/commonjs/codecs.js.map +1 -0
- package/lib/commonjs/core/aggregate-stream-quota.js +58 -0
- package/lib/commonjs/core/aggregate-stream-quota.js.map +1 -0
- package/lib/commonjs/core/bounded-stream.js +390 -0
- package/lib/commonjs/core/bounded-stream.js.map +1 -0
- package/lib/commonjs/core/core-adapter-state.js +21 -0
- package/lib/commonjs/core/core-adapter-state.js.map +1 -0
- package/lib/commonjs/core/core-characteristic-operations.js +55 -0
- package/lib/commonjs/core/core-characteristic-operations.js.map +1 -0
- package/lib/commonjs/core/core-connection-controls.js +76 -0
- package/lib/commonjs/core/core-connection-controls.js.map +1 -0
- package/lib/commonjs/core/core-descriptor-operations.js +55 -0
- package/lib/commonjs/core/core-descriptor-operations.js.map +1 -0
- package/lib/commonjs/core/core-discovery.js +38 -0
- package/lib/commonjs/core/core-discovery.js.map +1 -0
- package/lib/commonjs/core/core-gatt-handles.js +198 -0
- package/lib/commonjs/core/core-gatt-handles.js.map +1 -0
- package/lib/commonjs/core/core-lifecycle-observer.js +55 -0
- package/lib/commonjs/core/core-lifecycle-observer.js.map +1 -0
- package/lib/commonjs/core/gatt-path-equality.js +29 -0
- package/lib/commonjs/core/gatt-path-equality.js.map +1 -0
- package/lib/commonjs/core/index.js +67 -0
- package/lib/commonjs/core/index.js.map +1 -0
- package/lib/commonjs/core/operation-coordinator.js +374 -0
- package/lib/commonjs/core/operation-coordinator.js.map +1 -0
- package/lib/commonjs/core/resource-ledger.js +108 -0
- package/lib/commonjs/core/resource-ledger.js.map +1 -0
- package/lib/commonjs/core/subscription-registry.js +610 -0
- package/lib/commonjs/core/subscription-registry.js.map +1 -0
- package/lib/commonjs/core/trace-recorder.js +93 -0
- package/lib/commonjs/core/trace-recorder.js.map +1 -0
- package/lib/commonjs/core/unified-ble-core-helpers.js +214 -0
- package/lib/commonjs/core/unified-ble-core-helpers.js.map +1 -0
- package/lib/commonjs/core/unified-ble-core.js +640 -0
- package/lib/commonjs/core/unified-ble-core.js.map +1 -0
- package/lib/commonjs/diagnostics/trace-format.js +203 -0
- package/lib/commonjs/diagnostics/trace-format.js.map +1 -0
- package/lib/commonjs/electron/main-binding.js +251 -0
- package/lib/commonjs/electron/main-binding.js.map +1 -0
- package/lib/commonjs/electron/main-router.js +591 -0
- package/lib/commonjs/electron/main-router.js.map +1 -0
- package/lib/commonjs/electron/main.js +28 -0
- package/lib/commonjs/electron/main.js.map +1 -0
- package/lib/commonjs/electron/protocol.js +22 -0
- package/lib/commonjs/electron/protocol.js.map +1 -0
- package/lib/commonjs/electron/renderer-stream-registry.js +260 -0
- package/lib/commonjs/electron/renderer-stream-registry.js.map +1 -0
- package/lib/commonjs/electron/renderer.js +192 -0
- package/lib/commonjs/electron/renderer.js.map +1 -0
- package/lib/commonjs/electron-main.js +74 -0
- package/lib/commonjs/electron-main.js.map +1 -0
- package/lib/commonjs/electron-renderer.js +28 -0
- package/lib/commonjs/electron-renderer.js.map +1 -0
- package/lib/commonjs/index.js +112 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/manager/ble-manager.js +369 -0
- package/lib/commonjs/manager/ble-manager.js.map +1 -0
- package/lib/commonjs/manager/index.js +74 -0
- package/lib/commonjs/manager/index.js.map +1 -0
- package/lib/commonjs/manager/manager-ownership-authority.js +269 -0
- package/lib/commonjs/manager/manager-ownership-authority.js.map +1 -0
- package/lib/commonjs/native-protocol/generated/native-protocol-v1-schema.js +69 -0
- package/lib/commonjs/native-protocol/generated/native-protocol-v1-schema.js.map +1 -0
- package/lib/commonjs/native-protocol/rn-android-boundary.js +539 -0
- package/lib/commonjs/native-protocol/rn-android-boundary.js.map +1 -0
- package/lib/commonjs/native-protocol/rn-android-protocol-records.js +229 -0
- package/lib/commonjs/native-protocol/rn-android-protocol-records.js.map +1 -0
- package/lib/commonjs/native-protocol/rn-apple-boundary.js +13 -0
- package/lib/commonjs/native-protocol/rn-apple-boundary.js.map +1 -0
- package/lib/commonjs/native-protocol/rn-jsi-binary-runtime.js +54 -0
- package/lib/commonjs/native-protocol/rn-jsi-binary-runtime.js.map +1 -0
- package/lib/commonjs/native-protocol/v1-codec.js +439 -0
- package/lib/commonjs/native-protocol/v1-codec.js.map +1 -0
- package/lib/commonjs/node-bluez.js +56 -0
- package/lib/commonjs/node-bluez.js.map +1 -0
- package/lib/commonjs/node-corebluetooth.js +65 -0
- package/lib/commonjs/node-corebluetooth.js.map +1 -0
- package/lib/commonjs/node-winrt.js +73 -0
- package/lib/commonjs/node-winrt.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/profiles/battery-service.js +47 -0
- package/lib/commonjs/profiles/battery-service.js.map +1 -0
- package/lib/commonjs/profiles/blood-pressure.js +102 -0
- package/lib/commonjs/profiles/blood-pressure.js.map +1 -0
- package/lib/commonjs/profiles/bytes.js +61 -0
- package/lib/commonjs/profiles/bytes.js.map +1 -0
- package/lib/commonjs/profiles/commands.js +64 -0
- package/lib/commonjs/profiles/commands.js.map +1 -0
- package/lib/commonjs/profiles/date-time.js +36 -0
- package/lib/commonjs/profiles/date-time.js.map +1 -0
- package/lib/commonjs/profiles/device-information.js +131 -0
- package/lib/commonjs/profiles/device-information.js.map +1 -0
- package/lib/commonjs/profiles/errors.js +25 -0
- package/lib/commonjs/profiles/errors.js.map +1 -0
- package/lib/commonjs/profiles/health-thermometer.js +84 -0
- package/lib/commonjs/profiles/health-thermometer.js.map +1 -0
- package/lib/commonjs/profiles/heart-rate.js +108 -0
- package/lib/commonjs/profiles/heart-rate.js.map +1 -0
- package/lib/commonjs/profiles/identifiers.js +42 -0
- package/lib/commonjs/profiles/identifiers.js.map +1 -0
- package/lib/commonjs/profiles/ieee-11073.js +149 -0
- package/lib/commonjs/profiles/ieee-11073.js.map +1 -0
- package/lib/commonjs/profiles/standard-commands.js +62 -0
- package/lib/commonjs/profiles/standard-commands.js.map +1 -0
- package/lib/commonjs/react-native-manager.js +77 -0
- package/lib/commonjs/react-native-manager.js.map +1 -0
- package/lib/commonjs/react-native.js +113 -0
- package/lib/commonjs/react-native.js.map +1 -0
- package/lib/commonjs/tck/contracts.js +39 -0
- package/lib/commonjs/tck/contracts.js.map +1 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-factory.js +182 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-factory.js.map +1 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-identity.js +149 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-identity.js.map +1 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-lifecycle-diagnostics.js +172 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-lifecycle-diagnostics.js.map +1 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-manager-ownership.js +166 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-manager-ownership.js.map +1 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-scenario-helpers.js +173 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-scenario-helpers.js.map +1 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-scenarios.js +617 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-scenarios.js.map +1 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-subscription-overflow.js +102 -0
- package/lib/commonjs/tck/deterministic/deterministic-tck-subscription-overflow.js.map +1 -0
- package/lib/commonjs/tck/index.js +33 -0
- package/lib/commonjs/tck/index.js.map +1 -0
- package/lib/commonjs/tck/runner.js +432 -0
- package/lib/commonjs/tck/runner.js.map +1 -0
- package/lib/commonjs/tck/scenario-adapter.js +49 -0
- package/lib/commonjs/tck/scenario-adapter.js.map +1 -0
- package/lib/commonjs/tck/scenarios.js +114 -0
- package/lib/commonjs/tck/scenarios.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-backend-base.js +562 -0
- package/lib/commonjs/testing/deterministic/deterministic-backend-base.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-operation-admission.js +61 -0
- package/lib/commonjs/testing/deterministic/deterministic-operation-admission.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-operation-runtime.js +315 -0
- package/lib/commonjs/testing/deterministic/deterministic-operation-runtime.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-stream.js +466 -0
- package/lib/commonjs/testing/deterministic/deterministic-stream.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-subscription-lifecycle.js +62 -0
- package/lib/commonjs/testing/deterministic/deterministic-subscription-lifecycle.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend-controller.js +6 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend-controller.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend-gatt.js +33 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend-gatt.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend-handles.js +278 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend-handles.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend-lifecycle-helpers.js +207 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend-lifecycle-helpers.js.map +1 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend.js +576 -0
- package/lib/commonjs/testing/deterministic/deterministic-test-backend.js.map +1 -0
- package/lib/commonjs/testing/deterministic/virtual-clock.js +98 -0
- package/lib/commonjs/testing/deterministic/virtual-clock.js.map +1 -0
- package/lib/commonjs/testing/deterministic/virtual-peripheral.js +298 -0
- package/lib/commonjs/testing/deterministic/virtual-peripheral.js.map +1 -0
- package/lib/commonjs/testing/scenarios/deterministic-manager-scenario-factory.js +132 -0
- package/lib/commonjs/testing/scenarios/deterministic-manager-scenario-factory.js.map +1 -0
- package/lib/commonjs/testing/scenarios/manager-scenario-executor.js +325 -0
- package/lib/commonjs/testing/scenarios/manager-scenario-executor.js.map +1 -0
- package/lib/commonjs/testing/scenarios/manager-scenario-fixture.js +41 -0
- package/lib/commonjs/testing/scenarios/manager-scenario-fixture.js.map +1 -0
- package/lib/commonjs/testing/scenarios/manager-scenarios.js +136 -0
- package/lib/commonjs/testing/scenarios/manager-scenarios.js.map +1 -0
- package/lib/commonjs/testing.js +119 -0
- package/lib/commonjs/testing.js.map +1 -0
- package/lib/commonjs/web/navigator-web-bluetooth-boundary.js +207 -0
- package/lib/commonjs/web/navigator-web-bluetooth-boundary.js.map +1 -0
- package/lib/commonjs/web/web-bluetooth-backend.js +672 -0
- package/lib/commonjs/web/web-bluetooth-backend.js.map +1 -0
- package/lib/commonjs/web/web-bluetooth-boundary.js +6 -0
- package/lib/commonjs/web/web-bluetooth-boundary.js.map +1 -0
- package/lib/commonjs/web/web-bluetooth-errors.js +69 -0
- package/lib/commonjs/web/web-bluetooth-errors.js.map +1 -0
- package/lib/commonjs/web/web-bluetooth-gatt.js +498 -0
- package/lib/commonjs/web/web-bluetooth-gatt.js.map +1 -0
- package/lib/commonjs/web/web-bluetooth-handles.js +144 -0
- package/lib/commonjs/web/web-bluetooth-handles.js.map +1 -0
- package/lib/commonjs/web/web-bluetooth-tck.js +75 -0
- package/lib/commonjs/web/web-bluetooth-tck.js.map +1 -0
- package/lib/commonjs/web/web-feature-registry.js +57 -0
- package/lib/commonjs/web/web-feature-registry.js.map +1 -0
- package/lib/commonjs/web.js +58 -0
- package/lib/commonjs/web.js.map +1 -0
- package/lib/module/backend-contract/advertisement.js +4 -0
- package/lib/module/backend-contract/advertisement.js.map +1 -0
- package/lib/module/backend-contract/backend-sdk.js +4 -0
- package/lib/module/backend-contract/backend-sdk.js.map +1 -0
- package/lib/module/backend-contract/backend.js +131 -0
- package/lib/module/backend-contract/backend.js.map +1 -0
- package/lib/module/backend-contract/capabilities.js +119 -0
- package/lib/module/backend-contract/capabilities.js.map +1 -0
- package/lib/module/backend-contract/connection-controls.js +9 -0
- package/lib/module/backend-contract/connection-controls.js.map +1 -0
- package/lib/module/backend-contract/electron.js +319 -0
- package/lib/module/backend-contract/electron.js.map +1 -0
- package/lib/module/backend-contract/errors.js +24 -0
- package/lib/module/backend-contract/errors.js.map +1 -0
- package/lib/module/backend-contract/gatt.js +17 -0
- package/lib/module/backend-contract/gatt.js.map +1 -0
- package/lib/module/backend-contract/host/electron-main.js +6 -0
- package/lib/module/backend-contract/host/electron-main.js.map +1 -0
- package/lib/module/backend-contract/host/electron-renderer.js +4 -0
- package/lib/module/backend-contract/host/electron-renderer.js.map +1 -0
- package/lib/module/backend-contract/host/node.js +4 -0
- package/lib/module/backend-contract/host/node.js.map +1 -0
- package/lib/module/backend-contract/host/web.js +4 -0
- package/lib/module/backend-contract/host/web.js.map +1 -0
- package/lib/module/backend-contract/identity.js +9 -0
- package/lib/module/backend-contract/identity.js.map +1 -0
- package/lib/module/backend-contract/index.js +12 -0
- package/lib/module/backend-contract/index.js.map +1 -0
- package/lib/module/backend-contract/operations.js +39 -0
- package/lib/module/backend-contract/operations.js.map +1 -0
- package/lib/module/backend-contract/primitives.js +223 -0
- package/lib/module/backend-contract/primitives.js.map +1 -0
- package/lib/module/backend-contract/restoration.js +4 -0
- package/lib/module/backend-contract/restoration.js.map +1 -0
- package/lib/module/backend-contract/serializable.js +167 -0
- package/lib/module/backend-contract/serializable.js.map +1 -0
- package/lib/module/backend-contract/streams.js +4 -0
- package/lib/module/backend-contract/streams.js.map +1 -0
- package/lib/module/backend-sdk-authoring.js +98 -0
- package/lib/module/backend-sdk-authoring.js.map +1 -0
- package/lib/module/backend-sdk.js +14 -0
- package/lib/module/backend-sdk.js.map +1 -0
- package/lib/module/backends/bluez/bluez-backend-handles.js +207 -0
- package/lib/module/backends/bluez/bluez-backend-handles.js.map +1 -0
- package/lib/module/backends/bluez/bluez-backend-provider.js +102 -0
- package/lib/module/backends/bluez/bluez-backend-provider.js.map +1 -0
- package/lib/module/backends/bluez/bluez-backend-runtime.js +610 -0
- package/lib/module/backends/bluez/bluez-backend-runtime.js.map +1 -0
- package/lib/module/backends/bluez/bluez-backend.js +72 -0
- package/lib/module/backends/bluez/bluez-backend.js.map +1 -0
- package/lib/module/backends/bluez/bluez-dbus-contract.js +20 -0
- package/lib/module/backends/bluez/bluez-dbus-contract.js.map +1 -0
- package/lib/module/backends/bluez/bluez-dbus-next-boundary.js +402 -0
- package/lib/module/backends/bluez/bluez-dbus-next-boundary.js.map +1 -0
- package/lib/module/backends/bluez/bluez-gatt-operations.js +91 -0
- package/lib/module/backends/bluez/bluez-gatt-operations.js.map +1 -0
- package/lib/module/backends/bluez/bluez-object-store.js +378 -0
- package/lib/module/backends/bluez/bluez-object-store.js.map +1 -0
- package/lib/module/backends/bluez/bluez-operation-dispatcher.js +158 -0
- package/lib/module/backends/bluez/bluez-operation-dispatcher.js.map +1 -0
- package/lib/module/backends/bluez/bluez-property-waiters.js +143 -0
- package/lib/module/backends/bluez/bluez-property-waiters.js.map +1 -0
- package/lib/module/backends/bluez/bluez-runtime-models.js +225 -0
- package/lib/module/backends/bluez/bluez-runtime-models.js.map +1 -0
- package/lib/module/backends/bluez/bluez-runtime-types.js +16 -0
- package/lib/module/backends/bluez/bluez-runtime-types.js.map +1 -0
- package/lib/module/backends/bluez/bluez-scan-runtime.js +235 -0
- package/lib/module/backends/bluez/bluez-scan-runtime.js.map +1 -0
- package/lib/module/backends/bluez/bluez-subscription-runtime.js +125 -0
- package/lib/module/backends/bluez/bluez-subscription-runtime.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-backend.js +691 -0
- package/lib/module/backends/corebluetooth/corebluetooth-backend.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-boundary.js +2 -0
- package/lib/module/backends/corebluetooth/corebluetooth-boundary.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-connection-controls.js +54 -0
- package/lib/module/backends/corebluetooth/corebluetooth-connection-controls.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-gatt-operations.js +210 -0
- package/lib/module/backends/corebluetooth/corebluetooth-gatt-operations.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-handles.js +263 -0
- package/lib/module/backends/corebluetooth/corebluetooth-handles.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-identity.js +19 -0
- package/lib/module/backends/corebluetooth/corebluetooth-identity.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-operation-dispatcher.js +74 -0
- package/lib/module/backends/corebluetooth/corebluetooth-operation-dispatcher.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-operation-lifecycle.js +88 -0
- package/lib/module/backends/corebluetooth/corebluetooth-operation-lifecycle.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-provider.js +60 -0
- package/lib/module/backends/corebluetooth/corebluetooth-provider.js.map +1 -0
- package/lib/module/backends/corebluetooth/corebluetooth-stream-limits.js +16 -0
- package/lib/module/backends/corebluetooth/corebluetooth-stream-limits.js.map +1 -0
- package/lib/module/backends/reactnative/react-native-android-provider.js +148 -0
- package/lib/module/backends/reactnative/react-native-android-provider.js.map +1 -0
- package/lib/module/backends/reactnative/react-native-apple-provider.js +145 -0
- package/lib/module/backends/reactnative/react-native-apple-provider.js.map +1 -0
- package/lib/module/backends/winrt/winrt-adapter-state.js +43 -0
- package/lib/module/backends/winrt/winrt-adapter-state.js.map +1 -0
- package/lib/module/backends/winrt/winrt-backend-helpers.js +76 -0
- package/lib/module/backends/winrt/winrt-backend-helpers.js.map +1 -0
- package/lib/module/backends/winrt/winrt-backend.js +678 -0
- package/lib/module/backends/winrt/winrt-backend.js.map +1 -0
- package/lib/module/backends/winrt/winrt-boundary.js +2 -0
- package/lib/module/backends/winrt/winrt-boundary.js.map +1 -0
- package/lib/module/backends/winrt/winrt-gatt-operations.js +239 -0
- package/lib/module/backends/winrt/winrt-gatt-operations.js.map +1 -0
- package/lib/module/backends/winrt/winrt-handles.js +282 -0
- package/lib/module/backends/winrt/winrt-handles.js.map +1 -0
- package/lib/module/backends/winrt/winrt-operation-dispatcher.js +154 -0
- package/lib/module/backends/winrt/winrt-operation-dispatcher.js.map +1 -0
- package/lib/module/backends/winrt/winrt-provider.js +75 -0
- package/lib/module/backends/winrt/winrt-provider.js.map +1 -0
- package/lib/module/backends/winrt/winrt-subscription-runtime.js +68 -0
- package/lib/module/backends/winrt/winrt-subscription-runtime.js.map +1 -0
- package/lib/module/cli-json.js +193 -0
- package/lib/module/cli-json.js.map +1 -0
- package/lib/module/cli.js +468 -0
- package/lib/module/cli.js.map +1 -0
- package/lib/module/codecs-primitives.js +14 -0
- package/lib/module/codecs-primitives.js.map +1 -0
- package/lib/module/codecs.js +9 -0
- package/lib/module/codecs.js.map +1 -0
- package/lib/module/core/aggregate-stream-quota.js +53 -0
- package/lib/module/core/aggregate-stream-quota.js.map +1 -0
- package/lib/module/core/bounded-stream.js +385 -0
- package/lib/module/core/bounded-stream.js.map +1 -0
- package/lib/module/core/core-adapter-state.js +17 -0
- package/lib/module/core/core-adapter-state.js.map +1 -0
- package/lib/module/core/core-characteristic-operations.js +50 -0
- package/lib/module/core/core-characteristic-operations.js.map +1 -0
- package/lib/module/core/core-connection-controls.js +70 -0
- package/lib/module/core/core-connection-controls.js.map +1 -0
- package/lib/module/core/core-descriptor-operations.js +50 -0
- package/lib/module/core/core-descriptor-operations.js.map +1 -0
- package/lib/module/core/core-discovery.js +34 -0
- package/lib/module/core/core-discovery.js.map +1 -0
- package/lib/module/core/core-gatt-handles.js +192 -0
- package/lib/module/core/core-gatt-handles.js.map +1 -0
- package/lib/module/core/core-lifecycle-observer.js +50 -0
- package/lib/module/core/core-lifecycle-observer.js.map +1 -0
- package/lib/module/core/gatt-path-equality.js +21 -0
- package/lib/module/core/gatt-path-equality.js.map +1 -0
- package/lib/module/core/index.js +12 -0
- package/lib/module/core/index.js.map +1 -0
- package/lib/module/core/operation-coordinator.js +369 -0
- package/lib/module/core/operation-coordinator.js.map +1 -0
- package/lib/module/core/resource-ledger.js +103 -0
- package/lib/module/core/resource-ledger.js.map +1 -0
- package/lib/module/core/subscription-registry.js +604 -0
- package/lib/module/core/subscription-registry.js.map +1 -0
- package/lib/module/core/trace-recorder.js +88 -0
- package/lib/module/core/trace-recorder.js.map +1 -0
- package/lib/module/core/unified-ble-core-helpers.js +198 -0
- package/lib/module/core/unified-ble-core-helpers.js.map +1 -0
- package/lib/module/core/unified-ble-core.js +629 -0
- package/lib/module/core/unified-ble-core.js.map +1 -0
- package/lib/module/diagnostics/trace-format.js +197 -0
- package/lib/module/diagnostics/trace-format.js.map +1 -0
- package/lib/module/electron/main-binding.js +246 -0
- package/lib/module/electron/main-binding.js.map +1 -0
- package/lib/module/electron/main-router.js +585 -0
- package/lib/module/electron/main-router.js.map +1 -0
- package/lib/module/electron/main.js +7 -0
- package/lib/module/electron/main.js.map +1 -0
- package/lib/module/electron/protocol.js +18 -0
- package/lib/module/electron/protocol.js.map +1 -0
- package/lib/module/electron/renderer-stream-registry.js +255 -0
- package/lib/module/electron/renderer-stream-registry.js.map +1 -0
- package/lib/module/electron/renderer.js +187 -0
- package/lib/module/electron/renderer.js.map +1 -0
- package/lib/module/electron-main.js +35 -0
- package/lib/module/electron-main.js.map +1 -0
- package/lib/module/electron-renderer.js +7 -0
- package/lib/module/electron-renderer.js.map +1 -0
- package/lib/module/index.js +16 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/manager/ble-manager.js +355 -0
- package/lib/module/manager/ble-manager.js.map +1 -0
- package/lib/module/manager/index.js +7 -0
- package/lib/module/manager/index.js.map +1 -0
- package/lib/module/manager/manager-ownership-authority.js +261 -0
- package/lib/module/manager/manager-ownership-authority.js.map +1 -0
- package/lib/module/native-protocol/generated/native-protocol-v1-schema.js +65 -0
- package/lib/module/native-protocol/generated/native-protocol-v1-schema.js.map +1 -0
- package/lib/module/native-protocol/rn-android-boundary.js +534 -0
- package/lib/module/native-protocol/rn-android-boundary.js.map +1 -0
- package/lib/module/native-protocol/rn-android-protocol-records.js +206 -0
- package/lib/module/native-protocol/rn-android-protocol-records.js.map +1 -0
- package/lib/module/native-protocol/rn-apple-boundary.js +11 -0
- package/lib/module/native-protocol/rn-apple-boundary.js.map +1 -0
- package/lib/module/native-protocol/rn-jsi-binary-runtime.js +45 -0
- package/lib/module/native-protocol/rn-jsi-binary-runtime.js.map +1 -0
- package/lib/module/native-protocol/v1-codec.js +434 -0
- package/lib/module/native-protocol/v1-codec.js.map +1 -0
- package/lib/module/node-bluez.js +18 -0
- package/lib/module/node-bluez.js.map +1 -0
- package/lib/module/node-corebluetooth.js +31 -0
- package/lib/module/node-corebluetooth.js.map +1 -0
- package/lib/module/node-winrt.js +39 -0
- package/lib/module/node-winrt.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/profiles/battery-service.js +30 -0
- package/lib/module/profiles/battery-service.js.map +1 -0
- package/lib/module/profiles/blood-pressure.js +73 -0
- package/lib/module/profiles/blood-pressure.js.map +1 -0
- package/lib/module/profiles/bytes.js +49 -0
- package/lib/module/profiles/bytes.js.map +1 -0
- package/lib/module/profiles/commands.js +56 -0
- package/lib/module/profiles/commands.js.map +1 -0
- package/lib/module/profiles/date-time.js +32 -0
- package/lib/module/profiles/date-time.js.map +1 -0
- package/lib/module/profiles/device-information.js +69 -0
- package/lib/module/profiles/device-information.js.map +1 -0
- package/lib/module/profiles/errors.js +19 -0
- package/lib/module/profiles/errors.js.map +1 -0
- package/lib/module/profiles/health-thermometer.js +61 -0
- package/lib/module/profiles/health-thermometer.js.map +1 -0
- package/lib/module/profiles/heart-rate.js +76 -0
- package/lib/module/profiles/heart-rate.js.map +1 -0
- package/lib/module/profiles/identifiers.js +37 -0
- package/lib/module/profiles/identifiers.js.map +1 -0
- package/lib/module/profiles/ieee-11073.js +142 -0
- package/lib/module/profiles/ieee-11073.js.map +1 -0
- package/lib/module/profiles/standard-commands.js +47 -0
- package/lib/module/profiles/standard-commands.js.map +1 -0
- package/lib/module/react-native-manager.js +74 -0
- package/lib/module/react-native-manager.js.map +1 -0
- package/lib/module/react-native.js +18 -0
- package/lib/module/react-native.js.map +1 -0
- package/lib/module/tck/contracts.js +34 -0
- package/lib/module/tck/contracts.js.map +1 -0
- package/lib/module/tck/deterministic/deterministic-tck-factory.js +178 -0
- package/lib/module/tck/deterministic/deterministic-tck-factory.js.map +1 -0
- package/lib/module/tck/deterministic/deterministic-tck-identity.js +141 -0
- package/lib/module/tck/deterministic/deterministic-tck-identity.js.map +1 -0
- package/lib/module/tck/deterministic/deterministic-tck-lifecycle-diagnostics.js +168 -0
- package/lib/module/tck/deterministic/deterministic-tck-lifecycle-diagnostics.js.map +1 -0
- package/lib/module/tck/deterministic/deterministic-tck-manager-ownership.js +162 -0
- package/lib/module/tck/deterministic/deterministic-tck-manager-ownership.js.map +1 -0
- package/lib/module/tck/deterministic/deterministic-tck-scenario-helpers.js +152 -0
- package/lib/module/tck/deterministic/deterministic-tck-scenario-helpers.js.map +1 -0
- package/lib/module/tck/deterministic/deterministic-tck-scenarios.js +611 -0
- package/lib/module/tck/deterministic/deterministic-tck-scenarios.js.map +1 -0
- package/lib/module/tck/deterministic/deterministic-tck-subscription-overflow.js +99 -0
- package/lib/module/tck/deterministic/deterministic-tck-subscription-overflow.js.map +1 -0
- package/lib/module/tck/index.js +8 -0
- package/lib/module/tck/index.js.map +1 -0
- package/lib/module/tck/runner.js +429 -0
- package/lib/module/tck/runner.js.map +1 -0
- package/lib/module/tck/scenario-adapter.js +42 -0
- package/lib/module/tck/scenario-adapter.js.map +1 -0
- package/lib/module/tck/scenarios.js +109 -0
- package/lib/module/tck/scenarios.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-backend-base.js +557 -0
- package/lib/module/testing/deterministic/deterministic-backend-base.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-operation-admission.js +56 -0
- package/lib/module/testing/deterministic/deterministic-operation-admission.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-operation-runtime.js +309 -0
- package/lib/module/testing/deterministic/deterministic-operation-runtime.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-stream.js +460 -0
- package/lib/module/testing/deterministic/deterministic-stream.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-subscription-lifecycle.js +57 -0
- package/lib/module/testing/deterministic/deterministic-subscription-lifecycle.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-test-backend-controller.js +4 -0
- package/lib/module/testing/deterministic/deterministic-test-backend-controller.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-test-backend-gatt.js +29 -0
- package/lib/module/testing/deterministic/deterministic-test-backend-gatt.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-test-backend-handles.js +261 -0
- package/lib/module/testing/deterministic/deterministic-test-backend-handles.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-test-backend-lifecycle-helpers.js +191 -0
- package/lib/module/testing/deterministic/deterministic-test-backend-lifecycle-helpers.js.map +1 -0
- package/lib/module/testing/deterministic/deterministic-test-backend.js +570 -0
- package/lib/module/testing/deterministic/deterministic-test-backend.js.map +1 -0
- package/lib/module/testing/deterministic/virtual-clock.js +93 -0
- package/lib/module/testing/deterministic/virtual-clock.js.map +1 -0
- package/lib/module/testing/deterministic/virtual-peripheral.js +291 -0
- package/lib/module/testing/deterministic/virtual-peripheral.js.map +1 -0
- package/lib/module/testing/scenarios/deterministic-manager-scenario-factory.js +128 -0
- package/lib/module/testing/scenarios/deterministic-manager-scenario-factory.js.map +1 -0
- package/lib/module/testing/scenarios/manager-scenario-executor.js +319 -0
- package/lib/module/testing/scenarios/manager-scenario-executor.js.map +1 -0
- package/lib/module/testing/scenarios/manager-scenario-fixture.js +37 -0
- package/lib/module/testing/scenarios/manager-scenario-fixture.js.map +1 -0
- package/lib/module/testing/scenarios/manager-scenarios.js +130 -0
- package/lib/module/testing/scenarios/manager-scenarios.js.map +1 -0
- package/lib/module/testing.js +20 -0
- package/lib/module/testing.js.map +1 -0
- package/lib/module/web/navigator-web-bluetooth-boundary.js +202 -0
- package/lib/module/web/navigator-web-bluetooth-boundary.js.map +1 -0
- package/lib/module/web/web-bluetooth-backend.js +665 -0
- package/lib/module/web/web-bluetooth-backend.js.map +1 -0
- package/lib/module/web/web-bluetooth-boundary.js +4 -0
- package/lib/module/web/web-bluetooth-boundary.js.map +1 -0
- package/lib/module/web/web-bluetooth-errors.js +62 -0
- package/lib/module/web/web-bluetooth-errors.js.map +1 -0
- package/lib/module/web/web-bluetooth-gatt.js +494 -0
- package/lib/module/web/web-bluetooth-gatt.js.map +1 -0
- package/lib/module/web/web-bluetooth-handles.js +133 -0
- package/lib/module/web/web-bluetooth-handles.js.map +1 -0
- package/lib/module/web/web-bluetooth-tck.js +70 -0
- package/lib/module/web/web-bluetooth-tck.js.map +1 -0
- package/lib/module/web/web-feature-registry.js +53 -0
- package/lib/module/web/web-feature-registry.js.map +1 -0
- package/lib/module/web.js +14 -0
- package/lib/module/web.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/BleError.d.ts +448 -0
- package/lib/typescript/commonjs/src/BleError.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BleManager.d.ts +844 -0
- package/lib/typescript/commonjs/src/BleManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BleModule.d.ts +723 -0
- package/lib/typescript/commonjs/src/BleModule.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Characteristic.d.ts +154 -0
- package/lib/typescript/commonjs/src/Characteristic.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/ConnectionManager.d.ts +209 -0
- package/lib/typescript/commonjs/src/ConnectionManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Descriptor.d.ts +79 -0
- package/lib/typescript/commonjs/src/Descriptor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Device.d.ts +249 -0
- package/lib/typescript/commonjs/src/Device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/DeviceOperationQueue.d.ts +81 -0
- package/lib/typescript/commonjs/src/DeviceOperationQueue.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NativeBlePlx.d.ts +147 -0
- package/lib/typescript/commonjs/src/NativeBlePlx.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/NativeUnifiedBleProtocolControl.d.ts +71 -0
- package/lib/typescript/commonjs/src/NativeUnifiedBleProtocolControl.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Service.d.ts +134 -0
- package/lib/typescript/commonjs/src/Service.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/TypeDefinition.d.ts +339 -0
- package/lib/typescript/commonjs/src/TypeDefinition.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/Utils.d.ts +17 -0
- package/lib/typescript/commonjs/src/Utils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/advertisement.d.ts +75 -0
- package/lib/typescript/commonjs/src/backend-contract/advertisement.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/backend-sdk.d.ts +25 -0
- package/lib/typescript/commonjs/src/backend-contract/backend-sdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/backend.d.ts +139 -0
- package/lib/typescript/commonjs/src/backend-contract/backend.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/capabilities.d.ts +41 -0
- package/lib/typescript/commonjs/src/backend-contract/capabilities.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/connection-controls.d.ts +22 -0
- package/lib/typescript/commonjs/src/backend-contract/connection-controls.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/electron.d.ts +100 -0
- package/lib/typescript/commonjs/src/backend-contract/electron.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/errors.d.ts +30 -0
- package/lib/typescript/commonjs/src/backend-contract/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/gatt.d.ts +70 -0
- package/lib/typescript/commonjs/src/backend-contract/gatt.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/host/electron-main.d.ts +8 -0
- package/lib/typescript/commonjs/src/backend-contract/host/electron-main.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/host/electron-renderer.d.ts +5 -0
- package/lib/typescript/commonjs/src/backend-contract/host/electron-renderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/host/node.d.ts +5 -0
- package/lib/typescript/commonjs/src/backend-contract/host/node.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/host/web.d.ts +20 -0
- package/lib/typescript/commonjs/src/backend-contract/host/web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/identity.d.ts +64 -0
- package/lib/typescript/commonjs/src/backend-contract/identity.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/index.d.ts +18 -0
- package/lib/typescript/commonjs/src/backend-contract/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/operations.d.ts +64 -0
- package/lib/typescript/commonjs/src/backend-contract/operations.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/primitives.d.ts +142 -0
- package/lib/typescript/commonjs/src/backend-contract/primitives.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/restoration.d.ts +47 -0
- package/lib/typescript/commonjs/src/backend-contract/restoration.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/serializable.d.ts +11 -0
- package/lib/typescript/commonjs/src/backend-contract/serializable.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-contract/streams.d.ts +33 -0
- package/lib/typescript/commonjs/src/backend-contract/streams.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-sdk-authoring.d.ts +52 -0
- package/lib/typescript/commonjs/src/backend-sdk-authoring.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backend-sdk.d.ts +14 -0
- package/lib/typescript/commonjs/src/backend-sdk.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-handles.d.ts +74 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-handles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-provider.d.ts +14 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-runtime.d.ts +100 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend.d.ts +30 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-backend.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-dbus-contract.d.ts +92 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-dbus-contract.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-dbus-next-boundary.d.ts +6 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-dbus-next-boundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-gatt-operations.d.ts +12 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-gatt-operations.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-object-store.d.ts +45 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-object-store.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-operation-dispatcher.d.ts +13 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-operation-dispatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-property-waiters.d.ts +11 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-property-waiters.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-runtime-models.d.ts +22 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-runtime-models.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-runtime-types.d.ts +100 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-runtime-types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-scan-runtime.d.ts +11 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-scan-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-subscription-runtime.d.ts +11 -0
- package/lib/typescript/commonjs/src/backends/bluez/bluez-subscription-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-backend.d.ts +121 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-backend.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-boundary.d.ts +61 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-boundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-connection-controls.d.ts +13 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-connection-controls.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-gatt-operations.d.ts +27 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-gatt-operations.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-handles.d.ts +91 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-handles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-identity.d.ts +13 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-identity.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-operation-dispatcher.d.ts +15 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-operation-dispatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-operation-lifecycle.d.ts +10 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-operation-lifecycle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-provider.d.ts +15 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-stream-limits.d.ts +11 -0
- package/lib/typescript/commonjs/src/backends/corebluetooth/corebluetooth-stream-limits.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/reactnative/react-native-android-provider.d.ts +23 -0
- package/lib/typescript/commonjs/src/backends/reactnative/react-native-android-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/reactnative/react-native-apple-provider.d.ts +20 -0
- package/lib/typescript/commonjs/src/backends/reactnative/react-native-apple-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-adapter-state.d.ts +6 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-adapter-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-backend-helpers.d.ts +24 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-backend-helpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-backend.d.ts +114 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-backend.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-boundary.d.ts +96 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-boundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-gatt-operations.d.ts +36 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-gatt-operations.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-handles.d.ts +84 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-handles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-operation-dispatcher.d.ts +26 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-operation-dispatcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-provider.d.ts +17 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-provider.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-subscription-runtime.d.ts +14 -0
- package/lib/typescript/commonjs/src/backends/winrt/winrt-subscription-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/cli-json.d.ts +8 -0
- package/lib/typescript/commonjs/src/cli-json.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/cli.d.ts +31 -0
- package/lib/typescript/commonjs/src/cli.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/codecs-primitives.d.ts +5 -0
- package/lib/typescript/commonjs/src/codecs-primitives.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/codecs.d.ts +7 -0
- package/lib/typescript/commonjs/src/codecs.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/aggregate-stream-quota.d.ts +17 -0
- package/lib/typescript/commonjs/src/core/aggregate-stream-quota.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/bounded-stream.d.ts +69 -0
- package/lib/typescript/commonjs/src/core/bounded-stream.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/core-adapter-state.d.ts +5 -0
- package/lib/typescript/commonjs/src/core/core-adapter-state.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/core-characteristic-operations.d.ts +12 -0
- package/lib/typescript/commonjs/src/core/core-characteristic-operations.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/core-connection-controls.d.ts +14 -0
- package/lib/typescript/commonjs/src/core/core-connection-controls.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/core-descriptor-operations.d.ts +12 -0
- package/lib/typescript/commonjs/src/core/core-descriptor-operations.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/core-discovery.d.ts +9 -0
- package/lib/typescript/commonjs/src/core/core-discovery.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/core-gatt-handles.d.ts +67 -0
- package/lib/typescript/commonjs/src/core/core-gatt-handles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/core-lifecycle-observer.d.ts +14 -0
- package/lib/typescript/commonjs/src/core/core-lifecycle-observer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/gatt-path-equality.d.ts +7 -0
- package/lib/typescript/commonjs/src/core/gatt-path-equality.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/core/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/operation-coordinator.d.ts +87 -0
- package/lib/typescript/commonjs/src/core/operation-coordinator.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/resource-ledger.d.ts +26 -0
- package/lib/typescript/commonjs/src/core/resource-ledger.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/subscription-registry.d.ts +77 -0
- package/lib/typescript/commonjs/src/core/subscription-registry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/trace-recorder.d.ts +39 -0
- package/lib/typescript/commonjs/src/core/trace-recorder.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/unified-ble-core-helpers.d.ts +32 -0
- package/lib/typescript/commonjs/src/core/unified-ble-core-helpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/core/unified-ble-core.d.ts +101 -0
- package/lib/typescript/commonjs/src/core/unified-ble-core.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/diagnostics/trace-format.d.ts +39 -0
- package/lib/typescript/commonjs/src/diagnostics/trace-format.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/discovery/deviceSort.d.ts +23 -0
- package/lib/typescript/commonjs/src/discovery/deviceSort.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/discovery/filters.d.ts +97 -0
- package/lib/typescript/commonjs/src/discovery/filters.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/discovery/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/discovery/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/discovery/uuidMatch.d.ts +29 -0
- package/lib/typescript/commonjs/src/discovery/uuidMatch.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/electron/main-binding.d.ts +48 -0
- package/lib/typescript/commonjs/src/electron/main-binding.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/electron/main-router.d.ts +69 -0
- package/lib/typescript/commonjs/src/electron/main-router.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/electron/main.d.ts +3 -0
- package/lib/typescript/commonjs/src/electron/main.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/electron/protocol.d.ts +73 -0
- package/lib/typescript/commonjs/src/electron/protocol.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/electron/renderer-stream-registry.d.ts +46 -0
- package/lib/typescript/commonjs/src/electron/renderer-stream-registry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/electron/renderer.d.ts +29 -0
- package/lib/typescript/commonjs/src/electron/renderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/electron-main.d.ts +14 -0
- package/lib/typescript/commonjs/src/electron-main.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/electron-renderer.d.ts +3 -0
- package/lib/typescript/commonjs/src/electron-renderer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/encoding.d.ts +13 -0
- package/lib/typescript/commonjs/src/encoding.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/central.d.ts +66 -0
- package/lib/typescript/commonjs/src/helpers/central.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/errors.d.ts +12 -0
- package/lib/typescript/commonjs/src/helpers/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/index.d.ts +9 -0
- package/lib/typescript/commonjs/src/helpers/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers/types.d.ts +122 -0
- package/lib/typescript/commonjs/src/helpers/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hosts/electron.d.ts +78 -0
- package/lib/typescript/commonjs/src/hosts/electron.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hosts/native/bluez/BluezBlePort.d.ts +79 -0
- package/lib/typescript/commonjs/src/hosts/native/bluez/BluezBlePort.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hosts/native/corebluetooth/CoreBluetoothBlePort.d.ts +20 -0
- package/lib/typescript/commonjs/src/hosts/native/corebluetooth/CoreBluetoothBlePort.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hosts/native/winrt/WinRtBlePort.d.ts +18 -0
- package/lib/typescript/commonjs/src/hosts/native/winrt/WinRtBlePort.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hosts/node.d.ts +20 -0
- package/lib/typescript/commonjs/src/hosts/node.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/hosts/web.d.ts +258 -0
- package/lib/typescript/commonjs/src/hosts/web.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +23 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/longWrite.d.ts +25 -0
- package/lib/typescript/commonjs/src/longWrite.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/manager/ble-manager.d.ts +121 -0
- package/lib/typescript/commonjs/src/manager/ble-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/manager/index.d.ts +5 -0
- package/lib/typescript/commonjs/src/manager/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/manager/manager-ownership-authority.d.ts +64 -0
- package/lib/typescript/commonjs/src/manager/manager-ownership-authority.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/native-protocol/generated/native-protocol-v1-schema.d.ts +41 -0
- package/lib/typescript/commonjs/src/native-protocol/generated/native-protocol-v1-schema.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/native-protocol/rn-android-boundary.d.ts +66 -0
- package/lib/typescript/commonjs/src/native-protocol/rn-android-boundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/native-protocol/rn-android-protocol-records.d.ts +31 -0
- package/lib/typescript/commonjs/src/native-protocol/rn-android-protocol-records.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/native-protocol/rn-apple-boundary.d.ts +7 -0
- package/lib/typescript/commonjs/src/native-protocol/rn-apple-boundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/native-protocol/rn-jsi-binary-runtime.d.ts +33 -0
- package/lib/typescript/commonjs/src/native-protocol/rn-jsi-binary-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/native-protocol/v1-codec.d.ts +15 -0
- package/lib/typescript/commonjs/src/native-protocol/v1-codec.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/node-bluez.d.ts +13 -0
- package/lib/typescript/commonjs/src/node-bluez.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/node-corebluetooth.d.ts +13 -0
- package/lib/typescript/commonjs/src/node-corebluetooth.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/node-winrt.d.ts +13 -0
- package/lib/typescript/commonjs/src/node-winrt.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/permissions.d.ts +43 -0
- package/lib/typescript/commonjs/src/permissions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/port/BlePort.d.ts +161 -0
- package/lib/typescript/commonjs/src/port/BlePort.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/port/PortBleManager.d.ts +156 -0
- package/lib/typescript/commonjs/src/port/PortBleManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/battery-service.d.ts +8 -0
- package/lib/typescript/commonjs/src/profiles/battery-service.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/battery.d.ts +34 -0
- package/lib/typescript/commonjs/src/profiles/battery.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/blood-pressure.d.ts +21 -0
- package/lib/typescript/commonjs/src/profiles/blood-pressure.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/bloodPressure.d.ts +74 -0
- package/lib/typescript/commonjs/src/profiles/bloodPressure.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/bytes.d.ts +10 -0
- package/lib/typescript/commonjs/src/profiles/bytes.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/commands.d.ts +30 -0
- package/lib/typescript/commonjs/src/profiles/commands.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/date-time.d.ts +10 -0
- package/lib/typescript/commonjs/src/profiles/date-time.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/device-information.d.ts +24 -0
- package/lib/typescript/commonjs/src/profiles/device-information.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/deviceInformation.d.ts +109 -0
- package/lib/typescript/commonjs/src/profiles/deviceInformation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/errors.d.ts +11 -0
- package/lib/typescript/commonjs/src/profiles/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/health-thermometer.d.ts +17 -0
- package/lib/typescript/commonjs/src/profiles/health-thermometer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/healthThermometer.d.ts +73 -0
- package/lib/typescript/commonjs/src/profiles/healthThermometer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/heart-rate.d.ts +20 -0
- package/lib/typescript/commonjs/src/profiles/heart-rate.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/heartRate.d.ts +129 -0
- package/lib/typescript/commonjs/src/profiles/heartRate.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/identifiers.d.ts +26 -0
- package/lib/typescript/commonjs/src/profiles/identifiers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/ieee-11073.d.ts +15 -0
- package/lib/typescript/commonjs/src/profiles/ieee-11073.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/ieee11073.d.ts +80 -0
- package/lib/typescript/commonjs/src/profiles/ieee11073.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/index.d.ts +21 -0
- package/lib/typescript/commonjs/src/profiles/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/serviceHelpers.d.ts +48 -0
- package/lib/typescript/commonjs/src/profiles/serviceHelpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/standard-commands.d.ts +21 -0
- package/lib/typescript/commonjs/src/profiles/standard-commands.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/profiles/types.d.ts +32 -0
- package/lib/typescript/commonjs/src/profiles/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/react-native-manager.d.ts +19 -0
- package/lib/typescript/commonjs/src/react-native-manager.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/react-native.d.ts +15 -0
- package/lib/typescript/commonjs/src/react-native.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/stringUtils.d.ts +8 -0
- package/lib/typescript/commonjs/src/stringUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/supports.d.ts +13 -0
- package/lib/typescript/commonjs/src/supports.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/contracts.d.ts +132 -0
- package/lib/typescript/commonjs/src/tck/contracts.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-factory.d.ts +9 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-factory.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-identity.d.ts +9 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-identity.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-lifecycle-diagnostics.d.ts +8 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-lifecycle-diagnostics.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-manager-ownership.d.ts +4 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-manager-ownership.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-scenario-helpers.d.ts +56 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-scenario-helpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-scenarios.d.ts +14 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-scenarios.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-subscription-overflow.d.ts +5 -0
- package/lib/typescript/commonjs/src/tck/deterministic/deterministic-tck-subscription-overflow.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/tck/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/runner.d.ts +10 -0
- package/lib/typescript/commonjs/src/tck/runner.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/scenario-adapter.d.ts +19 -0
- package/lib/typescript/commonjs/src/tck/scenario-adapter.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/tck/scenarios.d.ts +4 -0
- package/lib/typescript/commonjs/src/tck/scenarios.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-backend-base.d.ts +118 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-backend-base.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-operation-admission.d.ts +5 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-operation-admission.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-operation-runtime.d.ts +52 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-operation-runtime.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-stream.d.ts +65 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-stream.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-subscription-lifecycle.d.ts +22 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-subscription-lifecycle.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend-controller.d.ts +25 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend-controller.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend-gatt.d.ts +15 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend-gatt.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend-handles.d.ts +109 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend-handles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend-lifecycle-helpers.d.ts +48 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend-lifecycle-helpers.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend.d.ts +71 -0
- package/lib/typescript/commonjs/src/testing/deterministic/deterministic-test-backend.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/virtual-clock.d.ts +22 -0
- package/lib/typescript/commonjs/src/testing/deterministic/virtual-clock.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/deterministic/virtual-peripheral.d.ts +76 -0
- package/lib/typescript/commonjs/src/testing/deterministic/virtual-peripheral.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/scenarios/deterministic-manager-scenario-factory.d.ts +4 -0
- package/lib/typescript/commonjs/src/testing/scenarios/deterministic-manager-scenario-factory.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/scenarios/manager-scenario-executor.d.ts +33 -0
- package/lib/typescript/commonjs/src/testing/scenarios/manager-scenario-executor.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/scenarios/manager-scenario-fixture.d.ts +19 -0
- package/lib/typescript/commonjs/src/testing/scenarios/manager-scenario-fixture.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing/scenarios/manager-scenarios.d.ts +60 -0
- package/lib/typescript/commonjs/src/testing/scenarios/manager-scenarios.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/testing.d.ts +22 -0
- package/lib/typescript/commonjs/src/testing.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/unsupported.d.ts +12 -0
- package/lib/typescript/commonjs/src/unsupported.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/web/navigator-web-bluetooth-boundary.d.ts +95 -0
- package/lib/typescript/commonjs/src/web/navigator-web-bluetooth-boundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-backend.d.ts +99 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-backend.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-boundary.d.ts +78 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-boundary.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-errors.d.ts +13 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-gatt.d.ts +62 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-gatt.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-handles.d.ts +124 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-handles.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-tck.d.ts +33 -0
- package/lib/typescript/commonjs/src/web/web-bluetooth-tck.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/web/web-feature-registry.d.ts +3 -0
- package/lib/typescript/commonjs/src/web/web-feature-registry.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/web.d.ts +10 -0
- package/lib/typescript/commonjs/src/web.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/BleError.d.ts +448 -0
- package/lib/typescript/module/src/BleError.d.ts.map +1 -0
- package/lib/typescript/module/src/BleManager.d.ts +844 -0
- package/lib/typescript/module/src/BleManager.d.ts.map +1 -0
- package/lib/typescript/module/src/BleModule.d.ts +723 -0
- package/lib/typescript/module/src/BleModule.d.ts.map +1 -0
- package/lib/typescript/module/src/Characteristic.d.ts +154 -0
- package/lib/typescript/module/src/Characteristic.d.ts.map +1 -0
- package/lib/typescript/module/src/ConnectionManager.d.ts +209 -0
- package/lib/typescript/module/src/ConnectionManager.d.ts.map +1 -0
- package/lib/typescript/module/src/Descriptor.d.ts +79 -0
- package/lib/typescript/module/src/Descriptor.d.ts.map +1 -0
- package/lib/typescript/module/src/Device.d.ts +249 -0
- package/lib/typescript/module/src/Device.d.ts.map +1 -0
- package/lib/typescript/module/src/DeviceOperationQueue.d.ts +81 -0
- package/lib/typescript/module/src/DeviceOperationQueue.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeBlePlx.d.ts +147 -0
- package/lib/typescript/module/src/NativeBlePlx.d.ts.map +1 -0
- package/lib/typescript/module/src/NativeUnifiedBleProtocolControl.d.ts +71 -0
- package/lib/typescript/module/src/NativeUnifiedBleProtocolControl.d.ts.map +1 -0
- package/lib/typescript/module/src/Service.d.ts +134 -0
- package/lib/typescript/module/src/Service.d.ts.map +1 -0
- package/lib/typescript/module/src/TypeDefinition.d.ts +339 -0
- package/lib/typescript/module/src/TypeDefinition.d.ts.map +1 -0
- package/lib/typescript/module/src/Utils.d.ts +17 -0
- package/lib/typescript/module/src/Utils.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/advertisement.d.ts +75 -0
- package/lib/typescript/module/src/backend-contract/advertisement.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/backend-sdk.d.ts +25 -0
- package/lib/typescript/module/src/backend-contract/backend-sdk.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/backend.d.ts +139 -0
- package/lib/typescript/module/src/backend-contract/backend.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/capabilities.d.ts +41 -0
- package/lib/typescript/module/src/backend-contract/capabilities.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/connection-controls.d.ts +22 -0
- package/lib/typescript/module/src/backend-contract/connection-controls.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/electron.d.ts +100 -0
- package/lib/typescript/module/src/backend-contract/electron.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/errors.d.ts +30 -0
- package/lib/typescript/module/src/backend-contract/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/gatt.d.ts +70 -0
- package/lib/typescript/module/src/backend-contract/gatt.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/host/electron-main.d.ts +8 -0
- package/lib/typescript/module/src/backend-contract/host/electron-main.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/host/electron-renderer.d.ts +5 -0
- package/lib/typescript/module/src/backend-contract/host/electron-renderer.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/host/node.d.ts +5 -0
- package/lib/typescript/module/src/backend-contract/host/node.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/host/web.d.ts +20 -0
- package/lib/typescript/module/src/backend-contract/host/web.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/identity.d.ts +64 -0
- package/lib/typescript/module/src/backend-contract/identity.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/index.d.ts +18 -0
- package/lib/typescript/module/src/backend-contract/index.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/operations.d.ts +64 -0
- package/lib/typescript/module/src/backend-contract/operations.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/primitives.d.ts +142 -0
- package/lib/typescript/module/src/backend-contract/primitives.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/restoration.d.ts +47 -0
- package/lib/typescript/module/src/backend-contract/restoration.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/serializable.d.ts +11 -0
- package/lib/typescript/module/src/backend-contract/serializable.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-contract/streams.d.ts +33 -0
- package/lib/typescript/module/src/backend-contract/streams.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-sdk-authoring.d.ts +52 -0
- package/lib/typescript/module/src/backend-sdk-authoring.d.ts.map +1 -0
- package/lib/typescript/module/src/backend-sdk.d.ts +14 -0
- package/lib/typescript/module/src/backend-sdk.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-backend-handles.d.ts +74 -0
- package/lib/typescript/module/src/backends/bluez/bluez-backend-handles.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-backend-provider.d.ts +14 -0
- package/lib/typescript/module/src/backends/bluez/bluez-backend-provider.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-backend-runtime.d.ts +100 -0
- package/lib/typescript/module/src/backends/bluez/bluez-backend-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-backend.d.ts +30 -0
- package/lib/typescript/module/src/backends/bluez/bluez-backend.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-dbus-contract.d.ts +92 -0
- package/lib/typescript/module/src/backends/bluez/bluez-dbus-contract.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-dbus-next-boundary.d.ts +6 -0
- package/lib/typescript/module/src/backends/bluez/bluez-dbus-next-boundary.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-gatt-operations.d.ts +12 -0
- package/lib/typescript/module/src/backends/bluez/bluez-gatt-operations.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-object-store.d.ts +45 -0
- package/lib/typescript/module/src/backends/bluez/bluez-object-store.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-operation-dispatcher.d.ts +13 -0
- package/lib/typescript/module/src/backends/bluez/bluez-operation-dispatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-property-waiters.d.ts +11 -0
- package/lib/typescript/module/src/backends/bluez/bluez-property-waiters.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-runtime-models.d.ts +22 -0
- package/lib/typescript/module/src/backends/bluez/bluez-runtime-models.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-runtime-types.d.ts +100 -0
- package/lib/typescript/module/src/backends/bluez/bluez-runtime-types.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-scan-runtime.d.ts +11 -0
- package/lib/typescript/module/src/backends/bluez/bluez-scan-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/bluez/bluez-subscription-runtime.d.ts +11 -0
- package/lib/typescript/module/src/backends/bluez/bluez-subscription-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-backend.d.ts +121 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-backend.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-boundary.d.ts +61 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-boundary.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-connection-controls.d.ts +13 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-connection-controls.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-gatt-operations.d.ts +27 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-gatt-operations.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-handles.d.ts +91 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-handles.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-identity.d.ts +13 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-identity.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-operation-dispatcher.d.ts +15 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-operation-dispatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-operation-lifecycle.d.ts +10 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-operation-lifecycle.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-provider.d.ts +15 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-provider.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-stream-limits.d.ts +11 -0
- package/lib/typescript/module/src/backends/corebluetooth/corebluetooth-stream-limits.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/reactnative/react-native-android-provider.d.ts +23 -0
- package/lib/typescript/module/src/backends/reactnative/react-native-android-provider.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/reactnative/react-native-apple-provider.d.ts +20 -0
- package/lib/typescript/module/src/backends/reactnative/react-native-apple-provider.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/winrt/winrt-adapter-state.d.ts +6 -0
- package/lib/typescript/module/src/backends/winrt/winrt-adapter-state.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/winrt/winrt-backend-helpers.d.ts +24 -0
- package/lib/typescript/module/src/backends/winrt/winrt-backend-helpers.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/winrt/winrt-backend.d.ts +114 -0
- package/lib/typescript/module/src/backends/winrt/winrt-backend.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/winrt/winrt-boundary.d.ts +96 -0
- package/lib/typescript/module/src/backends/winrt/winrt-boundary.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/winrt/winrt-gatt-operations.d.ts +36 -0
- package/lib/typescript/module/src/backends/winrt/winrt-gatt-operations.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/winrt/winrt-handles.d.ts +84 -0
- package/lib/typescript/module/src/backends/winrt/winrt-handles.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/winrt/winrt-operation-dispatcher.d.ts +26 -0
- package/lib/typescript/module/src/backends/winrt/winrt-operation-dispatcher.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/winrt/winrt-provider.d.ts +17 -0
- package/lib/typescript/module/src/backends/winrt/winrt-provider.d.ts.map +1 -0
- package/lib/typescript/module/src/backends/winrt/winrt-subscription-runtime.d.ts +14 -0
- package/lib/typescript/module/src/backends/winrt/winrt-subscription-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/cli-json.d.ts +8 -0
- package/lib/typescript/module/src/cli-json.d.ts.map +1 -0
- package/lib/typescript/module/src/cli.d.ts +31 -0
- package/lib/typescript/module/src/cli.d.ts.map +1 -0
- package/lib/typescript/module/src/codecs-primitives.d.ts +5 -0
- package/lib/typescript/module/src/codecs-primitives.d.ts.map +1 -0
- package/lib/typescript/module/src/codecs.d.ts +7 -0
- package/lib/typescript/module/src/codecs.d.ts.map +1 -0
- package/lib/typescript/module/src/core/aggregate-stream-quota.d.ts +17 -0
- package/lib/typescript/module/src/core/aggregate-stream-quota.d.ts.map +1 -0
- package/lib/typescript/module/src/core/bounded-stream.d.ts +69 -0
- package/lib/typescript/module/src/core/bounded-stream.d.ts.map +1 -0
- package/lib/typescript/module/src/core/core-adapter-state.d.ts +5 -0
- package/lib/typescript/module/src/core/core-adapter-state.d.ts.map +1 -0
- package/lib/typescript/module/src/core/core-characteristic-operations.d.ts +12 -0
- package/lib/typescript/module/src/core/core-characteristic-operations.d.ts.map +1 -0
- package/lib/typescript/module/src/core/core-connection-controls.d.ts +14 -0
- package/lib/typescript/module/src/core/core-connection-controls.d.ts.map +1 -0
- package/lib/typescript/module/src/core/core-descriptor-operations.d.ts +12 -0
- package/lib/typescript/module/src/core/core-descriptor-operations.d.ts.map +1 -0
- package/lib/typescript/module/src/core/core-discovery.d.ts +9 -0
- package/lib/typescript/module/src/core/core-discovery.d.ts.map +1 -0
- package/lib/typescript/module/src/core/core-gatt-handles.d.ts +67 -0
- package/lib/typescript/module/src/core/core-gatt-handles.d.ts.map +1 -0
- package/lib/typescript/module/src/core/core-lifecycle-observer.d.ts +14 -0
- package/lib/typescript/module/src/core/core-lifecycle-observer.d.ts.map +1 -0
- package/lib/typescript/module/src/core/gatt-path-equality.d.ts +7 -0
- package/lib/typescript/module/src/core/gatt-path-equality.d.ts.map +1 -0
- package/lib/typescript/module/src/core/index.d.ts +11 -0
- package/lib/typescript/module/src/core/index.d.ts.map +1 -0
- package/lib/typescript/module/src/core/operation-coordinator.d.ts +87 -0
- package/lib/typescript/module/src/core/operation-coordinator.d.ts.map +1 -0
- package/lib/typescript/module/src/core/resource-ledger.d.ts +26 -0
- package/lib/typescript/module/src/core/resource-ledger.d.ts.map +1 -0
- package/lib/typescript/module/src/core/subscription-registry.d.ts +77 -0
- package/lib/typescript/module/src/core/subscription-registry.d.ts.map +1 -0
- package/lib/typescript/module/src/core/trace-recorder.d.ts +39 -0
- package/lib/typescript/module/src/core/trace-recorder.d.ts.map +1 -0
- package/lib/typescript/module/src/core/unified-ble-core-helpers.d.ts +32 -0
- package/lib/typescript/module/src/core/unified-ble-core-helpers.d.ts.map +1 -0
- package/lib/typescript/module/src/core/unified-ble-core.d.ts +101 -0
- package/lib/typescript/module/src/core/unified-ble-core.d.ts.map +1 -0
- package/lib/typescript/module/src/diagnostics/trace-format.d.ts +39 -0
- package/lib/typescript/module/src/diagnostics/trace-format.d.ts.map +1 -0
- package/lib/typescript/module/src/discovery/deviceSort.d.ts +23 -0
- package/lib/typescript/module/src/discovery/deviceSort.d.ts.map +1 -0
- package/lib/typescript/module/src/discovery/filters.d.ts +97 -0
- package/lib/typescript/module/src/discovery/filters.d.ts.map +1 -0
- package/lib/typescript/module/src/discovery/index.d.ts +6 -0
- package/lib/typescript/module/src/discovery/index.d.ts.map +1 -0
- package/lib/typescript/module/src/discovery/uuidMatch.d.ts +29 -0
- package/lib/typescript/module/src/discovery/uuidMatch.d.ts.map +1 -0
- package/lib/typescript/module/src/electron/main-binding.d.ts +48 -0
- package/lib/typescript/module/src/electron/main-binding.d.ts.map +1 -0
- package/lib/typescript/module/src/electron/main-router.d.ts +69 -0
- package/lib/typescript/module/src/electron/main-router.d.ts.map +1 -0
- package/lib/typescript/module/src/electron/main.d.ts +3 -0
- package/lib/typescript/module/src/electron/main.d.ts.map +1 -0
- package/lib/typescript/module/src/electron/protocol.d.ts +73 -0
- package/lib/typescript/module/src/electron/protocol.d.ts.map +1 -0
- package/lib/typescript/module/src/electron/renderer-stream-registry.d.ts +46 -0
- package/lib/typescript/module/src/electron/renderer-stream-registry.d.ts.map +1 -0
- package/lib/typescript/module/src/electron/renderer.d.ts +29 -0
- package/lib/typescript/module/src/electron/renderer.d.ts.map +1 -0
- package/lib/typescript/module/src/electron-main.d.ts +14 -0
- package/lib/typescript/module/src/electron-main.d.ts.map +1 -0
- package/lib/typescript/module/src/electron-renderer.d.ts +3 -0
- package/lib/typescript/module/src/electron-renderer.d.ts.map +1 -0
- package/lib/typescript/module/src/encoding.d.ts +13 -0
- package/lib/typescript/module/src/encoding.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/central.d.ts +66 -0
- package/lib/typescript/module/src/helpers/central.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/errors.d.ts +12 -0
- package/lib/typescript/module/src/helpers/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/index.d.ts +9 -0
- package/lib/typescript/module/src/helpers/index.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers/types.d.ts +122 -0
- package/lib/typescript/module/src/helpers/types.d.ts.map +1 -0
- package/lib/typescript/module/src/hosts/electron.d.ts +78 -0
- package/lib/typescript/module/src/hosts/electron.d.ts.map +1 -0
- package/lib/typescript/module/src/hosts/native/bluez/BluezBlePort.d.ts +79 -0
- package/lib/typescript/module/src/hosts/native/bluez/BluezBlePort.d.ts.map +1 -0
- package/lib/typescript/module/src/hosts/native/corebluetooth/CoreBluetoothBlePort.d.ts +20 -0
- package/lib/typescript/module/src/hosts/native/corebluetooth/CoreBluetoothBlePort.d.ts.map +1 -0
- package/lib/typescript/module/src/hosts/native/winrt/WinRtBlePort.d.ts +18 -0
- package/lib/typescript/module/src/hosts/native/winrt/WinRtBlePort.d.ts.map +1 -0
- package/lib/typescript/module/src/hosts/node.d.ts +20 -0
- package/lib/typescript/module/src/hosts/node.d.ts.map +1 -0
- package/lib/typescript/module/src/hosts/web.d.ts +258 -0
- package/lib/typescript/module/src/hosts/web.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +23 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/longWrite.d.ts +25 -0
- package/lib/typescript/module/src/longWrite.d.ts.map +1 -0
- package/lib/typescript/module/src/manager/ble-manager.d.ts +121 -0
- package/lib/typescript/module/src/manager/ble-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/manager/index.d.ts +5 -0
- package/lib/typescript/module/src/manager/index.d.ts.map +1 -0
- package/lib/typescript/module/src/manager/manager-ownership-authority.d.ts +64 -0
- package/lib/typescript/module/src/manager/manager-ownership-authority.d.ts.map +1 -0
- package/lib/typescript/module/src/native-protocol/generated/native-protocol-v1-schema.d.ts +41 -0
- package/lib/typescript/module/src/native-protocol/generated/native-protocol-v1-schema.d.ts.map +1 -0
- package/lib/typescript/module/src/native-protocol/rn-android-boundary.d.ts +66 -0
- package/lib/typescript/module/src/native-protocol/rn-android-boundary.d.ts.map +1 -0
- package/lib/typescript/module/src/native-protocol/rn-android-protocol-records.d.ts +31 -0
- package/lib/typescript/module/src/native-protocol/rn-android-protocol-records.d.ts.map +1 -0
- package/lib/typescript/module/src/native-protocol/rn-apple-boundary.d.ts +7 -0
- package/lib/typescript/module/src/native-protocol/rn-apple-boundary.d.ts.map +1 -0
- package/lib/typescript/module/src/native-protocol/rn-jsi-binary-runtime.d.ts +33 -0
- package/lib/typescript/module/src/native-protocol/rn-jsi-binary-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/native-protocol/v1-codec.d.ts +15 -0
- package/lib/typescript/module/src/native-protocol/v1-codec.d.ts.map +1 -0
- package/lib/typescript/module/src/node-bluez.d.ts +13 -0
- package/lib/typescript/module/src/node-bluez.d.ts.map +1 -0
- package/lib/typescript/module/src/node-corebluetooth.d.ts +13 -0
- package/lib/typescript/module/src/node-corebluetooth.d.ts.map +1 -0
- package/lib/typescript/module/src/node-winrt.d.ts +13 -0
- package/lib/typescript/module/src/node-winrt.d.ts.map +1 -0
- package/lib/typescript/module/src/permissions.d.ts +43 -0
- package/lib/typescript/module/src/permissions.d.ts.map +1 -0
- package/lib/typescript/module/src/port/BlePort.d.ts +161 -0
- package/lib/typescript/module/src/port/BlePort.d.ts.map +1 -0
- package/lib/typescript/module/src/port/PortBleManager.d.ts +156 -0
- package/lib/typescript/module/src/port/PortBleManager.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/battery-service.d.ts +8 -0
- package/lib/typescript/module/src/profiles/battery-service.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/battery.d.ts +34 -0
- package/lib/typescript/module/src/profiles/battery.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/blood-pressure.d.ts +21 -0
- package/lib/typescript/module/src/profiles/blood-pressure.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/bloodPressure.d.ts +74 -0
- package/lib/typescript/module/src/profiles/bloodPressure.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/bytes.d.ts +10 -0
- package/lib/typescript/module/src/profiles/bytes.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/commands.d.ts +30 -0
- package/lib/typescript/module/src/profiles/commands.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/date-time.d.ts +10 -0
- package/lib/typescript/module/src/profiles/date-time.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/device-information.d.ts +24 -0
- package/lib/typescript/module/src/profiles/device-information.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/deviceInformation.d.ts +109 -0
- package/lib/typescript/module/src/profiles/deviceInformation.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/errors.d.ts +11 -0
- package/lib/typescript/module/src/profiles/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/health-thermometer.d.ts +17 -0
- package/lib/typescript/module/src/profiles/health-thermometer.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/healthThermometer.d.ts +73 -0
- package/lib/typescript/module/src/profiles/healthThermometer.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/heart-rate.d.ts +20 -0
- package/lib/typescript/module/src/profiles/heart-rate.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/heartRate.d.ts +129 -0
- package/lib/typescript/module/src/profiles/heartRate.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/identifiers.d.ts +26 -0
- package/lib/typescript/module/src/profiles/identifiers.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/ieee-11073.d.ts +15 -0
- package/lib/typescript/module/src/profiles/ieee-11073.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/ieee11073.d.ts +80 -0
- package/lib/typescript/module/src/profiles/ieee11073.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/index.d.ts +21 -0
- package/lib/typescript/module/src/profiles/index.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/serviceHelpers.d.ts +48 -0
- package/lib/typescript/module/src/profiles/serviceHelpers.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/standard-commands.d.ts +21 -0
- package/lib/typescript/module/src/profiles/standard-commands.d.ts.map +1 -0
- package/lib/typescript/module/src/profiles/types.d.ts +32 -0
- package/lib/typescript/module/src/profiles/types.d.ts.map +1 -0
- package/lib/typescript/module/src/react-native-manager.d.ts +19 -0
- package/lib/typescript/module/src/react-native-manager.d.ts.map +1 -0
- package/lib/typescript/module/src/react-native.d.ts +15 -0
- package/lib/typescript/module/src/react-native.d.ts.map +1 -0
- package/lib/typescript/module/src/stringUtils.d.ts +8 -0
- package/lib/typescript/module/src/stringUtils.d.ts.map +1 -0
- package/lib/typescript/module/src/supports.d.ts +13 -0
- package/lib/typescript/module/src/supports.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/contracts.d.ts +132 -0
- package/lib/typescript/module/src/tck/contracts.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-factory.d.ts +9 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-factory.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-identity.d.ts +9 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-identity.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-lifecycle-diagnostics.d.ts +8 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-lifecycle-diagnostics.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-manager-ownership.d.ts +4 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-manager-ownership.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-scenario-helpers.d.ts +56 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-scenario-helpers.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-scenarios.d.ts +14 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-scenarios.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-subscription-overflow.d.ts +5 -0
- package/lib/typescript/module/src/tck/deterministic/deterministic-tck-subscription-overflow.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/index.d.ts +6 -0
- package/lib/typescript/module/src/tck/index.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/runner.d.ts +10 -0
- package/lib/typescript/module/src/tck/runner.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/scenario-adapter.d.ts +19 -0
- package/lib/typescript/module/src/tck/scenario-adapter.d.ts.map +1 -0
- package/lib/typescript/module/src/tck/scenarios.d.ts +4 -0
- package/lib/typescript/module/src/tck/scenarios.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-backend-base.d.ts +118 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-backend-base.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-operation-admission.d.ts +5 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-operation-admission.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-operation-runtime.d.ts +52 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-operation-runtime.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-stream.d.ts +65 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-stream.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-subscription-lifecycle.d.ts +22 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-subscription-lifecycle.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend-controller.d.ts +25 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend-controller.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend-gatt.d.ts +15 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend-gatt.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend-handles.d.ts +109 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend-handles.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend-lifecycle-helpers.d.ts +48 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend-lifecycle-helpers.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend.d.ts +71 -0
- package/lib/typescript/module/src/testing/deterministic/deterministic-test-backend.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/virtual-clock.d.ts +22 -0
- package/lib/typescript/module/src/testing/deterministic/virtual-clock.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/deterministic/virtual-peripheral.d.ts +76 -0
- package/lib/typescript/module/src/testing/deterministic/virtual-peripheral.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/scenarios/deterministic-manager-scenario-factory.d.ts +4 -0
- package/lib/typescript/module/src/testing/scenarios/deterministic-manager-scenario-factory.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/scenarios/manager-scenario-executor.d.ts +33 -0
- package/lib/typescript/module/src/testing/scenarios/manager-scenario-executor.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/scenarios/manager-scenario-fixture.d.ts +19 -0
- package/lib/typescript/module/src/testing/scenarios/manager-scenario-fixture.d.ts.map +1 -0
- package/lib/typescript/module/src/testing/scenarios/manager-scenarios.d.ts +60 -0
- package/lib/typescript/module/src/testing/scenarios/manager-scenarios.d.ts.map +1 -0
- package/lib/typescript/module/src/testing.d.ts +22 -0
- package/lib/typescript/module/src/testing.d.ts.map +1 -0
- package/lib/typescript/module/src/unsupported.d.ts +12 -0
- package/lib/typescript/module/src/unsupported.d.ts.map +1 -0
- package/lib/typescript/module/src/web/navigator-web-bluetooth-boundary.d.ts +95 -0
- package/lib/typescript/module/src/web/navigator-web-bluetooth-boundary.d.ts.map +1 -0
- package/lib/typescript/module/src/web/web-bluetooth-backend.d.ts +99 -0
- package/lib/typescript/module/src/web/web-bluetooth-backend.d.ts.map +1 -0
- package/lib/typescript/module/src/web/web-bluetooth-boundary.d.ts +78 -0
- package/lib/typescript/module/src/web/web-bluetooth-boundary.d.ts.map +1 -0
- package/lib/typescript/module/src/web/web-bluetooth-errors.d.ts +13 -0
- package/lib/typescript/module/src/web/web-bluetooth-errors.d.ts.map +1 -0
- package/lib/typescript/module/src/web/web-bluetooth-gatt.d.ts +62 -0
- package/lib/typescript/module/src/web/web-bluetooth-gatt.d.ts.map +1 -0
- package/lib/typescript/module/src/web/web-bluetooth-handles.d.ts +124 -0
- package/lib/typescript/module/src/web/web-bluetooth-handles.d.ts.map +1 -0
- package/lib/typescript/module/src/web/web-bluetooth-tck.d.ts +33 -0
- package/lib/typescript/module/src/web/web-bluetooth-tck.d.ts.map +1 -0
- package/lib/typescript/module/src/web/web-feature-registry.d.ts +3 -0
- package/lib/typescript/module/src/web/web-feature-registry.d.ts.map +1 -0
- package/lib/typescript/module/src/web.d.ts +10 -0
- package/lib/typescript/module/src/web.d.ts.map +1 -0
- package/native/electron/bluez/index.js +9 -0
- package/native/electron/corebluetooth/binding.gyp +42 -0
- package/native/electron/corebluetooth/index.js +517 -0
- package/native/electron/corebluetooth/src/addon.mm +1768 -0
- package/native/electron/corebluetooth/src/addon_stub.cc +19 -0
- package/native/electron/winrt/binding.gyp +22 -0
- package/native/electron/winrt/index.js +17 -0
- package/native/electron/winrt/src/addon.cpp +865 -0
- package/native/electron/winrt/src/winrt-boundary.inc +491 -0
- package/native/protocol/CMakeLists.txt +85 -0
- package/native/protocol/generated/NativeProtocolV1Schema.hpp +419 -0
- package/native/protocol/include/NativeProtocolControlRuntime.hpp +83 -0
- package/native/protocol/include/NativeProtocolV1Codec.hpp +99 -0
- package/native/protocol/include/NativeProtocolV1Registry.hpp +153 -0
- package/native/protocol/include/OwnedBinaryPayloadStore.hpp +56 -0
- package/native/protocol/include/OwnedJsiBinaryTransport.hpp +45 -0
- package/native/protocol/schema/native-protocol-v1-abi.json +68 -0
- package/native/protocol/schema/native-protocol-v1.json +359 -0
- package/native/protocol/src/NativeProtocolControlRuntime.cpp +567 -0
- package/native/protocol/src/NativeProtocolV1Codec.cpp +760 -0
- package/native/protocol/src/NativeProtocolV1Registry.cpp +331 -0
- package/native/protocol/src/OwnedBinaryPayloadStore.cpp +140 -0
- package/native/protocol/src/OwnedJsiBinaryTransport.cpp +112 -0
- package/package.json +488 -0
- package/plugin/build/debugLog.d.ts +2 -0
- package/plugin/build/debugLog.js +18 -0
- package/plugin/build/withBLE.d.ts +18 -0
- package/plugin/build/withBLE.js +75 -0
- package/plugin/build/withBLEAndroidForegroundService.d.ts +40 -0
- package/plugin/build/withBLEAndroidForegroundService.js +233 -0
- package/plugin/build/withBLEAndroidManifest.d.ts +44 -0
- package/plugin/build/withBLEAndroidManifest.js +89 -0
- package/plugin/build/withBLEBackgroundModes.d.ts +9 -0
- package/plugin/build/withBLEBackgroundModes.js +37 -0
- package/plugin/build/withBLEDebugLogging.d.ts +19 -0
- package/plugin/build/withBLEDebugLogging.js +54 -0
- package/plugin/build/withBLERestorationPodfile.d.ts +27 -0
- package/plugin/build/withBLERestorationPodfile.js +214 -0
- package/plugin/build/withBluetoothPermissions.d.ts +4 -0
- package/plugin/build/withBluetoothPermissions.js +13 -0
- package/unified-ble-manager.podspec +87 -0
|
@@ -0,0 +1,883 @@
|
|
|
1
|
+
// ios/NativeProtocol/UnifiedBleProtocolAppleExecution.mm
|
|
2
|
+
|
|
3
|
+
// ios/NativeProtocol/UnifiedBleProtocolAppleExecution.mm
|
|
4
|
+
|
|
5
|
+
#import <Foundation/Foundation.h>
|
|
6
|
+
#import <CoreBluetooth/CoreBluetooth.h>
|
|
7
|
+
#import <ReactCommon/CallInvoker.h>
|
|
8
|
+
|
|
9
|
+
#if __has_include("BlePlx-Swift.h")
|
|
10
|
+
#import "BlePlx-Swift.h"
|
|
11
|
+
#endif
|
|
12
|
+
|
|
13
|
+
#include "UnifiedBleProtocolAppleExecution.hpp"
|
|
14
|
+
#include "UnifiedBleProtocolAppleBinaryDelivery.hpp"
|
|
15
|
+
|
|
16
|
+
#include <jsi/jsi.h>
|
|
17
|
+
|
|
18
|
+
#include <atomic>
|
|
19
|
+
#include <chrono>
|
|
20
|
+
#include <cstring>
|
|
21
|
+
#include <functional>
|
|
22
|
+
#include <memory>
|
|
23
|
+
#include <mutex>
|
|
24
|
+
#include <optional>
|
|
25
|
+
#include <stdexcept>
|
|
26
|
+
#include <string>
|
|
27
|
+
#include <unordered_map>
|
|
28
|
+
#include <utility>
|
|
29
|
+
#include <vector>
|
|
30
|
+
|
|
31
|
+
namespace jsi = facebook::jsi;
|
|
32
|
+
namespace protocol = unified_ble::native_protocol::v1;
|
|
33
|
+
|
|
34
|
+
namespace {
|
|
35
|
+
|
|
36
|
+
constexpr const char* kRuntimeName = "__unifiedBleNativeProtocolV1";
|
|
37
|
+
|
|
38
|
+
protocol::ProtocolField field(std::uint16_t id, protocol::ProtocolFieldValue value) {
|
|
39
|
+
return {.id = id, .value = std::move(value)};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
protocol::ProtocolRecordReference reference(const protocol::ProtocolRecord& record) {
|
|
43
|
+
return std::make_shared<protocol::ProtocolRecord>(record);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const protocol::ProtocolField* findField(const protocol::ProtocolRecord& record, std::uint16_t id) {
|
|
47
|
+
for (const auto& candidate : record.fields) {
|
|
48
|
+
if (candidate.id == id) {
|
|
49
|
+
return &candidate;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return nullptr;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const protocol::ProtocolRecord& requiredRecord(const protocol::ProtocolRecord& record, std::uint16_t id) {
|
|
56
|
+
const auto* candidate = findField(record, id);
|
|
57
|
+
const auto* value = candidate == nullptr ? nullptr : std::get_if<protocol::ProtocolRecordReference>(&candidate->value);
|
|
58
|
+
if (value == nullptr || !*value) {
|
|
59
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::malformedRecord, "Apple native protocol record field is missing");
|
|
60
|
+
}
|
|
61
|
+
return **value;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const std::string& requiredString(const protocol::ProtocolRecord& record, std::uint16_t id) {
|
|
65
|
+
const auto* candidate = findField(record, id);
|
|
66
|
+
const auto* value = candidate == nullptr ? nullptr : std::get_if<std::string>(&candidate->value);
|
|
67
|
+
if (value == nullptr || value->empty()) {
|
|
68
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::malformedRecord, "Apple native protocol string field is missing");
|
|
69
|
+
}
|
|
70
|
+
return *value;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
bool requiredBoolean(const protocol::ProtocolRecord& record, std::uint16_t id) {
|
|
74
|
+
const auto* candidate = findField(record, id);
|
|
75
|
+
const auto* value = candidate == nullptr ? nullptr : std::get_if<bool>(&candidate->value);
|
|
76
|
+
if (value == nullptr) {
|
|
77
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::malformedRecord, "Apple native protocol boolean field is missing");
|
|
78
|
+
}
|
|
79
|
+
return *value;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const protocol::ProtocolStringList& requiredStringList(const protocol::ProtocolRecord& record, std::uint16_t id) {
|
|
83
|
+
const auto* candidate = findField(record, id);
|
|
84
|
+
const auto* value = candidate == nullptr ? nullptr : std::get_if<protocol::ProtocolStringList>(&candidate->value);
|
|
85
|
+
if (value == nullptr) {
|
|
86
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::malformedRecord, "Apple native protocol string list field is missing");
|
|
87
|
+
}
|
|
88
|
+
return *value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
protocol::ProtocolRecord attachmentRecord(const protocol::NativeAttachmentIdentity& attachment) {
|
|
92
|
+
return {
|
|
93
|
+
.kind = protocol::RecordKind::attachment,
|
|
94
|
+
.fields = {
|
|
95
|
+
field(1U, attachment.attachmentId),
|
|
96
|
+
field(2U, attachment.backendInstanceId),
|
|
97
|
+
field(3U, attachment.backendGeneration),
|
|
98
|
+
field(4U, attachment.adapterId),
|
|
99
|
+
field(5U, attachment.adapterGeneration),
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
protocol::ProtocolRecord terminal(
|
|
105
|
+
const protocol::ProtocolRecord& command,
|
|
106
|
+
const std::string& outcome,
|
|
107
|
+
const std::optional<std::string>& cause = std::nullopt) {
|
|
108
|
+
std::vector<protocol::ProtocolField> fields{
|
|
109
|
+
field(1U, reference(requiredRecord(command, 2U))),
|
|
110
|
+
field(2U, outcome),
|
|
111
|
+
};
|
|
112
|
+
if (cause && !cause->empty()) {
|
|
113
|
+
fields.push_back(field(3U, *cause));
|
|
114
|
+
}
|
|
115
|
+
return {.kind = protocol::RecordKind::terminal, .fields = std::move(fields)};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
std::string resultKindFor(const std::string& commandKind) {
|
|
119
|
+
if (commandKind == "scanStart") return "scanStarted";
|
|
120
|
+
if (commandKind == "connect") return "connected";
|
|
121
|
+
if (commandKind == "discover") return "database";
|
|
122
|
+
if (commandKind == "read") return "read";
|
|
123
|
+
if (commandKind == "readRssi") return "rssi";
|
|
124
|
+
if (commandKind == "requestMtu") return "mtu";
|
|
125
|
+
if (commandKind == "write") return "write";
|
|
126
|
+
if (commandKind == "subscribe") return "subscribed";
|
|
127
|
+
if (commandKind == "unsubscribe") return "unsubscribed";
|
|
128
|
+
if (commandKind == "destroy") return "destroyed";
|
|
129
|
+
return "accepted";
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
std::uint64_t monotonicMilliseconds() {
|
|
133
|
+
const auto duration = std::chrono::steady_clock::now().time_since_epoch();
|
|
134
|
+
const auto count = std::chrono::duration_cast<std::chrono::milliseconds>(duration).count();
|
|
135
|
+
if (count < 0) {
|
|
136
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::malformedRecord, "Apple monotonic clock is negative");
|
|
137
|
+
}
|
|
138
|
+
return static_cast<std::uint64_t>(count);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
std::string nsString(NSString* value, const char* name) {
|
|
142
|
+
if (value == nil || value.length == 0U) {
|
|
143
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::malformedRecord, std::string("Apple native ") + name + " is missing");
|
|
144
|
+
}
|
|
145
|
+
const char* utf8 = value.UTF8String;
|
|
146
|
+
if (utf8 == nullptr) {
|
|
147
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::detachedPayload, std::string("Apple native ") + name + " is unavailable");
|
|
148
|
+
}
|
|
149
|
+
return utf8;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
std::string errorMessage(NSError* error) {
|
|
153
|
+
if (error == nil) return "Apple native operation failed";
|
|
154
|
+
const auto description = error.localizedDescription;
|
|
155
|
+
return description == nil ? "Apple native operation failed" : nsString(description, "error message");
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
void logNativeFailure(const char* context, const std::exception& error) {
|
|
159
|
+
NSLog(@"[UnifiedBleProtocolAppleExecution] %s: %s", context, error.what());
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
} // namespace
|
|
163
|
+
|
|
164
|
+
@class OwnedCoreBluetoothProtocolRadio;
|
|
165
|
+
|
|
166
|
+
namespace unified_ble::apple_protocol {
|
|
167
|
+
|
|
168
|
+
class AppleNativeProtocolExecution::State final : public std::enable_shared_from_this<State> {
|
|
169
|
+
public:
|
|
170
|
+
State(std::shared_ptr<protocol::NativeProtocolControlRuntime> runtimeValue, void* radioValue)
|
|
171
|
+
: runtime(std::move(runtimeValue)), radio(radioValue) {}
|
|
172
|
+
|
|
173
|
+
std::shared_ptr<protocol::NativeProtocolControlRuntime> runtime;
|
|
174
|
+
void* radio;
|
|
175
|
+
std::shared_ptr<facebook::react::CallInvoker> callInvoker;
|
|
176
|
+
std::unique_ptr<jsi::Function> eventSink;
|
|
177
|
+
std::vector<std::vector<std::uint8_t>> recordsAwaitingSink;
|
|
178
|
+
std::atomic<bool> closed{false};
|
|
179
|
+
std::atomic<std::uint64_t> nextIngressOrdinal{1U};
|
|
180
|
+
std::mutex mutex;
|
|
181
|
+
bool restorationAppended = false;
|
|
182
|
+
std::unordered_map<std::string, protocol::ProtocolRecord> connections;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
namespace {
|
|
186
|
+
|
|
187
|
+
OwnedCoreBluetoothProtocolRadio* radioFor(const std::shared_ptr<AppleNativeProtocolExecution::State>& state) {
|
|
188
|
+
return (__bridge OwnedCoreBluetoothProtocolRadio*)state->radio;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
bool scheduleRecord(const std::shared_ptr<AppleNativeProtocolExecution::State>& state, std::vector<std::uint8_t> bytes) {
|
|
192
|
+
std::shared_ptr<facebook::react::CallInvoker> invoker;
|
|
193
|
+
{
|
|
194
|
+
std::scoped_lock lock(state->mutex);
|
|
195
|
+
if (state->closed.load(std::memory_order_acquire)) return false;
|
|
196
|
+
if (!state->eventSink) {
|
|
197
|
+
state->recordsAwaitingSink.push_back(std::move(bytes));
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
invoker = state->callInvoker;
|
|
201
|
+
}
|
|
202
|
+
if (!invoker) return false;
|
|
203
|
+
invoker->invokeAsync([state, bytes = std::move(bytes)](jsi::Runtime& runtime) {
|
|
204
|
+
if (state->closed.load(std::memory_order_acquire) || !state->eventSink) return;
|
|
205
|
+
jsi::Uint8Array output(runtime, bytes.size());
|
|
206
|
+
const auto buffer = output.buffer(runtime);
|
|
207
|
+
auto* destination = buffer.data(runtime);
|
|
208
|
+
if (!bytes.empty() && destination == nullptr) {
|
|
209
|
+
throw jsi::JSError(runtime, "Apple native protocol could not allocate event bytes");
|
|
210
|
+
}
|
|
211
|
+
if (!bytes.empty()) {
|
|
212
|
+
std::memcpy(destination, bytes.data(), bytes.size());
|
|
213
|
+
}
|
|
214
|
+
state->eventSink->call(runtime, output);
|
|
215
|
+
});
|
|
216
|
+
return true;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
bool deliverResult(
|
|
220
|
+
const std::shared_ptr<AppleNativeProtocolExecution::State>& state,
|
|
221
|
+
const protocol::ProtocolRecord& result) {
|
|
222
|
+
if (state->closed.load(std::memory_order_acquire) || !state->runtime->settleResult(result)) return false;
|
|
223
|
+
return scheduleRecord(state, protocol::NativeProtocolV1Codec{}.encode(result));
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
bool deliverEvent(
|
|
227
|
+
const std::shared_ptr<AppleNativeProtocolExecution::State>& state,
|
|
228
|
+
const protocol::ProtocolRecord& event) {
|
|
229
|
+
if (state->closed.load(std::memory_order_acquire)) return false;
|
|
230
|
+
state->runtime->validateEvent(event);
|
|
231
|
+
return scheduleRecord(state, protocol::NativeProtocolV1Codec{}.encode(event));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
protocol::ProtocolRecord failureResult(
|
|
235
|
+
const protocol::ProtocolRecord& command,
|
|
236
|
+
const std::string& code,
|
|
237
|
+
const std::string& message,
|
|
238
|
+
NSError* error) {
|
|
239
|
+
std::vector<protocol::ProtocolField> errorFields{
|
|
240
|
+
field(1U, code),
|
|
241
|
+
field(2U, std::string("corebluetooth")),
|
|
242
|
+
field(3U, requiredString(command, 3U)),
|
|
243
|
+
field(4U, std::string("notRetryable")),
|
|
244
|
+
field(7U, message),
|
|
245
|
+
};
|
|
246
|
+
if (error != nil) {
|
|
247
|
+
errorFields.push_back(field(9U, nsString(error.domain, "error domain")));
|
|
248
|
+
errorFields.push_back(field(10U, static_cast<std::int64_t>(error.code)));
|
|
249
|
+
}
|
|
250
|
+
const auto failure = protocol::ProtocolRecord{.kind = protocol::RecordKind::error, .fields = std::move(errorFields)};
|
|
251
|
+
return {
|
|
252
|
+
.kind = protocol::RecordKind::result,
|
|
253
|
+
.fields = {
|
|
254
|
+
field(1U, std::uint64_t{1U}),
|
|
255
|
+
field(2U, resultKindFor(requiredString(command, 3U))),
|
|
256
|
+
field(3U, reference(terminal(command, "failed", code))),
|
|
257
|
+
field(10U, reference(failure)),
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
void fail(
|
|
263
|
+
const std::shared_ptr<AppleNativeProtocolExecution::State>& state,
|
|
264
|
+
const protocol::ProtocolRecord& command,
|
|
265
|
+
const std::string& code,
|
|
266
|
+
NSError* error) {
|
|
267
|
+
try {
|
|
268
|
+
static_cast<void>(deliverResult(state, failureResult(command, code, errorMessage(error), error)));
|
|
269
|
+
} catch (const std::exception& error) {
|
|
270
|
+
logNativeFailure("terminal failure delivery", error);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
bool success(
|
|
275
|
+
const std::shared_ptr<AppleNativeProtocolExecution::State>& state,
|
|
276
|
+
const protocol::ProtocolRecord& command,
|
|
277
|
+
const std::vector<protocol::ProtocolField>& additions = {}) {
|
|
278
|
+
std::vector<protocol::ProtocolField> fields{
|
|
279
|
+
field(1U, std::uint64_t{1U}),
|
|
280
|
+
field(2U, resultKindFor(requiredString(command, 3U))),
|
|
281
|
+
field(3U, reference(terminal(command, "succeeded"))),
|
|
282
|
+
};
|
|
283
|
+
const auto kind = requiredString(command, 3U);
|
|
284
|
+
if (kind == "connect") fields.push_back(field(11U, reference(requiredRecord(command, 10U))));
|
|
285
|
+
if (kind == "subscribe" || kind == "unsubscribe") {
|
|
286
|
+
fields.push_back(field(5U, reference(requiredRecord(command, 4U))));
|
|
287
|
+
fields.push_back(field(7U, requiredString(command, 7U)));
|
|
288
|
+
}
|
|
289
|
+
fields.insert(fields.end(), additions.begin(), additions.end());
|
|
290
|
+
if (!deliverResult(state, {.kind = protocol::RecordKind::result, .fields = std::move(fields)})) return false;
|
|
291
|
+
if (kind == "connect") {
|
|
292
|
+
std::scoped_lock lock(state->mutex);
|
|
293
|
+
state->connections.insert_or_assign(requiredString(requiredRecord(command, 10U), 2U), requiredRecord(command, 10U));
|
|
294
|
+
}
|
|
295
|
+
if (kind == "disconnect") {
|
|
296
|
+
std::scoped_lock lock(state->mutex);
|
|
297
|
+
state->connections.erase(requiredString(requiredRecord(command, 10U), 2U));
|
|
298
|
+
}
|
|
299
|
+
return true;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
struct Endpoint {
|
|
303
|
+
std::string peer;
|
|
304
|
+
std::string serviceUuid;
|
|
305
|
+
NSInteger serviceOccurrence;
|
|
306
|
+
std::string characteristicUuid;
|
|
307
|
+
NSInteger characteristicOccurrence;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
Endpoint endpointFor(const protocol::ProtocolRecord& path) {
|
|
311
|
+
const auto& service = requiredRecord(path, 1U);
|
|
312
|
+
const auto& database = requiredRecord(service, 1U);
|
|
313
|
+
const auto& connection = requiredRecord(database, 1U);
|
|
314
|
+
const auto serviceOccurrence = requiredString(service, 3U);
|
|
315
|
+
const auto characteristicOccurrence = requiredString(path, 3U);
|
|
316
|
+
try {
|
|
317
|
+
return {
|
|
318
|
+
.peer = requiredString(connection, 2U),
|
|
319
|
+
.serviceUuid = requiredString(service, 2U),
|
|
320
|
+
.serviceOccurrence = static_cast<NSInteger>(std::stoll(serviceOccurrence)),
|
|
321
|
+
.characteristicUuid = requiredString(path, 2U),
|
|
322
|
+
.characteristicOccurrence = static_cast<NSInteger>(std::stoll(characteristicOccurrence)),
|
|
323
|
+
};
|
|
324
|
+
} catch (const std::exception&) {
|
|
325
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::invalidPath, "Apple native characteristic occurrence is invalid");
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
void dispatchCommand(
|
|
330
|
+
const std::shared_ptr<AppleNativeProtocolExecution::State>& state,
|
|
331
|
+
const protocol::ProtocolRecord& command) {
|
|
332
|
+
auto* radio = radioFor(state);
|
|
333
|
+
if (radio == nil) {
|
|
334
|
+
fail(state, command, "radioUnavailable", nil);
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const auto kind = requiredString(command, 3U);
|
|
338
|
+
const auto nonce = requiredString(requiredRecord(command, 2U), 3U);
|
|
339
|
+
if (kind == "scanStart") {
|
|
340
|
+
const auto& options = requiredRecord(command, 12U);
|
|
341
|
+
const auto& values = requiredStringList(options, 1U);
|
|
342
|
+
NSMutableArray<NSString*>* uuids = [NSMutableArray arrayWithCapacity:values.size()];
|
|
343
|
+
for (const auto& value : values) [uuids addObject:[NSString stringWithUTF8String:value.c_str()]];
|
|
344
|
+
[radio startScanWithServiceUUIDs:uuids allowDuplicates:requiredBoolean(options, 2U) operationIdentifier:[NSString stringWithUTF8String:nonce.c_str()] completion:^(NSError* error) {
|
|
345
|
+
if (error == nil) static_cast<void>(success(state, command));
|
|
346
|
+
else fail(state, command, "scanStartFailed", error);
|
|
347
|
+
}];
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
if (kind == "scanStop") {
|
|
351
|
+
[radio stopScanWithOperationIdentifier:[NSString stringWithUTF8String:nonce.c_str()] completion:^(NSError* error) {
|
|
352
|
+
if (error == nil) static_cast<void>(success(state, command));
|
|
353
|
+
else fail(state, command, "scanStopFailed", error);
|
|
354
|
+
}];
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
if (kind == "connect" || kind == "disconnect") {
|
|
358
|
+
const auto peer = requiredString(requiredRecord(command, 10U), 2U);
|
|
359
|
+
const auto identifier = [NSString stringWithUTF8String:peer.c_str()];
|
|
360
|
+
const auto operation = [NSString stringWithUTF8String:nonce.c_str()];
|
|
361
|
+
void (^completion)(NSError*) = ^(NSError* error) {
|
|
362
|
+
if (error == nil) static_cast<void>(success(state, command));
|
|
363
|
+
else fail(state, command, kind == "connect" ? "connectFailed" : "disconnectFailed", error);
|
|
364
|
+
};
|
|
365
|
+
if (kind == "connect") [radio connectWithPeerIdentifier:identifier operationIdentifier:operation completion:completion];
|
|
366
|
+
else [radio disconnectWithPeerIdentifier:identifier operationIdentifier:operation completion:completion];
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
if (kind == "discover") {
|
|
370
|
+
const auto peer = requiredString(requiredRecord(command, 10U), 2U);
|
|
371
|
+
const auto database = requiredRecord(command, 11U);
|
|
372
|
+
[radio discoverWithPeerIdentifier:[NSString stringWithUTF8String:peer.c_str()] operationIdentifier:[NSString stringWithUTF8String:nonce.c_str()] completion:^(NSDictionary* snapshot, NSError* error) {
|
|
373
|
+
if (error != nil || snapshot == nil) {
|
|
374
|
+
fail(state, command, "discoverFailed", error);
|
|
375
|
+
return;
|
|
376
|
+
}
|
|
377
|
+
try {
|
|
378
|
+
std::vector<protocol::ProtocolRecordReference> services;
|
|
379
|
+
std::vector<protocol::ProtocolRecordReference> characteristics;
|
|
380
|
+
NSArray* nativeServices = snapshot[@"services"];
|
|
381
|
+
for (NSDictionary* service in nativeServices) {
|
|
382
|
+
const auto servicePath = protocol::ProtocolRecord{.kind = protocol::RecordKind::servicePath, .fields = {
|
|
383
|
+
field(1U, reference(database)), field(2U, nsString(service[@"uuid"], "service UUID")),
|
|
384
|
+
field(3U, std::to_string([service[@"occurrence"] integerValue]))}};
|
|
385
|
+
services.push_back(reference(servicePath));
|
|
386
|
+
for (NSDictionary* characteristic in service[@"characteristics"]) {
|
|
387
|
+
const auto characteristicPath = protocol::ProtocolRecord{.kind = protocol::RecordKind::characteristicPath, .fields = {
|
|
388
|
+
field(1U, reference(servicePath)), field(2U, nsString(characteristic[@"uuid"], "characteristic UUID")),
|
|
389
|
+
field(3U, std::to_string([characteristic[@"occurrence"] integerValue]))}};
|
|
390
|
+
const auto characteristicSnapshot = protocol::ProtocolRecord{.kind = protocol::RecordKind::characteristicSnapshot, .fields = {
|
|
391
|
+
field(1U, reference(characteristicPath)), field(2U, [characteristic[@"readable"] boolValue]),
|
|
392
|
+
field(3U, [characteristic[@"writableWithResponse"] boolValue]),
|
|
393
|
+
field(4U, [characteristic[@"writableWithoutResponse"] boolValue]),
|
|
394
|
+
field(5U, [characteristic[@"notifiable"] boolValue])}};
|
|
395
|
+
characteristics.push_back(reference(characteristicSnapshot));
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
const auto databaseSnapshot = protocol::ProtocolRecord{.kind = protocol::RecordKind::databaseSnapshot, .fields = {
|
|
399
|
+
field(1U, reference(database)), field(2U, services), field(3U, characteristics), field(4U, protocol::ProtocolRecordList{})}};
|
|
400
|
+
success(state, command, {field(4U, reference(database)), field(12U, reference(databaseSnapshot))});
|
|
401
|
+
} catch (const std::exception& error) {
|
|
402
|
+
logNativeFailure("discovery snapshot serialization", error);
|
|
403
|
+
fail(state, command, "discoverSnapshotFailed", nil);
|
|
404
|
+
}
|
|
405
|
+
}];
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
if (kind == "readRssi") {
|
|
409
|
+
const auto peer = requiredString(requiredRecord(command, 10U), 2U);
|
|
410
|
+
[radio readRssiWithPeerIdentifier:[NSString stringWithUTF8String:peer.c_str()] operationIdentifier:[NSString stringWithUTF8String:nonce.c_str()] completion:^(NSNumber* value, NSError* error) {
|
|
411
|
+
if (error != nil || value == nil) {
|
|
412
|
+
fail(state, command, "readRssiFailed", error);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
static_cast<void>(success(state, command, {field(13U, static_cast<std::int64_t>(value.longLongValue))}));
|
|
416
|
+
}];
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
if (kind == "requestMtu") {
|
|
420
|
+
fail(state, command, "requestMtuUnsupported", nil);
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const auto path = requiredRecord(command, 4U);
|
|
424
|
+
const auto endpoint = endpointFor(path);
|
|
425
|
+
const auto peer = [NSString stringWithUTF8String:endpoint.peer.c_str()];
|
|
426
|
+
const auto service = [NSString stringWithUTF8String:endpoint.serviceUuid.c_str()];
|
|
427
|
+
const auto characteristic = [NSString stringWithUTF8String:endpoint.characteristicUuid.c_str()];
|
|
428
|
+
const auto operation = [NSString stringWithUTF8String:nonce.c_str()];
|
|
429
|
+
if (kind == "read") {
|
|
430
|
+
[radio readWithPeerIdentifier:peer serviceUUID:service serviceOccurrence:endpoint.serviceOccurrence characteristicUUID:characteristic characteristicOccurrence:endpoint.characteristicOccurrence operationIdentifier:operation completion:^(NSData* value, NSError* error) {
|
|
431
|
+
if (error != nil || value == nil) {
|
|
432
|
+
fail(state, command, "readFailed", error);
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
std::optional<protocol::OwnedBinaryReference> output;
|
|
436
|
+
try {
|
|
437
|
+
output = state->runtime->retainNativeBytes("apple-read:" + nonce, bytesFromData(value));
|
|
438
|
+
if (!success(state, command, {field(5U, reference(path)), field(6U, reference(binaryReferenceRecord(*output)))})) {
|
|
439
|
+
releaseRetainedBinary(state->runtime, *output, "read binary release after non-delivery");
|
|
440
|
+
}
|
|
441
|
+
} catch (const std::exception& error) {
|
|
442
|
+
logNativeFailure("read binary delivery", error);
|
|
443
|
+
if (output) releaseRetainedBinary(state->runtime, *output, "read binary release after delivery failure");
|
|
444
|
+
fail(state, command, "readBinaryDeliveryFailed", nil);
|
|
445
|
+
}
|
|
446
|
+
}];
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
if (kind == "write") {
|
|
450
|
+
const auto input = state->runtime->consumeCommandBinary(command);
|
|
451
|
+
const auto mode = requiredString(command, 13U);
|
|
452
|
+
if (mode != "withResponse" && mode != "withoutResponse") {
|
|
453
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::malformedRecord, "Apple native write mode is invalid");
|
|
454
|
+
}
|
|
455
|
+
[radio writeWithPeerIdentifier:peer serviceUUID:service serviceOccurrence:endpoint.serviceOccurrence characteristicUUID:characteristic characteristicOccurrence:endpoint.characteristicOccurrence value:dataFromBytes(input) withResponse:mode == "withResponse" operationIdentifier:operation completion:^(NSError* error) {
|
|
456
|
+
if (error == nil) static_cast<void>(success(state, command));
|
|
457
|
+
else fail(state, command, "writeFailed", error);
|
|
458
|
+
}];
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
if (kind == "subscribe" || kind == "unsubscribe") {
|
|
462
|
+
const auto subscription = requiredString(command, 7U);
|
|
463
|
+
const auto subscriptionIdentifier = [NSString stringWithUTF8String:subscription.c_str()];
|
|
464
|
+
void (^completion)(NSError*) = ^(NSError* error) {
|
|
465
|
+
if (error == nil) static_cast<void>(success(state, command));
|
|
466
|
+
else fail(state, command, "subscriptionFailed", error);
|
|
467
|
+
};
|
|
468
|
+
if (kind == "subscribe") {
|
|
469
|
+
[radio subscribeWithPeerIdentifier:peer serviceUUID:service serviceOccurrence:endpoint.serviceOccurrence characteristicUUID:characteristic characteristicOccurrence:endpoint.characteristicOccurrence subscriptionIdentifier:subscriptionIdentifier operationIdentifier:operation completion:completion];
|
|
470
|
+
} else {
|
|
471
|
+
[radio unsubscribeWithPeerIdentifier:peer serviceUUID:service serviceOccurrence:endpoint.serviceOccurrence characteristicUUID:characteristic characteristicOccurrence:endpoint.characteristicOccurrence subscriptionIdentifier:subscriptionIdentifier operationIdentifier:operation completion:completion];
|
|
472
|
+
}
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
if (kind == "destroy") {
|
|
476
|
+
[radio destroyWithCompletion:^(NSError* error) {
|
|
477
|
+
if (error == nil) static_cast<void>(success(state, command));
|
|
478
|
+
else fail(state, command, "destroyFailed", error);
|
|
479
|
+
}];
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
fail(state, command, "unsupportedCommand", nil);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
class BinaryRuntime final : public jsi::HostObject {
|
|
486
|
+
public:
|
|
487
|
+
explicit BinaryRuntime(std::shared_ptr<AppleNativeProtocolExecution::State> state) : state_(std::move(state)) {}
|
|
488
|
+
|
|
489
|
+
jsi::Value get(jsi::Runtime& runtime, const jsi::PropNameID& name) override {
|
|
490
|
+
const auto property = name.utf8(runtime);
|
|
491
|
+
if (property == "retain") return retainFunction(runtime, name);
|
|
492
|
+
if (property == "copy") return copyFunction(runtime, name);
|
|
493
|
+
if (property == "release") return releaseFunction(runtime, name);
|
|
494
|
+
if (property == "submit") return submitFunction(runtime, name);
|
|
495
|
+
if (property == "setEventSink") return sinkFunction(runtime, name);
|
|
496
|
+
if (property == "retainedByteCount") return countFunction(runtime, name, true);
|
|
497
|
+
if (property == "retainedPayloadCount") return countFunction(runtime, name, false);
|
|
498
|
+
return jsi::Value::undefined();
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
private:
|
|
502
|
+
std::shared_ptr<AppleNativeProtocolExecution::State> state_;
|
|
503
|
+
|
|
504
|
+
std::shared_ptr<protocol::NativeProtocolControlRuntime> runtimeFor(jsi::Runtime& runtime) const {
|
|
505
|
+
if (state_->closed.load(std::memory_order_acquire) || !state_->runtime->open()) {
|
|
506
|
+
throw jsi::JSError(runtime, "Apple Native Protocol v1 runtime is closed");
|
|
507
|
+
}
|
|
508
|
+
return state_->runtime;
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
static std::string stringProperty(jsi::Runtime& runtime, const jsi::Object& object, const char* name) {
|
|
512
|
+
const auto value = object.getProperty(runtime, name);
|
|
513
|
+
if (!value.isString()) throw jsi::JSError(runtime, std::string("Native Protocol v1 requires ") + name);
|
|
514
|
+
const auto result = value.asString(runtime).utf8(runtime);
|
|
515
|
+
if (result.empty()) throw jsi::JSError(runtime, std::string("Native Protocol v1 rejects empty ") + name);
|
|
516
|
+
return result;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
static std::size_t sizeProperty(jsi::Runtime& runtime, const jsi::Object& object, const char* name) {
|
|
520
|
+
const auto value = object.getProperty(runtime, name);
|
|
521
|
+
if (!value.isNumber() || value.asNumber() < 0.0 || std::floor(value.asNumber()) != value.asNumber()) {
|
|
522
|
+
throw jsi::JSError(runtime, std::string("Native Protocol v1 requires valid ") + name);
|
|
523
|
+
}
|
|
524
|
+
return static_cast<std::size_t>(value.asNumber());
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
static protocol::OwnedBinaryReference binaryReference(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
528
|
+
if (!value.isObject() || value.asObject(runtime).isArray(runtime)) throw jsi::JSError(runtime, "Native Protocol v1 requires a binary reference");
|
|
529
|
+
const auto object = value.asObject(runtime);
|
|
530
|
+
return {.ownerToken = stringProperty(runtime, object, "ownerToken"), .operationCorrelation = stringProperty(runtime, object, "operationCorrelation"), .byteOffset = sizeProperty(runtime, object, "byteOffset"), .byteLength = sizeProperty(runtime, object, "byteLength"), .ownership = stringProperty(runtime, object, "ownership")};
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
static std::vector<std::uint8_t> commandBytes(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
534
|
+
if (!value.isObject() || !value.asObject(runtime).isUint8Array(runtime)) throw jsi::JSError(runtime, "Native Protocol v1 submit requires Uint8Array");
|
|
535
|
+
auto array = value.asObject(runtime).asUint8Array(runtime);
|
|
536
|
+
const auto buffer = array.buffer(runtime);
|
|
537
|
+
if (buffer.detached(runtime)) throw jsi::JSError(runtime, "Native Protocol v1 rejects detached command bytes");
|
|
538
|
+
const auto offset = array.byteOffset(runtime);
|
|
539
|
+
const auto length = array.byteLength(runtime);
|
|
540
|
+
if (offset > buffer.size(runtime) || length > buffer.size(runtime) - offset || length > protocol::kMaximumControlRecordBytes) {
|
|
541
|
+
throw jsi::JSError(runtime, "Native Protocol v1 command range is invalid");
|
|
542
|
+
}
|
|
543
|
+
const auto* source = buffer.data(runtime);
|
|
544
|
+
if (length != 0U && source == nullptr) throw jsi::JSError(runtime, "Native Protocol v1 command storage is unavailable");
|
|
545
|
+
return length == 0U ? std::vector<std::uint8_t>{} : std::vector<std::uint8_t>{source + offset, source + offset + length};
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
static jsi::Object referenceObject(jsi::Runtime& runtime, const protocol::OwnedBinaryReference& value) {
|
|
549
|
+
jsi::Object result(runtime);
|
|
550
|
+
result.setProperty(runtime, "ownerToken", jsi::String::createFromUtf8(runtime, value.ownerToken));
|
|
551
|
+
result.setProperty(runtime, "operationCorrelation", jsi::String::createFromUtf8(runtime, value.operationCorrelation));
|
|
552
|
+
result.setProperty(runtime, "byteOffset", static_cast<double>(value.byteOffset));
|
|
553
|
+
result.setProperty(runtime, "byteLength", static_cast<double>(value.byteLength));
|
|
554
|
+
result.setProperty(runtime, "ownership", jsi::String::createFromUtf8(runtime, value.ownership));
|
|
555
|
+
return result;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
jsi::Value retainFunction(jsi::Runtime& runtime, const jsi::PropNameID& name) {
|
|
559
|
+
return jsi::Function::createFromHostFunction(runtime, name, 2U, [self = state_](jsi::Runtime& inner, const jsi::Value&, const jsi::Value* arguments, std::size_t count) {
|
|
560
|
+
if (count != 2U || !arguments[0].isString()) throw jsi::JSError(inner, "Native Protocol v1 retain requires correlation and Uint8Array");
|
|
561
|
+
if (self->closed.load(std::memory_order_acquire)) throw jsi::JSError(inner, "Native Protocol v1 runtime is closed");
|
|
562
|
+
const auto retained = self->runtime->retainUint8Array(inner, arguments[0].asString(inner).utf8(inner), arguments[1]);
|
|
563
|
+
return jsi::Value(inner, referenceObject(inner, retained));
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
jsi::Value copyFunction(jsi::Runtime& runtime, const jsi::PropNameID& name) {
|
|
568
|
+
return jsi::Function::createFromHostFunction(runtime, name, 1U, [self = state_](jsi::Runtime& inner, const jsi::Value&, const jsi::Value* arguments, std::size_t count) {
|
|
569
|
+
if (count != 1U) throw jsi::JSError(inner, "Native Protocol v1 copy requires a binary reference");
|
|
570
|
+
if (self->closed.load(std::memory_order_acquire)) throw jsi::JSError(inner, "Native Protocol v1 runtime is closed");
|
|
571
|
+
return self->runtime->copyBinary(inner, binaryReference(inner, arguments[0]));
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
jsi::Value releaseFunction(jsi::Runtime& runtime, const jsi::PropNameID& name) {
|
|
576
|
+
return jsi::Function::createFromHostFunction(runtime, name, 1U, [self = state_](jsi::Runtime& inner, const jsi::Value&, const jsi::Value* arguments, std::size_t count) {
|
|
577
|
+
if (count != 1U) throw jsi::JSError(inner, "Native Protocol v1 release requires a binary reference");
|
|
578
|
+
if (self->closed.load(std::memory_order_acquire)) throw jsi::JSError(inner, "Native Protocol v1 runtime is closed");
|
|
579
|
+
return jsi::Value(self->runtime->releaseBinary(binaryReference(inner, arguments[0])));
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
jsi::Value submitFunction(jsi::Runtime& runtime, const jsi::PropNameID& name) {
|
|
584
|
+
return jsi::Function::createFromHostFunction(runtime, name, 1U, [self = state_](jsi::Runtime& inner, const jsi::Value&, const jsi::Value* arguments, std::size_t count) {
|
|
585
|
+
if (count != 1U || self->closed.load(std::memory_order_acquire)) throw jsi::JSError(inner, "Native Protocol v1 submit is unavailable");
|
|
586
|
+
const auto command = protocol::NativeProtocolV1Codec{}.decode(commandBytes(inner, arguments[0]));
|
|
587
|
+
self->runtime->registerCommand(command, true);
|
|
588
|
+
try {
|
|
589
|
+
dispatchCommand(self, command);
|
|
590
|
+
} catch (const std::exception& error) {
|
|
591
|
+
fail(self, command, "invalidCommand", nil);
|
|
592
|
+
throw jsi::JSError(inner, error.what());
|
|
593
|
+
}
|
|
594
|
+
return jsi::Value::undefined();
|
|
595
|
+
});
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
jsi::Value sinkFunction(jsi::Runtime& runtime, const jsi::PropNameID& name) {
|
|
599
|
+
return jsi::Function::createFromHostFunction(runtime, name, 1U, [self = state_](jsi::Runtime& inner, const jsi::Value&, const jsi::Value* arguments, std::size_t count) {
|
|
600
|
+
if (count != 1U || !arguments[0].isObject() || !arguments[0].asObject(inner).isFunction(inner)) throw jsi::JSError(inner, "Native Protocol v1 setEventSink requires a function");
|
|
601
|
+
if (self->closed.load(std::memory_order_acquire)) throw jsi::JSError(inner, "Native Protocol v1 runtime is closed");
|
|
602
|
+
std::vector<std::vector<std::uint8_t>> buffered;
|
|
603
|
+
{
|
|
604
|
+
std::scoped_lock lock(self->mutex);
|
|
605
|
+
self->eventSink = std::make_unique<jsi::Function>(arguments[0].asObject(inner).asFunction(inner));
|
|
606
|
+
buffered = std::move(self->recordsAwaitingSink);
|
|
607
|
+
}
|
|
608
|
+
for (const auto& bytes : buffered) {
|
|
609
|
+
jsi::Uint8Array output(inner, bytes.size());
|
|
610
|
+
const auto buffer = output.buffer(inner);
|
|
611
|
+
auto* destination = buffer.data(inner);
|
|
612
|
+
if (!bytes.empty() && destination == nullptr) {
|
|
613
|
+
throw jsi::JSError(inner, "Apple native protocol could not allocate buffered event bytes");
|
|
614
|
+
}
|
|
615
|
+
if (!bytes.empty()) std::memcpy(destination, bytes.data(), bytes.size());
|
|
616
|
+
self->eventSink->call(inner, output);
|
|
617
|
+
}
|
|
618
|
+
return jsi::Value::undefined();
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
jsi::Value countFunction(jsi::Runtime& runtime, const jsi::PropNameID& name, bool bytes) {
|
|
623
|
+
return jsi::Function::createFromHostFunction(runtime, name, 0U, [self = state_, bytes](jsi::Runtime& inner, const jsi::Value&, const jsi::Value*, std::size_t count) {
|
|
624
|
+
if (count != 0U || self->closed.load(std::memory_order_acquire)) throw jsi::JSError(inner, "Native Protocol v1 retained counter is unavailable");
|
|
625
|
+
return jsi::Value(static_cast<double>(bytes ? self->runtime->retainedBinaryBytes() : self->runtime->retainedBinaryPayloads()));
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
} // namespace
|
|
631
|
+
|
|
632
|
+
AppleNativeProtocolExecution::AppleNativeProtocolExecution(
|
|
633
|
+
std::shared_ptr<protocol::NativeProtocolControlRuntime> runtime,
|
|
634
|
+
void* radio)
|
|
635
|
+
: state_(std::make_shared<State>(std::move(runtime), radio)) {}
|
|
636
|
+
|
|
637
|
+
AppleNativeProtocolExecution::~AppleNativeProtocolExecution() {
|
|
638
|
+
close();
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
void AppleNativeProtocolExecution::install(
|
|
642
|
+
jsi::Runtime& runtime,
|
|
643
|
+
const std::shared_ptr<facebook::react::CallInvoker>& callInvoker) {
|
|
644
|
+
if (!callInvoker || state_->closed.load(std::memory_order_acquire)) {
|
|
645
|
+
throw std::invalid_argument("Apple Native Protocol v1 cannot install without an active CallInvoker");
|
|
646
|
+
}
|
|
647
|
+
if (!runtime.global().getProperty(runtime, kRuntimeName).isUndefined()) {
|
|
648
|
+
throw jsi::JSError(runtime, "A Native Protocol v1 runtime is already installed");
|
|
649
|
+
}
|
|
650
|
+
state_->callInvoker = callInvoker;
|
|
651
|
+
runtime.global().setProperty(runtime, kRuntimeName, jsi::Object::createFromHostObject(runtime, std::make_shared<BinaryRuntime>(state_)));
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
void AppleNativeProtocolExecution::cancel(const protocol::NativeOperationIdentity& operation) {
|
|
655
|
+
const auto state = state_;
|
|
656
|
+
if (state->closed.load(std::memory_order_acquire)) return;
|
|
657
|
+
const auto command = state->runtime->commandFor(operation.dispatchEpoch, operation.nonce);
|
|
658
|
+
if (!command) return;
|
|
659
|
+
[radioFor(state) cancelOperation:[NSString stringWithUTF8String:operation.nonce.c_str()]];
|
|
660
|
+
const auto result = failureResult(*command, "cancelled", "Apple native operation was cancelled", nil);
|
|
661
|
+
deliverResult(state, result);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
void AppleNativeProtocolExecution::appendRestorationRecords(const protocol::NativeRestorationJournalAuthority& authority) {
|
|
665
|
+
std::scoped_lock lock(state_->mutex);
|
|
666
|
+
if (state_->restorationAppended) return;
|
|
667
|
+
NSArray<NSString*>* peers = [radioFor(state_) restorationPeerIdentifiers];
|
|
668
|
+
std::uint64_t ordinal = 1U;
|
|
669
|
+
for (NSString* peer in peers) {
|
|
670
|
+
const auto record = protocol::ProtocolRecord{.kind = protocol::RecordKind::restorationRecord, .fields = {
|
|
671
|
+
field(1U, std::uint64_t{1U}), field(2U, authority.namespaceValue), field(3U, reference(attachmentRecord(authority.attachment))),
|
|
672
|
+
field(4U, ordinal), field(5U, authority.adoptionEpoch), field(6U, std::string("connection")), field(7U, nsString(peer, "restored peer"))}};
|
|
673
|
+
state_->runtime->appendRestorationRecord(authority, record);
|
|
674
|
+
ordinal += 1U;
|
|
675
|
+
}
|
|
676
|
+
state_->restorationAppended = true;
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
void AppleNativeProtocolExecution::receiveAdapterState(void* snapshot) {
|
|
680
|
+
if (state_->closed.load(std::memory_order_acquire)) return;
|
|
681
|
+
NSDictionary* value = (__bridge NSDictionary*)snapshot;
|
|
682
|
+
if (![value isKindOfClass:[NSDictionary class]]) return;
|
|
683
|
+
@try {
|
|
684
|
+
const auto ordinal = state_->nextIngressOrdinal.fetch_add(1U);
|
|
685
|
+
const auto availability = nsString(value[@"availability"], "adapter availability");
|
|
686
|
+
const auto authorization = nsString(value[@"authorization"], "adapter authorization");
|
|
687
|
+
const auto power = nsString(value[@"power"], "adapter power");
|
|
688
|
+
std::vector<protocol::ProtocolField> snapshotFields{
|
|
689
|
+
field(1U, availability), field(2U, authorization), field(3U, power)};
|
|
690
|
+
if ([value[@"safeReason"] isKindOfClass:[NSString class]]) {
|
|
691
|
+
snapshotFields.push_back(field(4U, nsString(value[@"safeReason"], "adapter reason")));
|
|
692
|
+
}
|
|
693
|
+
const auto stateSnapshot = protocol::ProtocolRecord{
|
|
694
|
+
.kind = protocol::RecordKind::adapterStateSnapshot, .fields = std::move(snapshotFields)};
|
|
695
|
+
const auto event = protocol::ProtocolRecord{
|
|
696
|
+
.kind = protocol::RecordKind::event,
|
|
697
|
+
.fields = {
|
|
698
|
+
field(1U, std::uint64_t{1U}),
|
|
699
|
+
field(2U, std::string("apple-adapter-state:") + std::to_string(ordinal)),
|
|
700
|
+
field(3U, std::string("adapterState")),
|
|
701
|
+
field(4U, reference(attachmentRecord(state_->runtime->attachmentIdentity()))),
|
|
702
|
+
field(5U, ordinal), field(6U, monotonicMilliseconds()), field(15U, reference(stateSnapshot))}};
|
|
703
|
+
static_cast<void>(deliverEvent(state_, event));
|
|
704
|
+
} @catch (NSException* exception) {
|
|
705
|
+
NSLog(@"[UnifiedBleProtocolAppleExecution] adapter-state serialization failed: %@", exception.reason);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
void AppleNativeProtocolExecution::receiveAdvertisement(void* advertisement) {
|
|
710
|
+
if (state_->closed.load(std::memory_order_acquire)) return;
|
|
711
|
+
NSDictionary* value = (__bridge NSDictionary*)advertisement;
|
|
712
|
+
if (![value isKindOfClass:[NSDictionary class]]) return;
|
|
713
|
+
std::vector<protocol::OwnedBinaryReference> retained;
|
|
714
|
+
try {
|
|
715
|
+
const auto ordinal = state_->nextIngressOrdinal.fetch_add(1U);
|
|
716
|
+
const auto peer = nsString(value[@"peerIdentifier"], "advertisement peer");
|
|
717
|
+
const auto observedAt = [value[@"observedAt"] unsignedLongLongValue];
|
|
718
|
+
std::vector<protocol::ProtocolField> advertisementFields{
|
|
719
|
+
field(1U, peer), field(2U, static_cast<std::uint64_t>(observedAt)), field(3U, ordinal),
|
|
720
|
+
field(4U, std::string("corebluetooth")), field(17U, protocol::ProtocolStringList{"corebluetooth-advertisement"})};
|
|
721
|
+
const auto appendString = [&](NSString* key, std::uint16_t fieldId) {
|
|
722
|
+
if ([value[key] isKindOfClass:[NSString class]]) {
|
|
723
|
+
advertisementFields.push_back(field(fieldId, nsString(value[key], "advertisement string")));
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
const auto appendNumber = [&](NSString* key, std::uint16_t fieldId) {
|
|
727
|
+
if ([value[key] isKindOfClass:[NSNumber class]]) {
|
|
728
|
+
advertisementFields.push_back(field(fieldId, static_cast<std::int64_t>([value[key] longLongValue])));
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
const auto appendStrings = [&](NSString* key, std::uint16_t fieldId) {
|
|
732
|
+
if (![value[key] isKindOfClass:[NSArray class]]) return;
|
|
733
|
+
protocol::ProtocolStringList strings;
|
|
734
|
+
for (id item in value[key]) {
|
|
735
|
+
if (![item isKindOfClass:[NSString class]]) {
|
|
736
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::malformedRecord, "Apple advertisement UUID list is malformed");
|
|
737
|
+
}
|
|
738
|
+
strings.push_back(nsString(item, "advertisement UUID"));
|
|
739
|
+
}
|
|
740
|
+
advertisementFields.push_back(field(fieldId, std::move(strings)));
|
|
741
|
+
};
|
|
742
|
+
appendString(@"localName", 5U);
|
|
743
|
+
appendNumber(@"rssi", 6U);
|
|
744
|
+
appendNumber(@"txPower", 7U);
|
|
745
|
+
if ([value[@"connectable"] isKindOfClass:[NSNumber class]]) {
|
|
746
|
+
advertisementFields.push_back(field(8U, [value[@"connectable"] boolValue]));
|
|
747
|
+
}
|
|
748
|
+
appendStrings(@"serviceUUIDs", 10U);
|
|
749
|
+
appendStrings(@"solicitedServiceUUIDs", 11U);
|
|
750
|
+
appendStrings(@"overflowServiceUUIDs", 12U);
|
|
751
|
+
if ([value[@"serviceData"] isKindOfClass:[NSDictionary class]]) {
|
|
752
|
+
protocol::ProtocolRecordList serviceData;
|
|
753
|
+
for (NSString* key in value[@"serviceData"]) {
|
|
754
|
+
id item = value[@"serviceData"][key];
|
|
755
|
+
if (![item isKindOfClass:[NSData class]]) {
|
|
756
|
+
throw protocol::ProtocolException(protocol::ProtocolFailure::malformedRecord, "Apple service data is malformed");
|
|
757
|
+
}
|
|
758
|
+
const auto binary = state_->runtime->retainNativeBytes(
|
|
759
|
+
"apple-advertisement-service-data:" + std::to_string(ordinal), bytesFromData(item));
|
|
760
|
+
retained.push_back(binary);
|
|
761
|
+
const auto entry = protocol::ProtocolRecord{.kind = protocol::RecordKind::serviceDataEntry, .fields = {
|
|
762
|
+
field(1U, nsString(key, "service data UUID")), field(2U, reference(binaryReferenceRecord(binary)))} };
|
|
763
|
+
serviceData.push_back(reference(entry));
|
|
764
|
+
}
|
|
765
|
+
advertisementFields.push_back(field(13U, std::move(serviceData)));
|
|
766
|
+
}
|
|
767
|
+
if ([value[@"manufacturerData"] isKindOfClass:[NSData class]] && [value[@"manufacturerData"] length] >= 2U) {
|
|
768
|
+
NSData* manufacturer = value[@"manufacturerData"];
|
|
769
|
+
const auto* source = static_cast<const std::uint8_t*>(manufacturer.bytes);
|
|
770
|
+
const auto companyIdentifier = static_cast<std::uint64_t>(source[0]) |
|
|
771
|
+
(static_cast<std::uint64_t>(source[1]) << 8U);
|
|
772
|
+
NSData* payload = [manufacturer subdataWithRange:NSMakeRange(2U, manufacturer.length - 2U)];
|
|
773
|
+
const auto binary = state_->runtime->retainNativeBytes(
|
|
774
|
+
"apple-advertisement-manufacturer-data:" + std::to_string(ordinal), bytesFromData(payload));
|
|
775
|
+
retained.push_back(binary);
|
|
776
|
+
const auto entry = protocol::ProtocolRecord{.kind = protocol::RecordKind::manufacturerDataEntry, .fields = {
|
|
777
|
+
field(1U, companyIdentifier), field(2U, reference(binaryReferenceRecord(binary)))} };
|
|
778
|
+
advertisementFields.push_back(field(14U, protocol::ProtocolRecordList{reference(entry)}));
|
|
779
|
+
}
|
|
780
|
+
const auto advertisementRecord = protocol::ProtocolRecord{
|
|
781
|
+
.kind = protocol::RecordKind::advertisement, .fields = std::move(advertisementFields)};
|
|
782
|
+
const auto event = protocol::ProtocolRecord{.kind = protocol::RecordKind::event, .fields = {
|
|
783
|
+
field(1U, std::uint64_t{1U}), field(2U, std::string("apple-advertisement:") + std::to_string(ordinal)),
|
|
784
|
+
field(3U, std::string("advertisement")), field(4U, reference(attachmentRecord(state_->runtime->attachmentIdentity()))),
|
|
785
|
+
field(5U, ordinal), field(6U, monotonicMilliseconds()), field(12U, reference(advertisementRecord))}};
|
|
786
|
+
if (!deliverEvent(state_, event)) {
|
|
787
|
+
for (const auto& binary : retained) static_cast<void>(state_->runtime->releaseBinary(binary));
|
|
788
|
+
}
|
|
789
|
+
} catch (const std::exception& error) {
|
|
790
|
+
logNativeFailure("advertisement serialization", error);
|
|
791
|
+
for (const auto& binary : retained) {
|
|
792
|
+
try {
|
|
793
|
+
static_cast<void>(state_->runtime->releaseBinary(binary));
|
|
794
|
+
} catch (const std::exception& releaseError) {
|
|
795
|
+
logNativeFailure("advertisement binary release", releaseError);
|
|
796
|
+
}
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
void AppleNativeProtocolExecution::receiveDisconnect(void* peerIdentifier, void* error) {
|
|
802
|
+
if (state_->closed.load(std::memory_order_acquire)) return;
|
|
803
|
+
NSString* peer = (__bridge NSString*)peerIdentifier;
|
|
804
|
+
NSError* nativeError = (__bridge NSError*)error;
|
|
805
|
+
if (peer == nil) return;
|
|
806
|
+
try {
|
|
807
|
+
const auto peerValue = nsString(peer, "disconnect peer");
|
|
808
|
+
std::optional<protocol::ProtocolRecord> connection;
|
|
809
|
+
{
|
|
810
|
+
std::scoped_lock lock(state_->mutex);
|
|
811
|
+
const auto found = state_->connections.find(peerValue);
|
|
812
|
+
if (found == state_->connections.end()) return;
|
|
813
|
+
connection = found->second;
|
|
814
|
+
state_->connections.erase(found);
|
|
815
|
+
}
|
|
816
|
+
const auto ordinal = state_->nextIngressOrdinal.fetch_add(1U);
|
|
817
|
+
std::vector<protocol::ProtocolField> fields{
|
|
818
|
+
field(1U, std::uint64_t{1U}), field(2U, std::string("apple-connection-lost:") + std::to_string(ordinal)),
|
|
819
|
+
field(3U, std::string("connectionLost")), field(4U, reference(attachmentRecord(state_->runtime->attachmentIdentity()))),
|
|
820
|
+
field(5U, ordinal), field(6U, monotonicMilliseconds()), field(7U, reference(*connection))};
|
|
821
|
+
if (nativeError != nil) {
|
|
822
|
+
const auto eventError = protocol::ProtocolRecord{.kind = protocol::RecordKind::error, .fields = {
|
|
823
|
+
field(1U, std::string("connectionLost")), field(2U, std::string("corebluetooth")), field(3U, std::string("connectionLost")),
|
|
824
|
+
field(4U, std::string("notRetryable")), field(7U, errorMessage(nativeError)), field(9U, nsString(nativeError.domain, "error domain")),
|
|
825
|
+
field(10U, static_cast<std::int64_t>(nativeError.code))}};
|
|
826
|
+
fields.push_back(field(14U, reference(eventError)));
|
|
827
|
+
}
|
|
828
|
+
static_cast<void>(deliverEvent(state_, {.kind = protocol::RecordKind::event, .fields = std::move(fields)}));
|
|
829
|
+
} catch (const std::exception& error) {
|
|
830
|
+
logNativeFailure("disconnect serialization", error);
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
void AppleNativeProtocolExecution::receiveNotification(void* subscriptionIdentifier, void* value) {
|
|
835
|
+
if (state_->closed.load(std::memory_order_acquire)) return;
|
|
836
|
+
NSString* subscription = (__bridge NSString*)subscriptionIdentifier;
|
|
837
|
+
NSData* bytes = (__bridge NSData*)value;
|
|
838
|
+
if (subscription == nil || bytes == nil) return;
|
|
839
|
+
std::optional<protocol::OwnedBinaryReference> output;
|
|
840
|
+
try {
|
|
841
|
+
const auto subscriptionValue = nsString(subscription, "subscription identifier");
|
|
842
|
+
auto command = state_->runtime->subscriptionCommandFor(subscriptionValue);
|
|
843
|
+
if (!command) command = state_->runtime->pendingSubscriptionCommandFor(subscriptionValue);
|
|
844
|
+
if (!command) return;
|
|
845
|
+
const auto ordinal = state_->nextIngressOrdinal.fetch_add(1U);
|
|
846
|
+
output = state_->runtime->retainNativeBytes(
|
|
847
|
+
"apple-notification:" + subscriptionValue + ":" + std::to_string(ordinal), bytesFromData(bytes));
|
|
848
|
+
const auto event = protocol::ProtocolRecord{.kind = protocol::RecordKind::event, .fields = {
|
|
849
|
+
field(1U, std::uint64_t{1U}), field(2U, std::string("apple-notification:") + std::to_string(ordinal)),
|
|
850
|
+
field(3U, std::string("notification")), field(4U, reference(attachmentRecord(state_->runtime->attachmentIdentity()))),
|
|
851
|
+
field(5U, ordinal), field(6U, monotonicMilliseconds()), field(9U, reference(requiredRecord(*command, 4U))),
|
|
852
|
+
field(10U, reference(requiredRecord(*command, 2U))), field(11U, subscriptionValue),
|
|
853
|
+
field(13U, reference(binaryReferenceRecord(*output)))} };
|
|
854
|
+
if (!deliverEvent(state_, event)) static_cast<void>(state_->runtime->releaseBinary(*output));
|
|
855
|
+
} catch (const std::exception& error) {
|
|
856
|
+
logNativeFailure("notification serialization", error);
|
|
857
|
+
if (output) {
|
|
858
|
+
try {
|
|
859
|
+
static_cast<void>(state_->runtime->releaseBinary(*output));
|
|
860
|
+
} catch (const std::exception& releaseError) {
|
|
861
|
+
logNativeFailure("notification binary release", releaseError);
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
void AppleNativeProtocolExecution::close() {
|
|
868
|
+
const auto state = state_;
|
|
869
|
+
if (!state || state->closed.exchange(true, std::memory_order_acq_rel)) return;
|
|
870
|
+
{
|
|
871
|
+
std::scoped_lock lock(state->mutex);
|
|
872
|
+
state->recordsAwaitingSink.clear();
|
|
873
|
+
}
|
|
874
|
+
const auto invoker = state->callInvoker;
|
|
875
|
+
if (invoker) {
|
|
876
|
+
invoker->invokeAsync([state](jsi::Runtime& runtime) {
|
|
877
|
+
state->eventSink.reset();
|
|
878
|
+
if (!runtime.global().getProperty(runtime, kRuntimeName).isUndefined()) runtime.global().deleteProperty(runtime, kRuntimeName);
|
|
879
|
+
});
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
} // namespace unified_ble::apple_protocol
|