@iternio/react-native-auto-play 0.4.2 → 0.4.3

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 (63) hide show
  1. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlay.kt +89 -0
  2. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridCluster.kt +0 -1
  3. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VoiceInputManager.kt +20 -276
  4. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/ThreadUtil.kt +13 -6
  5. package/ios/hybrid/HybridAutoPlay.swift +47 -2
  6. package/ios/utils/VoiceInputManager.swift +40 -141
  7. package/lib/hooks/useAndroidAutoTelemetry.js +6 -1
  8. package/lib/index.d.ts +1 -5
  9. package/lib/index.js +1 -4
  10. package/lib/specs/AutoPlay.nitro.d.ts +29 -0
  11. package/nitro.json +0 -10
  12. package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +0 -2
  13. package/nitrogen/generated/android/ReactNativeAutoPlayOnLoad.cpp +0 -18
  14. package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp +43 -0
  15. package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.hpp +4 -0
  16. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlaySpec.kt +17 -0
  17. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +16 -41
  18. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +126 -201
  19. package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +0 -11
  20. package/nitrogen/generated/ios/ReactNativeAutoPlayAutolinking.mm +0 -8
  21. package/nitrogen/generated/ios/ReactNativeAutoPlayAutolinking.swift +0 -12
  22. package/nitrogen/generated/ios/c++/HybridAutoPlaySpecSwift.hpp +34 -0
  23. package/nitrogen/generated/ios/swift/Func_void_bool.swift +5 -5
  24. package/nitrogen/generated/ios/swift/{Func_void_VoiceInputResult.swift → Func_void_std__shared_ptr_ArrayBuffer_.swift} +10 -10
  25. package/nitrogen/generated/ios/swift/HybridAutoPlaySpec.swift +4 -0
  26. package/nitrogen/generated/ios/swift/HybridAutoPlaySpec_cxx.swift +82 -0
  27. package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.cpp +4 -0
  28. package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.hpp +5 -0
  29. package/package.json +1 -1
  30. package/src/hooks/useAndroidAutoTelemetry.ts +13 -8
  31. package/src/index.ts +1 -5
  32. package/src/specs/AutoPlay.nitro.ts +37 -0
  33. package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridVoice.kt +0 -95
  34. package/ios/hybrid/HybridVoice.swift +0 -63
  35. package/lib/hybrid/HybridVoice.d.ts +0 -12
  36. package/lib/hybrid/HybridVoice.js +0 -13
  37. package/lib/specs/Voice.nitro.d.ts +0 -51
  38. package/lib/specs/Voice.nitro.js +0 -1
  39. package/lib/types/Voice.d.ts +0 -15
  40. package/lib/types/Voice.js +0 -1
  41. package/nitrogen/generated/android/c++/JFunc_void_VoiceInputChunk.hpp +0 -81
  42. package/nitrogen/generated/android/c++/JHybridVoiceSpec.cpp +0 -104
  43. package/nitrogen/generated/android/c++/JHybridVoiceSpec.hpp +0 -66
  44. package/nitrogen/generated/android/c++/JVoiceInputChunk.hpp +0 -64
  45. package/nitrogen/generated/android/c++/JVoiceInputResult.hpp +0 -64
  46. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_VoiceInputChunk.kt +0 -80
  47. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridVoiceSpec.kt +0 -72
  48. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/VoiceInputChunk.kt +0 -41
  49. package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/VoiceInputResult.kt +0 -41
  50. package/nitrogen/generated/ios/c++/HybridVoiceSpecSwift.cpp +0 -11
  51. package/nitrogen/generated/ios/c++/HybridVoiceSpecSwift.hpp +0 -116
  52. package/nitrogen/generated/ios/swift/Func_void_VoiceInputChunk.swift +0 -46
  53. package/nitrogen/generated/ios/swift/HybridVoiceSpec.swift +0 -58
  54. package/nitrogen/generated/ios/swift/HybridVoiceSpec_cxx.swift +0 -227
  55. package/nitrogen/generated/ios/swift/VoiceInputChunk.swift +0 -60
  56. package/nitrogen/generated/ios/swift/VoiceInputResult.swift +0 -60
  57. package/nitrogen/generated/shared/c++/HybridVoiceSpec.cpp +0 -24
  58. package/nitrogen/generated/shared/c++/HybridVoiceSpec.hpp +0 -73
  59. package/nitrogen/generated/shared/c++/VoiceInputChunk.hpp +0 -89
  60. package/nitrogen/generated/shared/c++/VoiceInputResult.hpp +0 -89
  61. package/src/hybrid/HybridVoice.ts +0 -30
  62. package/src/specs/Voice.nitro.ts +0 -58
  63. package/src/types/Voice.ts +0 -17
@@ -48,8 +48,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { class HybridMapTem
48
48
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { class HybridMessageTemplateSpec; }
49
49
  // Forward declaration of `HybridSearchTemplateSpec` to properly resolve imports.
50
50
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { class HybridSearchTemplateSpec; }
51
- // Forward declaration of `HybridVoiceSpec` to properly resolve imports.
52
- namespace margelo::nitro::swe::iternio::reactnativeautoplay { class HybridVoiceSpec; }
53
51
  // Forward declaration of `ImageLane` to properly resolve imports.
54
52
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct ImageLane; }
55
53
  // Forward declaration of `KeepType` to properly resolve imports.
@@ -128,10 +126,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class TurnTyp
128
126
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class VisibilityState; }
129
127
  // Forward declaration of `VisibleTravelEstimate` to properly resolve imports.
130
128
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class VisibleTravelEstimate; }
131
- // Forward declaration of `VoiceInputChunk` to properly resolve imports.
132
- namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct VoiceInputChunk; }
133
- // Forward declaration of `VoiceInputResult` to properly resolve imports.
134
- namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct VoiceInputResult; }
135
129
  // Forward declaration of `ZoomEvent` to properly resolve imports.
136
130
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ZoomEvent; }
137
131
 
@@ -154,8 +148,6 @@ namespace ReactNativeAutoPlay { class HybridMapTemplateSpec_cxx; }
154
148
  namespace ReactNativeAutoPlay { class HybridMessageTemplateSpec_cxx; }
155
149
  // Forward declaration of `HybridSearchTemplateSpec_cxx` to properly resolve imports.
156
150
  namespace ReactNativeAutoPlay { class HybridSearchTemplateSpec_cxx; }
157
- // Forward declaration of `HybridVoiceSpec_cxx` to properly resolve imports.
158
- namespace ReactNativeAutoPlay { class HybridVoiceSpec_cxx; }
159
151
 
160
152
  // Include C++ defined types
161
153
  #include "AlertActionStyle.hpp"
@@ -177,7 +169,6 @@ namespace ReactNativeAutoPlay { class HybridVoiceSpec_cxx; }
177
169
  #include "HybridMapTemplateSpec.hpp"
178
170
  #include "HybridMessageTemplateSpec.hpp"
179
171
  #include "HybridSearchTemplateSpec.hpp"
180
- #include "HybridVoiceSpec.hpp"
181
172
  #include "ImageLane.hpp"
182
173
  #include "KeepType.hpp"
183
174
  #include "LaneGuidance.hpp"
@@ -217,8 +208,6 @@ namespace ReactNativeAutoPlay { class HybridVoiceSpec_cxx; }
217
208
  #include "TurnType.hpp"
218
209
  #include "VisibilityState.hpp"
219
210
  #include "VisibleTravelEstimate.hpp"
220
- #include "VoiceInputChunk.hpp"
221
- #include "VoiceInputResult.hpp"
222
211
  #include "ZoomEvent.hpp"
223
212
  #include <NitroModules/ArrayBuffer.hpp>
224
213
  #include <NitroModules/ArrayBufferHolder.hpp>
@@ -335,16 +324,38 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
335
324
  return Func_void_std__optional_Location__std__optional_std__string__Wrapper(std::move(value));
336
325
  }
337
326
 
338
- // pragma MARK: std::shared_ptr<Promise<void>>
327
+ // pragma MARK: std::shared_ptr<Promise<bool>>
339
328
  /**
340
- * Specialized version of `std::shared_ptr<Promise<void>>`.
329
+ * Specialized version of `std::shared_ptr<Promise<bool>>`.
341
330
  */
342
- using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
343
- inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
344
- return Promise<void>::create();
331
+ using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
332
+ inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
333
+ return Promise<bool>::create();
345
334
  }
346
- inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
347
- return PromiseHolder<void>(std::move(promise));
335
+ inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
336
+ return PromiseHolder<bool>(std::move(promise));
337
+ }
338
+
339
+ // pragma MARK: std::function<void(bool /* result */)>
340
+ /**
341
+ * Specialized version of `std::function<void(bool)>`.
342
+ */
343
+ using Func_void_bool = std::function<void(bool /* result */)>;
344
+ /**
345
+ * Wrapper class for a `std::function<void(bool / * result * /)>`, this can be used from Swift.
346
+ */
347
+ class Func_void_bool_Wrapper final {
348
+ public:
349
+ explicit Func_void_bool_Wrapper(std::function<void(bool /* result */)>&& func): _function(std::make_unique<std::function<void(bool /* result */)>>(std::move(func))) {}
350
+ inline void call(bool result) const noexcept {
351
+ _function->operator()(result);
352
+ }
353
+ private:
354
+ std::unique_ptr<std::function<void(bool /* result */)>> _function;
355
+ } SWIFT_NONCOPYABLE;
356
+ Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
357
+ inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
358
+ return Func_void_bool_Wrapper(std::move(value));
348
359
  }
349
360
 
350
361
  // pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
@@ -369,6 +380,67 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
369
380
  return Func_void_std__exception_ptr_Wrapper(std::move(value));
370
381
  }
371
382
 
383
+ // pragma MARK: std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>
384
+ /**
385
+ * Specialized version of `std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>`.
386
+ */
387
+ using std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer___ = std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>;
388
+ inline std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> create_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer___() noexcept {
389
+ return Promise<std::shared_ptr<ArrayBuffer>>::create();
390
+ }
391
+ inline PromiseHolder<std::shared_ptr<ArrayBuffer>> wrap_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer___(std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> promise) noexcept {
392
+ return PromiseHolder<std::shared_ptr<ArrayBuffer>>(std::move(promise));
393
+ }
394
+
395
+ // pragma MARK: std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>
396
+ /**
397
+ * Specialized version of `std::function<void(const std::shared_ptr<ArrayBuffer>&)>`.
398
+ */
399
+ using Func_void_std__shared_ptr_ArrayBuffer_ = std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>;
400
+ /**
401
+ * Wrapper class for a `std::function<void(const std::shared_ptr<ArrayBuffer>& / * result * /)>`, this can be used from Swift.
402
+ */
403
+ class Func_void_std__shared_ptr_ArrayBuffer__Wrapper final {
404
+ public:
405
+ explicit Func_void_std__shared_ptr_ArrayBuffer__Wrapper(std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>&& func): _function(std::make_unique<std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>>(std::move(func))) {}
406
+ inline void call(ArrayBufferHolder result) const noexcept {
407
+ _function->operator()(result.getArrayBuffer());
408
+ }
409
+ private:
410
+ std::unique_ptr<std::function<void(const std::shared_ptr<ArrayBuffer>& /* result */)>> _function;
411
+ } SWIFT_NONCOPYABLE;
412
+ Func_void_std__shared_ptr_ArrayBuffer_ create_Func_void_std__shared_ptr_ArrayBuffer_(void* NON_NULL swiftClosureWrapper) noexcept;
413
+ inline Func_void_std__shared_ptr_ArrayBuffer__Wrapper wrap_Func_void_std__shared_ptr_ArrayBuffer_(Func_void_std__shared_ptr_ArrayBuffer_ value) noexcept {
414
+ return Func_void_std__shared_ptr_ArrayBuffer__Wrapper(std::move(value));
415
+ }
416
+
417
+ // pragma MARK: std::optional<double>
418
+ /**
419
+ * Specialized version of `std::optional<double>`.
420
+ */
421
+ using std__optional_double_ = std::optional<double>;
422
+ inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
423
+ return std::optional<double>(value);
424
+ }
425
+ inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
426
+ return optional.has_value();
427
+ }
428
+ inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
429
+ return optional.value();
430
+ }
431
+
432
+ // pragma MARK: std::shared_ptr<Promise<void>>
433
+ /**
434
+ * Specialized version of `std::shared_ptr<Promise<void>>`.
435
+ */
436
+ using std__shared_ptr_Promise_void__ = std::shared_ptr<Promise<void>>;
437
+ inline std::shared_ptr<Promise<void>> create_std__shared_ptr_Promise_void__() noexcept {
438
+ return Promise<void>::create();
439
+ }
440
+ inline PromiseHolder<void> wrap_std__shared_ptr_Promise_void__(std::shared_ptr<Promise<void>> promise) noexcept {
441
+ return PromiseHolder<void>(std::move(promise));
442
+ }
443
+
372
444
  // pragma MARK: std::optional<bool>
373
445
  /**
374
446
  * Specialized version of `std::optional<bool>`.
@@ -406,21 +478,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
406
478
  return Func_void_SafeAreaInsets_Wrapper(std::move(value));
407
479
  }
408
480
 
409
- // pragma MARK: std::optional<double>
410
- /**
411
- * Specialized version of `std::optional<double>`.
412
- */
413
- using std__optional_double_ = std::optional<double>;
414
- inline std::optional<double> create_std__optional_double_(const double& value) noexcept {
415
- return std::optional<double>(value);
416
- }
417
- inline bool has_value_std__optional_double_(const std::optional<double>& optional) noexcept {
418
- return optional.has_value();
419
- }
420
- inline double get_std__optional_double_(const std::optional<double>& optional) noexcept {
421
- return optional.value();
422
- }
423
-
424
481
  // pragma MARK: std::optional<NitroColor>
425
482
  /**
426
483
  * Specialized version of `std::optional<NitroColor>`.
@@ -563,15 +620,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
563
620
  return Result<std::function<void()>>::withError(error);
564
621
  }
565
622
 
566
- // pragma MARK: Result<std::shared_ptr<Promise<void>>>
567
- using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
568
- inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
569
- return Result<std::shared_ptr<Promise<void>>>::withValue(value);
570
- }
571
- inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
572
- return Result<std::shared_ptr<Promise<void>>>::withError(error);
573
- }
574
-
575
623
  // pragma MARK: Result<bool>
576
624
  using Result_bool_ = Result<bool>;
577
625
  inline Result_bool_ create_Result_bool_(bool value) noexcept {
@@ -581,6 +629,42 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
581
629
  return Result<bool>::withError(error);
582
630
  }
583
631
 
632
+ // pragma MARK: Result<std::shared_ptr<Promise<bool>>>
633
+ using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
634
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
635
+ return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
636
+ }
637
+ inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
638
+ return Result<std::shared_ptr<Promise<bool>>>::withError(error);
639
+ }
640
+
641
+ // pragma MARK: Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>
642
+ using Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____ = Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>;
643
+ inline Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____ create_Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____(const std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>& value) noexcept {
644
+ return Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>::withValue(value);
645
+ }
646
+ inline Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____ create_Result_std__shared_ptr_Promise_std__shared_ptr_ArrayBuffer____(const std::exception_ptr& error) noexcept {
647
+ return Result<std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>>>::withError(error);
648
+ }
649
+
650
+ // pragma MARK: Result<void>
651
+ using Result_void_ = Result<void>;
652
+ inline Result_void_ create_Result_void_() noexcept {
653
+ return Result<void>::withValue();
654
+ }
655
+ inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
656
+ return Result<void>::withError(error);
657
+ }
658
+
659
+ // pragma MARK: Result<std::shared_ptr<Promise<void>>>
660
+ using Result_std__shared_ptr_Promise_void___ = Result<std::shared_ptr<Promise<void>>>;
661
+ inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::shared_ptr<Promise<void>>& value) noexcept {
662
+ return Result<std::shared_ptr<Promise<void>>>::withValue(value);
663
+ }
664
+ inline Result_std__shared_ptr_Promise_void___ create_Result_std__shared_ptr_Promise_void___(const std::exception_ptr& error) noexcept {
665
+ return Result<std::shared_ptr<Promise<void>>>::withError(error);
666
+ }
667
+
584
668
  // pragma MARK: std::vector<std::string>
585
669
  /**
586
670
  * Specialized version of `std::vector<std::string>`.
@@ -774,15 +858,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
774
858
  using std__weak_ptr_HybridClusterSpec_ = std::weak_ptr<HybridClusterSpec>;
775
859
  inline std__weak_ptr_HybridClusterSpec_ weakify_std__shared_ptr_HybridClusterSpec_(const std::shared_ptr<HybridClusterSpec>& strong) noexcept { return strong; }
776
860
 
777
- // pragma MARK: Result<void>
778
- using Result_void_ = Result<void>;
779
- inline Result_void_ create_Result_void_() noexcept {
780
- return Result<void>::withValue();
781
- }
782
- inline Result_void_ create_Result_void_(const std::exception_ptr& error) noexcept {
783
- return Result<void>::withError(error);
784
- }
785
-
786
861
  // pragma MARK: std::function<void(std::optional<bool> /* animated */)>
787
862
  /**
788
863
  * Specialized version of `std::function<void(std::optional<bool>)>`.
@@ -887,28 +962,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
887
962
  return optional.value();
888
963
  }
889
964
 
890
- // pragma MARK: std::function<void(bool /* isPanningInterfaceVisible */)>
891
- /**
892
- * Specialized version of `std::function<void(bool)>`.
893
- */
894
- using Func_void_bool = std::function<void(bool /* isPanningInterfaceVisible */)>;
895
- /**
896
- * Wrapper class for a `std::function<void(bool / * isPanningInterfaceVisible * /)>`, this can be used from Swift.
897
- */
898
- class Func_void_bool_Wrapper final {
899
- public:
900
- explicit Func_void_bool_Wrapper(std::function<void(bool /* isPanningInterfaceVisible */)>&& func): _function(std::make_unique<std::function<void(bool /* isPanningInterfaceVisible */)>>(std::move(func))) {}
901
- inline void call(bool isPanningInterfaceVisible) const noexcept {
902
- _function->operator()(isPanningInterfaceVisible);
903
- }
904
- private:
905
- std::unique_ptr<std::function<void(bool /* isPanningInterfaceVisible */)>> _function;
906
- } SWIFT_NONCOPYABLE;
907
- Func_void_bool create_Func_void_bool(void* NON_NULL swiftClosureWrapper) noexcept;
908
- inline Func_void_bool_Wrapper wrap_Func_void_bool(Func_void_bool value) noexcept {
909
- return Func_void_bool_Wrapper(std::move(value));
910
- }
911
-
912
965
  // pragma MARK: std::optional<std::function<void(bool /* isPanningInterfaceVisible */)>>
913
966
  /**
914
967
  * Specialized version of `std::optional<std::function<void(bool / * isPanningInterfaceVisible * /)>>`.
@@ -1581,133 +1634,5 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
1581
1634
  // pragma MARK: std::weak_ptr<HybridSearchTemplateSpec>
1582
1635
  using std__weak_ptr_HybridSearchTemplateSpec_ = std::weak_ptr<HybridSearchTemplateSpec>;
1583
1636
  inline std__weak_ptr_HybridSearchTemplateSpec_ weakify_std__shared_ptr_HybridSearchTemplateSpec_(const std::shared_ptr<HybridSearchTemplateSpec>& strong) noexcept { return strong; }
1584
-
1585
- // pragma MARK: std::shared_ptr<Promise<bool>>
1586
- /**
1587
- * Specialized version of `std::shared_ptr<Promise<bool>>`.
1588
- */
1589
- using std__shared_ptr_Promise_bool__ = std::shared_ptr<Promise<bool>>;
1590
- inline std::shared_ptr<Promise<bool>> create_std__shared_ptr_Promise_bool__() noexcept {
1591
- return Promise<bool>::create();
1592
- }
1593
- inline PromiseHolder<bool> wrap_std__shared_ptr_Promise_bool__(std::shared_ptr<Promise<bool>> promise) noexcept {
1594
- return PromiseHolder<bool>(std::move(promise));
1595
- }
1596
-
1597
- // pragma MARK: std::optional<std::shared_ptr<ArrayBuffer>>
1598
- /**
1599
- * Specialized version of `std::optional<std::shared_ptr<ArrayBuffer>>`.
1600
- */
1601
- using std__optional_std__shared_ptr_ArrayBuffer__ = std::optional<std::shared_ptr<ArrayBuffer>>;
1602
- inline std::optional<std::shared_ptr<ArrayBuffer>> create_std__optional_std__shared_ptr_ArrayBuffer__(const std::shared_ptr<ArrayBuffer>& value) noexcept {
1603
- return std::optional<std::shared_ptr<ArrayBuffer>>(value);
1604
- }
1605
- inline bool has_value_std__optional_std__shared_ptr_ArrayBuffer__(const std::optional<std::shared_ptr<ArrayBuffer>>& optional) noexcept {
1606
- return optional.has_value();
1607
- }
1608
- inline std::shared_ptr<ArrayBuffer> get_std__optional_std__shared_ptr_ArrayBuffer__(const std::optional<std::shared_ptr<ArrayBuffer>>& optional) noexcept {
1609
- return optional.value();
1610
- }
1611
-
1612
- // pragma MARK: std::shared_ptr<Promise<VoiceInputResult>>
1613
- /**
1614
- * Specialized version of `std::shared_ptr<Promise<VoiceInputResult>>`.
1615
- */
1616
- using std__shared_ptr_Promise_VoiceInputResult__ = std::shared_ptr<Promise<VoiceInputResult>>;
1617
- inline std::shared_ptr<Promise<VoiceInputResult>> create_std__shared_ptr_Promise_VoiceInputResult__() noexcept {
1618
- return Promise<VoiceInputResult>::create();
1619
- }
1620
- inline PromiseHolder<VoiceInputResult> wrap_std__shared_ptr_Promise_VoiceInputResult__(std::shared_ptr<Promise<VoiceInputResult>> promise) noexcept {
1621
- return PromiseHolder<VoiceInputResult>(std::move(promise));
1622
- }
1623
-
1624
- // pragma MARK: std::function<void(const VoiceInputResult& /* result */)>
1625
- /**
1626
- * Specialized version of `std::function<void(const VoiceInputResult&)>`.
1627
- */
1628
- using Func_void_VoiceInputResult = std::function<void(const VoiceInputResult& /* result */)>;
1629
- /**
1630
- * Wrapper class for a `std::function<void(const VoiceInputResult& / * result * /)>`, this can be used from Swift.
1631
- */
1632
- class Func_void_VoiceInputResult_Wrapper final {
1633
- public:
1634
- explicit Func_void_VoiceInputResult_Wrapper(std::function<void(const VoiceInputResult& /* result */)>&& func): _function(std::make_unique<std::function<void(const VoiceInputResult& /* result */)>>(std::move(func))) {}
1635
- inline void call(VoiceInputResult result) const noexcept {
1636
- _function->operator()(result);
1637
- }
1638
- private:
1639
- std::unique_ptr<std::function<void(const VoiceInputResult& /* result */)>> _function;
1640
- } SWIFT_NONCOPYABLE;
1641
- Func_void_VoiceInputResult create_Func_void_VoiceInputResult(void* NON_NULL swiftClosureWrapper) noexcept;
1642
- inline Func_void_VoiceInputResult_Wrapper wrap_Func_void_VoiceInputResult(Func_void_VoiceInputResult value) noexcept {
1643
- return Func_void_VoiceInputResult_Wrapper(std::move(value));
1644
- }
1645
-
1646
- // pragma MARK: std::function<void(const VoiceInputChunk& /* chunk */)>
1647
- /**
1648
- * Specialized version of `std::function<void(const VoiceInputChunk&)>`.
1649
- */
1650
- using Func_void_VoiceInputChunk = std::function<void(const VoiceInputChunk& /* chunk */)>;
1651
- /**
1652
- * Wrapper class for a `std::function<void(const VoiceInputChunk& / * chunk * /)>`, this can be used from Swift.
1653
- */
1654
- class Func_void_VoiceInputChunk_Wrapper final {
1655
- public:
1656
- explicit Func_void_VoiceInputChunk_Wrapper(std::function<void(const VoiceInputChunk& /* chunk */)>&& func): _function(std::make_unique<std::function<void(const VoiceInputChunk& /* chunk */)>>(std::move(func))) {}
1657
- inline void call(VoiceInputChunk chunk) const noexcept {
1658
- _function->operator()(chunk);
1659
- }
1660
- private:
1661
- std::unique_ptr<std::function<void(const VoiceInputChunk& /* chunk */)>> _function;
1662
- } SWIFT_NONCOPYABLE;
1663
- Func_void_VoiceInputChunk create_Func_void_VoiceInputChunk(void* NON_NULL swiftClosureWrapper) noexcept;
1664
- inline Func_void_VoiceInputChunk_Wrapper wrap_Func_void_VoiceInputChunk(Func_void_VoiceInputChunk value) noexcept {
1665
- return Func_void_VoiceInputChunk_Wrapper(std::move(value));
1666
- }
1667
-
1668
- // pragma MARK: std::optional<std::function<void(const VoiceInputChunk& /* chunk */)>>
1669
- /**
1670
- * Specialized version of `std::optional<std::function<void(const VoiceInputChunk& / * chunk * /)>>`.
1671
- */
1672
- using std__optional_std__function_void_const_VoiceInputChunk_____chunk______ = std::optional<std::function<void(const VoiceInputChunk& /* chunk */)>>;
1673
- inline std::optional<std::function<void(const VoiceInputChunk& /* chunk */)>> create_std__optional_std__function_void_const_VoiceInputChunk_____chunk______(const std::function<void(const VoiceInputChunk& /* chunk */)>& value) noexcept {
1674
- return std::optional<std::function<void(const VoiceInputChunk& /* chunk */)>>(value);
1675
- }
1676
- inline bool has_value_std__optional_std__function_void_const_VoiceInputChunk_____chunk______(const std::optional<std::function<void(const VoiceInputChunk& /* chunk */)>>& optional) noexcept {
1677
- return optional.has_value();
1678
- }
1679
- inline std::function<void(const VoiceInputChunk& /* chunk */)> get_std__optional_std__function_void_const_VoiceInputChunk_____chunk______(const std::optional<std::function<void(const VoiceInputChunk& /* chunk */)>>& optional) noexcept {
1680
- return optional.value();
1681
- }
1682
-
1683
- // pragma MARK: std::shared_ptr<HybridVoiceSpec>
1684
- /**
1685
- * Specialized version of `std::shared_ptr<HybridVoiceSpec>`.
1686
- */
1687
- using std__shared_ptr_HybridVoiceSpec_ = std::shared_ptr<HybridVoiceSpec>;
1688
- std::shared_ptr<HybridVoiceSpec> create_std__shared_ptr_HybridVoiceSpec_(void* NON_NULL swiftUnsafePointer) noexcept;
1689
- void* NON_NULL get_std__shared_ptr_HybridVoiceSpec_(std__shared_ptr_HybridVoiceSpec_ cppType);
1690
-
1691
- // pragma MARK: std::weak_ptr<HybridVoiceSpec>
1692
- using std__weak_ptr_HybridVoiceSpec_ = std::weak_ptr<HybridVoiceSpec>;
1693
- inline std__weak_ptr_HybridVoiceSpec_ weakify_std__shared_ptr_HybridVoiceSpec_(const std::shared_ptr<HybridVoiceSpec>& strong) noexcept { return strong; }
1694
-
1695
- // pragma MARK: Result<std::shared_ptr<Promise<bool>>>
1696
- using Result_std__shared_ptr_Promise_bool___ = Result<std::shared_ptr<Promise<bool>>>;
1697
- inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::shared_ptr<Promise<bool>>& value) noexcept {
1698
- return Result<std::shared_ptr<Promise<bool>>>::withValue(value);
1699
- }
1700
- inline Result_std__shared_ptr_Promise_bool___ create_Result_std__shared_ptr_Promise_bool___(const std::exception_ptr& error) noexcept {
1701
- return Result<std::shared_ptr<Promise<bool>>>::withError(error);
1702
- }
1703
-
1704
- // pragma MARK: Result<std::shared_ptr<Promise<VoiceInputResult>>>
1705
- using Result_std__shared_ptr_Promise_VoiceInputResult___ = Result<std::shared_ptr<Promise<VoiceInputResult>>>;
1706
- inline Result_std__shared_ptr_Promise_VoiceInputResult___ create_Result_std__shared_ptr_Promise_VoiceInputResult___(const std::shared_ptr<Promise<VoiceInputResult>>& value) noexcept {
1707
- return Result<std::shared_ptr<Promise<VoiceInputResult>>>::withValue(value);
1708
- }
1709
- inline Result_std__shared_ptr_Promise_VoiceInputResult___ create_Result_std__shared_ptr_Promise_VoiceInputResult___(const std::exception_ptr& error) noexcept {
1710
- return Result<std::shared_ptr<Promise<VoiceInputResult>>>::withError(error);
1711
- }
1712
1637
 
1713
1638
  } // namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift
@@ -52,8 +52,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { class HybridMapTem
52
52
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { class HybridMessageTemplateSpec; }
53
53
  // Forward declaration of `HybridSearchTemplateSpec` to properly resolve imports.
54
54
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { class HybridSearchTemplateSpec; }
55
- // Forward declaration of `HybridVoiceSpec` to properly resolve imports.
56
- namespace margelo::nitro::swe::iternio::reactnativeautoplay { class HybridVoiceSpec; }
57
55
  // Forward declaration of `ImageLane` to properly resolve imports.
58
56
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct ImageLane; }
59
57
  // Forward declaration of `InformationTemplateConfig` to properly resolve imports.
@@ -150,10 +148,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class TurnTyp
150
148
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class VisibilityState; }
151
149
  // Forward declaration of `VisibleTravelEstimate` to properly resolve imports.
152
150
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class VisibleTravelEstimate; }
153
- // Forward declaration of `VoiceInputChunk` to properly resolve imports.
154
- namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct VoiceInputChunk; }
155
- // Forward declaration of `VoiceInputResult` to properly resolve imports.
156
- namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct VoiceInputResult; }
157
151
  // Forward declaration of `ZoomEvent` to properly resolve imports.
158
152
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ZoomEvent; }
159
153
 
@@ -180,7 +174,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ZoomEve
180
174
  #include "HybridMapTemplateSpec.hpp"
181
175
  #include "HybridMessageTemplateSpec.hpp"
182
176
  #include "HybridSearchTemplateSpec.hpp"
183
- #include "HybridVoiceSpec.hpp"
184
177
  #include "ImageLane.hpp"
185
178
  #include "InformationTemplateConfig.hpp"
186
179
  #include "KeepType.hpp"
@@ -229,8 +222,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ZoomEve
229
222
  #include "TurnType.hpp"
230
223
  #include "VisibilityState.hpp"
231
224
  #include "VisibleTravelEstimate.hpp"
232
- #include "VoiceInputChunk.hpp"
233
- #include "VoiceInputResult.hpp"
234
225
  #include "ZoomEvent.hpp"
235
226
  #include <NitroModules/ArrayBuffer.hpp>
236
227
  #include <NitroModules/Promise.hpp>
@@ -271,8 +262,6 @@ namespace ReactNativeAutoPlay { class HybridMapTemplateSpec_cxx; }
271
262
  namespace ReactNativeAutoPlay { class HybridMessageTemplateSpec_cxx; }
272
263
  // Forward declaration of `HybridSearchTemplateSpec_cxx` to properly resolve imports.
273
264
  namespace ReactNativeAutoPlay { class HybridSearchTemplateSpec_cxx; }
274
- // Forward declaration of `HybridVoiceSpec_cxx` to properly resolve imports.
275
- namespace ReactNativeAutoPlay { class HybridVoiceSpec_cxx; }
276
265
 
277
266
  // Include Swift defined types
278
267
  #if __has_include("ReactNativeAutoPlay-Swift.h")
@@ -10,7 +10,6 @@
10
10
  #import "ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp"
11
11
  #import <type_traits>
12
12
 
13
- #include "HybridVoiceSpecSwift.hpp"
14
13
  #include "HybridAutoPlaySpecSwift.hpp"
15
14
  #include "HybridListTemplateSpecSwift.hpp"
16
15
  #include "HybridInformationTemplateSpecSwift.hpp"
@@ -30,13 +29,6 @@
30
29
  using namespace margelo::nitro;
31
30
  using namespace margelo::nitro::swe::iternio::reactnativeautoplay;
32
31
 
33
- HybridObjectRegistry::registerHybridObjectConstructor(
34
- "Voice",
35
- []() -> std::shared_ptr<HybridObject> {
36
- std::shared_ptr<HybridVoiceSpec> hybridObject = ReactNativeAutoPlay::ReactNativeAutoPlayAutolinking::createVoice();
37
- return hybridObject;
38
- }
39
- );
40
32
  HybridObjectRegistry::registerHybridObjectConstructor(
41
33
  "AutoPlay",
42
34
  []() -> std::shared_ptr<HybridObject> {
@@ -12,18 +12,6 @@ import NitroModules
12
12
  public final class ReactNativeAutoPlayAutolinking {
13
13
  public typealias bridge = margelo.nitro.swe.iternio.reactnativeautoplay.bridge.swift
14
14
 
15
- public static func createVoice() -> bridge.std__shared_ptr_HybridVoiceSpec_ {
16
- let hybridObject = HybridVoice()
17
- return { () -> bridge.std__shared_ptr_HybridVoiceSpec_ in
18
- let __cxxWrapped = hybridObject.getCxxWrapper()
19
- return __cxxWrapped.getCxxPart()
20
- }()
21
- }
22
-
23
- public static func isVoiceRecyclable() -> Bool {
24
- return HybridVoice.self is any RecyclableView.Type
25
- }
26
-
27
15
  public static func createAutoPlay() -> bridge.std__shared_ptr_HybridAutoPlaySpec_ {
28
16
  let hybridObject = HybridAutoPlay()
29
17
  return { () -> bridge.std__shared_ptr_HybridAutoPlaySpec_ in
@@ -18,6 +18,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class EventNa
18
18
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class VisibilityState; }
19
19
  // Forward declaration of `Location` to properly resolve imports.
20
20
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct Location; }
21
+ // Forward declaration of `ArrayBufferHolder` to properly resolve imports.
22
+ namespace NitroModules { class ArrayBufferHolder; }
21
23
  // Forward declaration of `SafeAreaInsets` to properly resolve imports.
22
24
  namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct SafeAreaInsets; }
23
25
  // Forward declaration of `NitroAction` to properly resolve imports.
@@ -44,6 +46,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
44
46
  #include "Location.hpp"
45
47
  #include <optional>
46
48
  #include <NitroModules/Promise.hpp>
49
+ #include <NitroModules/ArrayBuffer.hpp>
50
+ #include <NitroModules/ArrayBufferHolder.hpp>
47
51
  #include "SafeAreaInsets.hpp"
48
52
  #include "NitroAction.hpp"
49
53
  #include <vector>
@@ -130,6 +134,36 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
130
134
  auto __value = std::move(__result.value());
131
135
  return __value;
132
136
  }
137
+ inline bool hasVoiceInputPermission() override {
138
+ auto __result = _swiftPart.hasVoiceInputPermission();
139
+ if (__result.hasError()) [[unlikely]] {
140
+ std::rethrow_exception(__result.error());
141
+ }
142
+ auto __value = std::move(__result.value());
143
+ return __value;
144
+ }
145
+ inline std::shared_ptr<Promise<bool>> requestVoiceInputPermission() override {
146
+ auto __result = _swiftPart.requestVoiceInputPermission();
147
+ if (__result.hasError()) [[unlikely]] {
148
+ std::rethrow_exception(__result.error());
149
+ }
150
+ auto __value = std::move(__result.value());
151
+ return __value;
152
+ }
153
+ inline std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> startVoiceInput(std::optional<double> silenceThresholdMs, std::optional<double> maxDurationMs, const std::optional<std::string>& listeningText) override {
154
+ auto __result = _swiftPart.startVoiceInput(silenceThresholdMs, maxDurationMs, listeningText);
155
+ if (__result.hasError()) [[unlikely]] {
156
+ std::rethrow_exception(__result.error());
157
+ }
158
+ auto __value = std::move(__result.value());
159
+ return __value;
160
+ }
161
+ inline void stopVoiceInput() override {
162
+ auto __result = _swiftPart.stopVoiceInput();
163
+ if (__result.hasError()) [[unlikely]] {
164
+ std::rethrow_exception(__result.error());
165
+ }
166
+ }
133
167
  inline std::shared_ptr<Promise<void>> setRootTemplate(const std::string& templateId) override {
134
168
  auto __result = _swiftPart.setRootTemplate(templateId);
135
169
  if (__result.hasError()) [[unlikely]] {
@@ -8,21 +8,21 @@
8
8
  import NitroModules
9
9
 
10
10
  /**
11
- * Wraps a Swift `(_ value: Bool) -> Void` as a class.
11
+ * Wraps a Swift `(_ isPanningInterfaceVisible: Bool) -> Void` as a class.
12
12
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
13
13
  */
14
14
  public final class Func_void_bool {
15
15
  public typealias bridge = margelo.nitro.swe.iternio.reactnativeautoplay.bridge.swift
16
16
 
17
- private let closure: (_ value: Bool) -> Void
17
+ private let closure: (_ isPanningInterfaceVisible: Bool) -> Void
18
18
 
19
- public init(_ closure: @escaping (_ value: Bool) -> Void) {
19
+ public init(_ closure: @escaping (_ isPanningInterfaceVisible: Bool) -> Void) {
20
20
  self.closure = closure
21
21
  }
22
22
 
23
23
  @inline(__always)
24
- public func call(value: Bool) -> Void {
25
- self.closure(value)
24
+ public func call(isPanningInterfaceVisible: Bool) -> Void {
25
+ self.closure(isPanningInterfaceVisible)
26
26
  }
27
27
 
28
28
  /**
@@ -1,5 +1,5 @@
1
1
  ///
2
- /// Func_void_VoiceInputResult.swift
2
+ /// Func_void_std__shared_ptr_ArrayBuffer_.swift
3
3
  /// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
4
4
  /// https://github.com/mrousavy/nitro
5
5
  /// Copyright © Marc Rousavy @ Margelo
@@ -8,20 +8,20 @@
8
8
  import NitroModules
9
9
 
10
10
  /**
11
- * Wraps a Swift `(_ value: VoiceInputResult) -> Void` as a class.
11
+ * Wraps a Swift `(_ value: ArrayBuffer) -> Void` as a class.
12
12
  * This class can be used from C++, e.g. to wrap the Swift closure as a `std::function`.
13
13
  */
14
- public final class Func_void_VoiceInputResult {
14
+ public final class Func_void_std__shared_ptr_ArrayBuffer_ {
15
15
  public typealias bridge = margelo.nitro.swe.iternio.reactnativeautoplay.bridge.swift
16
16
 
17
- private let closure: (_ value: VoiceInputResult) -> Void
17
+ private let closure: (_ value: ArrayBuffer) -> Void
18
18
 
19
- public init(_ closure: @escaping (_ value: VoiceInputResult) -> Void) {
19
+ public init(_ closure: @escaping (_ value: ArrayBuffer) -> Void) {
20
20
  self.closure = closure
21
21
  }
22
22
 
23
23
  @inline(__always)
24
- public func call(value: VoiceInputResult) -> Void {
24
+ public func call(value: ArrayBuffer) -> Void {
25
25
  self.closure(value)
26
26
  }
27
27
 
@@ -35,12 +35,12 @@ public final class Func_void_VoiceInputResult {
35
35
  }
36
36
 
37
37
  /**
38
- * Casts an unsafe pointer to a `Func_void_VoiceInputResult`.
39
- * The pointer has to be a retained opaque `Unmanaged<Func_void_VoiceInputResult>`.
38
+ * Casts an unsafe pointer to a `Func_void_std__shared_ptr_ArrayBuffer_`.
39
+ * The pointer has to be a retained opaque `Unmanaged<Func_void_std__shared_ptr_ArrayBuffer_>`.
40
40
  * This removes one strong reference from the object!
41
41
  */
42
42
  @inline(__always)
43
- public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_VoiceInputResult {
44
- return Unmanaged<Func_void_VoiceInputResult>.fromOpaque(pointer).takeRetainedValue()
43
+ public static func fromUnsafe(_ pointer: UnsafeMutableRawPointer) -> Func_void_std__shared_ptr_ArrayBuffer_ {
44
+ return Unmanaged<Func_void_std__shared_ptr_ArrayBuffer_>.fromOpaque(pointer).takeRetainedValue()
45
45
  }
46
46
  }
@@ -16,6 +16,10 @@ public protocol HybridAutoPlaySpec_protocol: HybridObject {
16
16
  func addListener(eventType: EventName, callback: @escaping () -> Void) throws -> () -> Void
17
17
  func addListenerRenderState(moduleName: String, callback: @escaping (_ payload: VisibilityState) -> Void) throws -> () -> Void
18
18
  func addListenerVoiceInput(callback: @escaping (_ coordinates: Location?, _ query: String?) -> Void) throws -> () -> Void
19
+ func hasVoiceInputPermission() throws -> Bool
20
+ func requestVoiceInputPermission() throws -> Promise<Bool>
21
+ func startVoiceInput(silenceThresholdMs: Double?, maxDurationMs: Double?, listeningText: String?) throws -> Promise<ArrayBuffer>
22
+ func stopVoiceInput() throws -> Void
19
23
  func setRootTemplate(templateId: String) throws -> Promise<Void>
20
24
  func pushTemplate(templateId: String) throws -> Promise<Void>
21
25
  func popTemplate(animate: Bool?) throws -> Promise<Void>