@react-native-ohos/react-native-ble-plx 3.2.1-rc.1 → 3.2.1

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.
Files changed (65) hide show
  1. package/LICENSE +202 -202
  2. package/README.OpenSource +10 -10
  3. package/README.md +9 -9
  4. package/app.plugin.js +1 -1
  5. package/harmony/rn_bleplx/build-profile.json5 +7 -7
  6. package/harmony/rn_bleplx/hvigorfile.ts +1 -1
  7. package/harmony/rn_bleplx/index.ets +26 -26
  8. package/harmony/rn_bleplx/obfuscation-rules.txt +17 -17
  9. package/harmony/rn_bleplx/oh-package.json5 +13 -13
  10. package/harmony/rn_bleplx/src/main/cpp/BlePlxPackage.h +36 -36
  11. package/harmony/rn_bleplx/src/main/cpp/CMakeLists.txt +9 -9
  12. package/harmony/rn_bleplx/src/main/cpp/generated/RNOH/generated/BaseReactNativeBlePlxPackage.h +65 -65
  13. package/harmony/rn_bleplx/src/main/cpp/generated/RNOH/generated/turbo_modules/BlePlx.cpp +59 -59
  14. package/harmony/rn_bleplx/src/main/cpp/generated/RNOH/generated/turbo_modules/BlePlx.h +16 -16
  15. package/harmony/rn_bleplx/src/main/cpp/generated/react/renderer/components/react_native_ble_plx/ComponentDescriptors.h +22 -22
  16. package/harmony/rn_bleplx/src/main/cpp/generated/react/renderer/components/react_native_ble_plx/EventEmitters.cpp +18 -18
  17. package/harmony/rn_bleplx/src/main/cpp/generated/react/renderer/components/react_native_ble_plx/EventEmitters.h +19 -19
  18. package/harmony/rn_bleplx/src/main/cpp/generated/react/renderer/components/react_native_ble_plx/Props.cpp +21 -21
  19. package/harmony/rn_bleplx/src/main/cpp/generated/react/renderer/components/react_native_ble_plx/Props.h +20 -20
  20. package/harmony/rn_bleplx/src/main/cpp/generated/react/renderer/components/react_native_ble_plx/ShadowNodes.cpp +19 -19
  21. package/harmony/rn_bleplx/src/main/cpp/generated/react/renderer/components/react_native_ble_plx/ShadowNodes.h +25 -25
  22. package/harmony/rn_bleplx/src/main/cpp/generated/react/renderer/components/react_native_ble_plx/States.cpp +18 -18
  23. package/harmony/rn_bleplx/src/main/cpp/generated/react/renderer/components/react_native_ble_plx/States.h +22 -22
  24. package/harmony/rn_bleplx/src/main/ets/BleDevice.ts +98 -98
  25. package/harmony/rn_bleplx/src/main/ets/BleModule.ts +1219 -1219
  26. package/harmony/rn_bleplx/src/main/ets/BlePlxInterface.ts +26 -26
  27. package/harmony/rn_bleplx/src/main/ets/BlePlxModule.ts +246 -246
  28. package/harmony/rn_bleplx/src/main/ets/BlePlxPackage.ets +46 -46
  29. package/harmony/rn_bleplx/src/main/ets/Characteristic.ts +179 -179
  30. package/harmony/rn_bleplx/src/main/ets/CommonConstants.ts +29 -29
  31. package/harmony/rn_bleplx/src/main/ets/Descriptor.ts +143 -143
  32. package/harmony/rn_bleplx/src/main/ets/Service.ts +85 -85
  33. package/harmony/rn_bleplx/src/main/ets/common/BleError.ts +90 -90
  34. package/harmony/rn_bleplx/src/main/ets/common/BleErrorToJsObjectConverter.ts +62 -62
  35. package/harmony/rn_bleplx/src/main/ets/common/BleEvent.ts +32 -32
  36. package/harmony/rn_bleplx/src/main/ets/common/BleUtils.ts +86 -86
  37. package/harmony/rn_bleplx/src/main/ets/common/IdGenerator.ts +49 -49
  38. package/harmony/rn_bleplx/src/main/ets/common/IdGeneratorKey.ts +70 -70
  39. package/harmony/rn_bleplx/src/main/ets/common/InstanceIdGenerator.ts +36 -36
  40. package/harmony/rn_bleplx/src/main/ets/common/Logger.ts +64 -64
  41. package/harmony/rn_bleplx/src/main/ets/common/PermissionHandler.ts +98 -98
  42. package/harmony/rn_bleplx/src/main/ets/common/ServiceFactory.ts +37 -37
  43. package/harmony/rn_bleplx/src/main/ets/generated/components/ts.ts +5 -5
  44. package/harmony/rn_bleplx/src/main/ets/generated/index.ets +5 -5
  45. package/harmony/rn_bleplx/src/main/ets/generated/ts.ts +6 -6
  46. package/harmony/rn_bleplx/src/main/ets/generated/turboModules/BlePlx.ts +100 -100
  47. package/harmony/rn_bleplx/src/main/ets/generated/turboModules/ts.ts +5 -5
  48. package/harmony/rn_bleplx/src/main/module.json5 +6 -6
  49. package/harmony/rn_bleplx/ts.ets +25 -25
  50. package/harmony/rn_bleplx.har +0 -0
  51. package/package.json +185 -185
  52. package/src/BleError.js +555 -555
  53. package/src/BleManager.js +1287 -1287
  54. package/src/BleModule.js +847 -847
  55. package/src/Characteristic.js +166 -166
  56. package/src/Descriptor.js +82 -82
  57. package/src/Device.js +370 -370
  58. package/src/NativeBlePlx.ts +121 -121
  59. package/src/Service.js +188 -188
  60. package/src/TypeDefinition.js +360 -360
  61. package/src/Utils.js +26 -26
  62. package/src/index.d.ts +2113 -2113
  63. package/src/index.js +20 -20
  64. package/harmony/rn_bleplx/src/main/ets/BlePlxPackage.ts +0 -46
  65. package/harmony/rn_bleplx/ts.ts +0 -26
package/src/Utils.js CHANGED
@@ -1,26 +1,26 @@
1
- // @flow
2
- 'use strict'
3
-
4
- import type { UUID } from './TypeDefinition'
5
-
6
- /**
7
- * Converts UUID to full 128bit, lowercase format which should be used to compare UUID values.
8
- *
9
- * @param {UUID} uuid 16bit, 32bit or 128bit UUID.
10
- * @returns {UUID} 128bit lowercase UUID.
11
- */
12
- export function fullUUID(uuid: UUID): UUID {
13
- if (uuid.length === 4) {
14
- return '0000' + uuid.toLowerCase() + '-0000-1000-8000-00805f9b34fb'
15
- }
16
- if (uuid.length === 8) {
17
- return uuid.toLowerCase() + '-0000-1000-8000-00805f9b34fb'
18
- }
19
- return uuid.toLowerCase()
20
- }
21
-
22
- export function fillStringWithArguments(value: string, object: Object): string {
23
- return value.replace(/\{([^}]+)\}/g, function (_, arg: string) {
24
- return object[arg] || '?'
25
- })
26
- }
1
+ // @flow
2
+ 'use strict'
3
+
4
+ import type { UUID } from './TypeDefinition'
5
+
6
+ /**
7
+ * Converts UUID to full 128bit, lowercase format which should be used to compare UUID values.
8
+ *
9
+ * @param {UUID} uuid 16bit, 32bit or 128bit UUID.
10
+ * @returns {UUID} 128bit lowercase UUID.
11
+ */
12
+ export function fullUUID(uuid: UUID): UUID {
13
+ if (uuid.length === 4) {
14
+ return '0000' + uuid.toLowerCase() + '-0000-1000-8000-00805f9b34fb'
15
+ }
16
+ if (uuid.length === 8) {
17
+ return uuid.toLowerCase() + '-0000-1000-8000-00805f9b34fb'
18
+ }
19
+ return uuid.toLowerCase()
20
+ }
21
+
22
+ export function fillStringWithArguments(value: string, object: Object): string {
23
+ return value.replace(/\{([^}]+)\}/g, function (_, arg: string) {
24
+ return object[arg] || '?'
25
+ })
26
+ }