@iternio/react-native-auto-play 0.0.10 → 0.0.12
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/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/AndroidAutoSession.kt +59 -1
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlay.kt +19 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/MapTemplate.kt +10 -6
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +3 -0
- package/ios/hybrid/HybridAutoPlay.swift +7 -0
- package/ios/hybrid/HybridMapTemplate.swift +8 -1
- package/ios/templates/MapTemplate.swift +8 -7
- package/lib/hooks/useVoiceInput.d.ts +8 -0
- package/lib/hooks/useVoiceInput.js +38 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/specs/AutoPlay.nitro.d.ts +8 -1
- package/lib/specs/VoiceInput.nitro.d.ts +8 -0
- package/lib/templates/MapTemplate.js +4 -0
- package/lib/types/Event.d.ts +4 -0
- package/lib/types/Maneuver.d.ts +5 -2
- package/lib/utils/NitroManeuver.d.ts +4 -1
- package/nitrogen/generated/android/ReactNativeAutoPlayOnLoad.cpp +2 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_Location__std__optional_std__string_.hpp +78 -0
- package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp +20 -0
- package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.hpp +1 -0
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.hpp +1 -1
- package/nitrogen/generated/android/c++/JLocation.hpp +61 -0
- package/nitrogen/generated/android/c++/JNitroLoadingManeuver.hpp +57 -0
- package/nitrogen/generated/android/c++/JNitroManeuver.cpp +6 -2
- package/nitrogen/generated/android/c++/JNitroManeuver.hpp +19 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__optional_Location__std__optional_std__string_.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlaySpec.kt +9 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Location.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroLoadingManeuver.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroManeuver.kt +15 -2
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +8 -0
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +74 -25
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +6 -0
- package/nitrogen/generated/ios/c++/HybridAutoPlaySpecSwift.hpp +12 -1
- package/nitrogen/generated/ios/c++/HybridMapTemplateSpecSwift.hpp +4 -1
- package/nitrogen/generated/ios/swift/Func_void_std__optional_Location__std__optional_std__string_.swift +54 -0
- package/nitrogen/generated/ios/swift/HybridAutoPlaySpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridAutoPlaySpec_cxx.swift +32 -0
- package/nitrogen/generated/ios/swift/HybridMapTemplateSpec_cxx.swift +4 -1
- package/nitrogen/generated/ios/swift/Location.swift +46 -0
- package/nitrogen/generated/ios/swift/NitroLoadingManeuver.swift +35 -0
- package/nitrogen/generated/ios/swift/NitroManeuver.swift +2 -1
- package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.hpp +5 -1
- package/nitrogen/generated/shared/c++/HybridMapTemplateSpec.hpp +4 -1
- package/nitrogen/generated/shared/c++/Location.hpp +79 -0
- package/nitrogen/generated/shared/c++/NitroLoadingManeuver.hpp +75 -0
- package/package.json +1 -1
- package/src/hooks/useVoiceInput.ts +54 -0
- package/src/index.ts +1 -0
- package/src/specs/AutoPlay.nitro.ts +17 -1
- package/src/templates/MapTemplate.ts +5 -0
- package/src/types/Event.ts +4 -0
- package/src/types/Maneuver.ts +8 -1
- package/src/utils/NitroManeuver.ts +8 -1
- package/lib/specs/HybridAndroidAutoTelemetry.nitro.d.ts +0 -15
- package/lib/specs/HybridAutoPlay.nitro.d.ts +0 -64
- package/lib/specs/HybridAutoPlay.nitro.js +0 -1
- package/lib/specs/HybridCarPlayDashboard.nitro.d.ts +0 -22
- package/lib/specs/HybridCarPlayDashboard.nitro.js +0 -1
- package/lib/specs/HybridCluster.nitro.d.ts +0 -19
- package/lib/specs/HybridCluster.nitro.js +0 -1
- package/lib/specs/HybridGridTemplate.nitro.d.ts +0 -14
- package/lib/specs/HybridGridTemplate.nitro.js +0 -1
- package/lib/specs/HybridInformationTemplate.nitro.d.ts +0 -13
- package/lib/specs/HybridInformationTemplate.nitro.js +0 -1
- package/lib/specs/HybridListTemplate.nitro.d.ts +0 -13
- package/lib/specs/HybridListTemplate.nitro.js +0 -1
- package/lib/specs/HybridMapTemplate.nitro.d.ts +0 -25
- package/lib/specs/HybridMapTemplate.nitro.js +0 -1
- package/lib/specs/HybridMessageTemplate.nitro.d.ts +0 -12
- package/lib/specs/HybridMessageTemplate.nitro.js +0 -1
- package/lib/specs/HybridSearchTemplate.nitro.d.ts +0 -13
- package/lib/specs/HybridSearchTemplate.nitro.js +0 -1
- package/lib/types/GestureEvents.d.ts +0 -37
- package/lib/types/GestureEvents.js +0 -1
- /package/lib/specs/{HybridAndroidAutoTelemetry.nitro.js → VoiceInput.nitro.js} +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JNitroLoadingManeuver.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include <fbjni/fbjni.h>
|
|
11
|
+
#include "NitroLoadingManeuver.hpp"
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
16
|
+
|
|
17
|
+
using namespace facebook;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The C++ JNI bridge between the C++ struct "NitroLoadingManeuver" and the the Kotlin data class "NitroLoadingManeuver".
|
|
21
|
+
*/
|
|
22
|
+
struct JNitroLoadingManeuver final: public jni::JavaClass<JNitroLoadingManeuver> {
|
|
23
|
+
public:
|
|
24
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/NitroLoadingManeuver;";
|
|
25
|
+
|
|
26
|
+
public:
|
|
27
|
+
/**
|
|
28
|
+
* Convert this Java/Kotlin-based struct to the C++ struct NitroLoadingManeuver by copying all values to C++.
|
|
29
|
+
*/
|
|
30
|
+
[[maybe_unused]]
|
|
31
|
+
[[nodiscard]]
|
|
32
|
+
NitroLoadingManeuver toCpp() const {
|
|
33
|
+
static const auto clazz = javaClassStatic();
|
|
34
|
+
static const auto fieldIsLoading = clazz->getField<jboolean>("isLoading");
|
|
35
|
+
jboolean isLoading = this->getFieldValue(fieldIsLoading);
|
|
36
|
+
return NitroLoadingManeuver(
|
|
37
|
+
static_cast<bool>(isLoading)
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public:
|
|
42
|
+
/**
|
|
43
|
+
* Create a Java/Kotlin-based struct by copying all values from the given C++ struct to Java.
|
|
44
|
+
*/
|
|
45
|
+
[[maybe_unused]]
|
|
46
|
+
static jni::local_ref<JNitroLoadingManeuver::javaobject> fromCpp(const NitroLoadingManeuver& value) {
|
|
47
|
+
using JSignature = JNitroLoadingManeuver(jboolean);
|
|
48
|
+
static const auto clazz = javaClassStatic();
|
|
49
|
+
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
50
|
+
return create(
|
|
51
|
+
clazz,
|
|
52
|
+
value.isLoading
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
11
11
|
/**
|
|
12
|
-
* Converts JNitroManeuver to std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver>
|
|
12
|
+
* Converts JNitroManeuver to std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver>
|
|
13
13
|
*/
|
|
14
|
-
std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver> JNitroManeuver::toCpp() const {
|
|
14
|
+
std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver> JNitroManeuver::toCpp() const {
|
|
15
15
|
if (isInstanceOf(JNitroManeuver_impl::First::javaClassStatic())) {
|
|
16
16
|
// It's a `std::vector<NitroRoutingManeuver>`
|
|
17
17
|
auto jniValue = static_cast<const JNitroManeuver_impl::First*>(this)->getValue();
|
|
@@ -29,6 +29,10 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
29
29
|
// It's a `NitroMessageManeuver`
|
|
30
30
|
auto jniValue = static_cast<const JNitroManeuver_impl::Second*>(this)->getValue();
|
|
31
31
|
return jniValue->toCpp();
|
|
32
|
+
} else if (isInstanceOf(JNitroManeuver_impl::Third::javaClassStatic())) {
|
|
33
|
+
// It's a `NitroLoadingManeuver`
|
|
34
|
+
auto jniValue = static_cast<const JNitroManeuver_impl::Third*>(this)->getValue();
|
|
35
|
+
return jniValue->toCpp();
|
|
32
36
|
}
|
|
33
37
|
throw std::invalid_argument("Variant is unknown Kotlin instance!");
|
|
34
38
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
#include "NitroRoutingManeuver.hpp"
|
|
14
14
|
#include <vector>
|
|
15
15
|
#include "NitroMessageManeuver.hpp"
|
|
16
|
+
#include "NitroLoadingManeuver.hpp"
|
|
16
17
|
#include <variant>
|
|
17
18
|
#include "JNitroRoutingManeuver.hpp"
|
|
18
19
|
#include "NitroAttributedString.hpp"
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
#include "ManeuverType.hpp"
|
|
62
63
|
#include "JManeuverType.hpp"
|
|
63
64
|
#include "JNitroMessageManeuver.hpp"
|
|
65
|
+
#include "JNitroLoadingManeuver.hpp"
|
|
64
66
|
|
|
65
67
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
66
68
|
|
|
@@ -81,8 +83,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
81
83
|
static const auto method = javaClassStatic()->getStaticMethod<JNitroManeuver(jni::alias_ref<JNitroMessageManeuver>)>("create");
|
|
82
84
|
return method(javaClassStatic(), value);
|
|
83
85
|
}
|
|
86
|
+
static jni::local_ref<JNitroManeuver> create_2(jni::alias_ref<JNitroLoadingManeuver> value) {
|
|
87
|
+
static const auto method = javaClassStatic()->getStaticMethod<JNitroManeuver(jni::alias_ref<JNitroLoadingManeuver>)>("create");
|
|
88
|
+
return method(javaClassStatic(), value);
|
|
89
|
+
}
|
|
84
90
|
|
|
85
|
-
static jni::local_ref<JNitroManeuver> fromCpp(const std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver>& variant) {
|
|
91
|
+
static jni::local_ref<JNitroManeuver> fromCpp(const std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver>& variant) {
|
|
86
92
|
switch (variant.index()) {
|
|
87
93
|
case 0: return create_0([&]() {
|
|
88
94
|
size_t __size = std::get<0>(variant).size();
|
|
@@ -95,11 +101,12 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
95
101
|
return __array;
|
|
96
102
|
}());
|
|
97
103
|
case 1: return create_1(JNitroMessageManeuver::fromCpp(std::get<1>(variant)));
|
|
104
|
+
case 2: return create_2(JNitroLoadingManeuver::fromCpp(std::get<2>(variant)));
|
|
98
105
|
default: throw std::invalid_argument("Variant holds unknown index! (" + std::to_string(variant.index()) + ")");
|
|
99
106
|
}
|
|
100
107
|
}
|
|
101
108
|
|
|
102
|
-
[[nodiscard]] std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver> toCpp() const;
|
|
109
|
+
[[nodiscard]] std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver> toCpp() const;
|
|
103
110
|
};
|
|
104
111
|
|
|
105
112
|
namespace JNitroManeuver_impl {
|
|
@@ -122,5 +129,15 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
122
129
|
return getFieldValue(field);
|
|
123
130
|
}
|
|
124
131
|
};
|
|
132
|
+
|
|
133
|
+
class Third: public jni::JavaClass<Third, JNitroManeuver> {
|
|
134
|
+
public:
|
|
135
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/NitroManeuver$Third;";
|
|
136
|
+
|
|
137
|
+
[[nodiscard]] jni::local_ref<JNitroLoadingManeuver> getValue() const {
|
|
138
|
+
static const auto field = javaClassStatic()->getField<JNitroLoadingManeuver>("value");
|
|
139
|
+
return getFieldValue(field);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
125
142
|
} // namespace JNitroManeuver_impl
|
|
126
143
|
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__optional_Location__std__optional_std__string_.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.swe.iternio.reactnativeautoplay
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.jni.HybridData
|
|
12
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
13
|
+
import dalvik.annotation.optimization.FastNative
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Represents the JavaScript callback `(coordinates: optional, query: optional) => void`.
|
|
18
|
+
* This can be either implemented in C++ (in which case it might be a callback coming from JS),
|
|
19
|
+
* or in Kotlin/Java (in which case it is a native callback).
|
|
20
|
+
*/
|
|
21
|
+
@DoNotStrip
|
|
22
|
+
@Keep
|
|
23
|
+
@Suppress("ClassName", "RedundantUnitReturnType")
|
|
24
|
+
fun interface Func_void_std__optional_Location__std__optional_std__string_: (Location?, String?) -> Unit {
|
|
25
|
+
/**
|
|
26
|
+
* Call the given JS callback.
|
|
27
|
+
* @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
|
|
28
|
+
*/
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
override fun invoke(coordinates: Location?, query: String?): Unit
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Represents the JavaScript callback `(coordinates: optional, query: optional) => void`.
|
|
36
|
+
* This is implemented in C++, via a `std::function<...>`.
|
|
37
|
+
* The callback might be coming from JS.
|
|
38
|
+
*/
|
|
39
|
+
@DoNotStrip
|
|
40
|
+
@Keep
|
|
41
|
+
@Suppress(
|
|
42
|
+
"KotlinJniMissingFunction", "unused",
|
|
43
|
+
"RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
|
|
44
|
+
"ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
|
|
45
|
+
)
|
|
46
|
+
class Func_void_std__optional_Location__std__optional_std__string__cxx: Func_void_std__optional_Location__std__optional_std__string_ {
|
|
47
|
+
@DoNotStrip
|
|
48
|
+
@Keep
|
|
49
|
+
private val mHybridData: HybridData
|
|
50
|
+
|
|
51
|
+
@DoNotStrip
|
|
52
|
+
@Keep
|
|
53
|
+
private constructor(hybridData: HybridData) {
|
|
54
|
+
mHybridData = hybridData
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@DoNotStrip
|
|
58
|
+
@Keep
|
|
59
|
+
override fun invoke(coordinates: Location?, query: String?): Unit
|
|
60
|
+
= invoke_cxx(coordinates,query)
|
|
61
|
+
|
|
62
|
+
@FastNative
|
|
63
|
+
private external fun invoke_cxx(coordinates: Location?, query: String?): Unit
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Represents the JavaScript callback `(coordinates: optional, query: optional) => void`.
|
|
68
|
+
* This is implemented in Java/Kotlin, via a `(Location?, String?) -> Unit`.
|
|
69
|
+
* The callback is always coming from native.
|
|
70
|
+
*/
|
|
71
|
+
@DoNotStrip
|
|
72
|
+
@Keep
|
|
73
|
+
@Suppress("ClassName", "RedundantUnitReturnType", "unused")
|
|
74
|
+
class Func_void_std__optional_Location__std__optional_std__string__java(private val function: (Location?, String?) -> Unit): Func_void_std__optional_Location__std__optional_std__string_ {
|
|
75
|
+
@DoNotStrip
|
|
76
|
+
@Keep
|
|
77
|
+
override fun invoke(coordinates: Location?, query: String?): Unit {
|
|
78
|
+
return this.function(coordinates, query)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -64,6 +64,15 @@ abstract class HybridAutoPlaySpec: HybridObject() {
|
|
|
64
64
|
return Func_void_java(__result)
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
abstract fun addListenerVoiceInput(callback: (coordinates: Location?, query: String?) -> Unit): () -> Unit
|
|
68
|
+
|
|
69
|
+
@DoNotStrip
|
|
70
|
+
@Keep
|
|
71
|
+
private fun addListenerVoiceInput_cxx(callback: Func_void_std__optional_Location__std__optional_std__string_): Func_void {
|
|
72
|
+
val __result = addListenerVoiceInput(callback)
|
|
73
|
+
return Func_void_java(__result)
|
|
74
|
+
}
|
|
75
|
+
|
|
67
76
|
@DoNotStrip
|
|
68
77
|
@Keep
|
|
69
78
|
abstract fun setRootTemplate(templateId: String): Promise<Unit>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Location.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.swe.iternio.reactnativeautoplay
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "Location".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class Location(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val lat: Double,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val lon: Double
|
|
26
|
+
) {
|
|
27
|
+
/* primary constructor */
|
|
28
|
+
|
|
29
|
+
private companion object {
|
|
30
|
+
/**
|
|
31
|
+
* Constructor called from C++
|
|
32
|
+
*/
|
|
33
|
+
@DoNotStrip
|
|
34
|
+
@Keep
|
|
35
|
+
@Suppress("unused")
|
|
36
|
+
@JvmStatic
|
|
37
|
+
private fun fromCpp(lat: Double, lon: Double): Location {
|
|
38
|
+
return Location(lat, lon)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// NitroLoadingManeuver.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2025 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
package com.margelo.nitro.swe.iternio.reactnativeautoplay
|
|
9
|
+
|
|
10
|
+
import androidx.annotation.Keep
|
|
11
|
+
import com.facebook.proguard.annotations.DoNotStrip
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Represents the JavaScript object/struct "NitroLoadingManeuver".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class NitroLoadingManeuver(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val isLoading: Boolean
|
|
23
|
+
) {
|
|
24
|
+
/* primary constructor */
|
|
25
|
+
|
|
26
|
+
private companion object {
|
|
27
|
+
/**
|
|
28
|
+
* Constructor called from C++
|
|
29
|
+
*/
|
|
30
|
+
@DoNotStrip
|
|
31
|
+
@Keep
|
|
32
|
+
@Suppress("unused")
|
|
33
|
+
@JvmStatic
|
|
34
|
+
private fun fromCpp(isLoading: Boolean): NitroLoadingManeuver {
|
|
35
|
+
return NitroLoadingManeuver(isLoading)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -11,7 +11,7 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the TypeScript variant "Array<NitroRoutingManeuver> | NitroMessageManeuver".
|
|
14
|
+
* Represents the TypeScript variant "Array<NitroRoutingManeuver> | NitroMessageManeuver | NitroLoadingManeuver".
|
|
15
15
|
*/
|
|
16
16
|
@Suppress("ClassName")
|
|
17
17
|
@DoNotStrip
|
|
@@ -20,17 +20,22 @@ sealed class NitroManeuver {
|
|
|
20
20
|
data class First(@DoNotStrip val value: Array<NitroRoutingManeuver>): NitroManeuver()
|
|
21
21
|
@DoNotStrip
|
|
22
22
|
data class Second(@DoNotStrip val value: NitroMessageManeuver): NitroManeuver()
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
data class Third(@DoNotStrip val value: NitroLoadingManeuver): NitroManeuver()
|
|
23
25
|
|
|
24
26
|
@Deprecated("getAs() is not type-safe. Use fold/asFirstOrNull/asSecondOrNull instead.", level = DeprecationLevel.ERROR)
|
|
25
27
|
inline fun <reified T> getAs(): T? = when (this) {
|
|
26
28
|
is First -> value as? T
|
|
27
29
|
is Second -> value as? T
|
|
30
|
+
is Third -> value as? T
|
|
28
31
|
}
|
|
29
32
|
|
|
30
33
|
val isFirst: Boolean
|
|
31
34
|
get() = this is First
|
|
32
35
|
val isSecond: Boolean
|
|
33
36
|
get() = this is Second
|
|
37
|
+
val isThird: Boolean
|
|
38
|
+
get() = this is Third
|
|
34
39
|
|
|
35
40
|
fun asFirstOrNull(): Array<NitroRoutingManeuver>? {
|
|
36
41
|
val value = (this as? First)?.value ?: return null
|
|
@@ -40,11 +45,16 @@ sealed class NitroManeuver {
|
|
|
40
45
|
val value = (this as? Second)?.value ?: return null
|
|
41
46
|
return value
|
|
42
47
|
}
|
|
48
|
+
fun asThirdOrNull(): NitroLoadingManeuver? {
|
|
49
|
+
val value = (this as? Third)?.value ?: return null
|
|
50
|
+
return value
|
|
51
|
+
}
|
|
43
52
|
|
|
44
|
-
inline fun <R> match(first: (Array<NitroRoutingManeuver>) -> R, second: (NitroMessageManeuver) -> R): R {
|
|
53
|
+
inline fun <R> match(first: (Array<NitroRoutingManeuver>) -> R, second: (NitroMessageManeuver) -> R, third: (NitroLoadingManeuver) -> R): R {
|
|
45
54
|
return when (this) {
|
|
46
55
|
is First -> first(value)
|
|
47
56
|
is Second -> second(value)
|
|
57
|
+
is Third -> third(value)
|
|
48
58
|
}
|
|
49
59
|
}
|
|
50
60
|
|
|
@@ -55,5 +65,8 @@ sealed class NitroManeuver {
|
|
|
55
65
|
@JvmStatic
|
|
56
66
|
@DoNotStrip
|
|
57
67
|
fun create(value: NitroMessageManeuver): NitroManeuver = Second(value)
|
|
68
|
+
@JvmStatic
|
|
69
|
+
@DoNotStrip
|
|
70
|
+
fun create(value: NitroLoadingManeuver): NitroManeuver = Third(value)
|
|
58
71
|
}
|
|
59
72
|
}
|
|
@@ -37,6 +37,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
|
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
// pragma MARK: std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>
|
|
41
|
+
Func_void_std__optional_Location__std__optional_std__string_ create_Func_void_std__optional_Location__std__optional_std__string_(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
42
|
+
auto swiftClosure = ReactNativeAutoPlay::Func_void_std__optional_Location__std__optional_std__string_::fromUnsafe(swiftClosureWrapper);
|
|
43
|
+
return [swiftClosure = std::move(swiftClosure)](const std::optional<Location>& coordinates, const std::optional<std::string>& query) mutable -> void {
|
|
44
|
+
swiftClosure.call(coordinates, query);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
// pragma MARK: std::function<void(const std::exception_ptr& /* error */)>
|
|
41
49
|
Func_void_std__exception_ptr create_Func_void_std__exception_ptr(void* NON_NULL swiftClosureWrapper) noexcept {
|
|
42
50
|
auto swiftClosure = ReactNativeAutoPlay::Func_void_std__exception_ptr::fromUnsafe(swiftClosureWrapper);
|
|
@@ -52,6 +52,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct ImageLane;
|
|
|
52
52
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class KeepType; }
|
|
53
53
|
// Forward declaration of `LaneGuidance` to properly resolve imports.
|
|
54
54
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct LaneGuidance; }
|
|
55
|
+
// Forward declaration of `Location` to properly resolve imports.
|
|
56
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct Location; }
|
|
55
57
|
// Forward declaration of `ManeuverType` to properly resolve imports.
|
|
56
58
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ManeuverType; }
|
|
57
59
|
// Forward declaration of `NavigationAlertAction` to properly resolve imports.
|
|
@@ -76,6 +78,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroCarPla
|
|
|
76
78
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
77
79
|
// Forward declaration of `NitroGridButton` to properly resolve imports.
|
|
78
80
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroGridButton; }
|
|
81
|
+
// Forward declaration of `NitroLoadingManeuver` to properly resolve imports.
|
|
82
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroLoadingManeuver; }
|
|
79
83
|
// Forward declaration of `NitroMapButtonType` to properly resolve imports.
|
|
80
84
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMapButtonType; }
|
|
81
85
|
// Forward declaration of `NitroMapButton` to properly resolve imports.
|
|
@@ -164,6 +168,7 @@ namespace ReactNativeAutoPlay { class HybridSearchTemplateSpec_cxx; }
|
|
|
164
168
|
#include "ImageLane.hpp"
|
|
165
169
|
#include "KeepType.hpp"
|
|
166
170
|
#include "LaneGuidance.hpp"
|
|
171
|
+
#include "Location.hpp"
|
|
167
172
|
#include "ManeuverType.hpp"
|
|
168
173
|
#include "NavigationAlertAction.hpp"
|
|
169
174
|
#include "NitroAction.hpp"
|
|
@@ -176,6 +181,7 @@ namespace ReactNativeAutoPlay { class HybridSearchTemplateSpec_cxx; }
|
|
|
176
181
|
#include "NitroCarPlayDashboardButton.hpp"
|
|
177
182
|
#include "NitroColor.hpp"
|
|
178
183
|
#include "NitroGridButton.hpp"
|
|
184
|
+
#include "NitroLoadingManeuver.hpp"
|
|
179
185
|
#include "NitroMapButton.hpp"
|
|
180
186
|
#include "NitroMapButtonType.hpp"
|
|
181
187
|
#include "NitroMessageManeuver.hpp"
|
|
@@ -259,6 +265,58 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
|
|
|
259
265
|
return Func_void_VisibilityState_Wrapper(std::move(value));
|
|
260
266
|
}
|
|
261
267
|
|
|
268
|
+
// pragma MARK: std::optional<Location>
|
|
269
|
+
/**
|
|
270
|
+
* Specialized version of `std::optional<Location>`.
|
|
271
|
+
*/
|
|
272
|
+
using std__optional_Location_ = std::optional<Location>;
|
|
273
|
+
inline std::optional<Location> create_std__optional_Location_(const Location& value) noexcept {
|
|
274
|
+
return std::optional<Location>(value);
|
|
275
|
+
}
|
|
276
|
+
inline bool has_value_std__optional_Location_(const std::optional<Location>& optional) noexcept {
|
|
277
|
+
return optional.has_value();
|
|
278
|
+
}
|
|
279
|
+
inline Location get_std__optional_Location_(const std::optional<Location>& optional) noexcept {
|
|
280
|
+
return *optional;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// pragma MARK: std::optional<std::string>
|
|
284
|
+
/**
|
|
285
|
+
* Specialized version of `std::optional<std::string>`.
|
|
286
|
+
*/
|
|
287
|
+
using std__optional_std__string_ = std::optional<std::string>;
|
|
288
|
+
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
289
|
+
return std::optional<std::string>(value);
|
|
290
|
+
}
|
|
291
|
+
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
292
|
+
return optional.has_value();
|
|
293
|
+
}
|
|
294
|
+
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
295
|
+
return *optional;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// pragma MARK: std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>
|
|
299
|
+
/**
|
|
300
|
+
* Specialized version of `std::function<void(const std::optional<Location>&, const std::optional<std::string>&)>`.
|
|
301
|
+
*/
|
|
302
|
+
using Func_void_std__optional_Location__std__optional_std__string_ = std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>;
|
|
303
|
+
/**
|
|
304
|
+
* Wrapper class for a `std::function<void(const std::optional<Location>& / * coordinates * /, const std::optional<std::string>& / * query * /)>`, this can be used from Swift.
|
|
305
|
+
*/
|
|
306
|
+
class Func_void_std__optional_Location__std__optional_std__string__Wrapper final {
|
|
307
|
+
public:
|
|
308
|
+
explicit Func_void_std__optional_Location__std__optional_std__string__Wrapper(std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>&& func): _function(std::make_unique<std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>>(std::move(func))) {}
|
|
309
|
+
inline void call(std::optional<Location> coordinates, std::optional<std::string> query) const noexcept {
|
|
310
|
+
_function->operator()(coordinates, query);
|
|
311
|
+
}
|
|
312
|
+
private:
|
|
313
|
+
std::unique_ptr<std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>> _function;
|
|
314
|
+
} SWIFT_NONCOPYABLE;
|
|
315
|
+
Func_void_std__optional_Location__std__optional_std__string_ create_Func_void_std__optional_Location__std__optional_std__string_(void* NON_NULL swiftClosureWrapper) noexcept;
|
|
316
|
+
inline Func_void_std__optional_Location__std__optional_std__string__Wrapper wrap_Func_void_std__optional_Location__std__optional_std__string_(Func_void_std__optional_Location__std__optional_std__string_ value) noexcept {
|
|
317
|
+
return Func_void_std__optional_Location__std__optional_std__string__Wrapper(std::move(value));
|
|
318
|
+
}
|
|
319
|
+
|
|
262
320
|
// pragma MARK: std::shared_ptr<Promise<void>>
|
|
263
321
|
/**
|
|
264
322
|
* Specialized version of `std::shared_ptr<Promise<void>>`.
|
|
@@ -330,21 +388,6 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
|
|
|
330
388
|
return Func_void_SafeAreaInsets_Wrapper(std::move(value));
|
|
331
389
|
}
|
|
332
390
|
|
|
333
|
-
// pragma MARK: std::optional<std::string>
|
|
334
|
-
/**
|
|
335
|
-
* Specialized version of `std::optional<std::string>`.
|
|
336
|
-
*/
|
|
337
|
-
using std__optional_std__string_ = std::optional<std::string>;
|
|
338
|
-
inline std::optional<std::string> create_std__optional_std__string_(const std::string& value) noexcept {
|
|
339
|
-
return std::optional<std::string>(value);
|
|
340
|
-
}
|
|
341
|
-
inline bool has_value_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
342
|
-
return optional.has_value();
|
|
343
|
-
}
|
|
344
|
-
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
345
|
-
return *optional;
|
|
346
|
-
}
|
|
347
|
-
|
|
348
391
|
// pragma MARK: std::optional<double>
|
|
349
392
|
/**
|
|
350
393
|
* Specialized version of `std::optional<double>`.
|
|
@@ -1435,16 +1478,16 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
|
|
|
1435
1478
|
return vector;
|
|
1436
1479
|
}
|
|
1437
1480
|
|
|
1438
|
-
// pragma MARK: std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver>
|
|
1481
|
+
// pragma MARK: std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver>
|
|
1439
1482
|
/**
|
|
1440
|
-
* Wrapper struct for `std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver>`.
|
|
1483
|
+
* Wrapper struct for `std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver>`.
|
|
1441
1484
|
* std::variant cannot be used in Swift because of a Swift bug.
|
|
1442
1485
|
* Not even specializing it works. So we create a wrapper struct.
|
|
1443
1486
|
*/
|
|
1444
|
-
struct
|
|
1445
|
-
std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver> variant;
|
|
1446
|
-
|
|
1447
|
-
operator std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver>() const noexcept {
|
|
1487
|
+
struct std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_ {
|
|
1488
|
+
std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver> variant;
|
|
1489
|
+
std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_(std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver> variant): variant(variant) { }
|
|
1490
|
+
operator std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver>() const noexcept {
|
|
1448
1491
|
return variant;
|
|
1449
1492
|
}
|
|
1450
1493
|
inline size_t index() const noexcept {
|
|
@@ -1456,12 +1499,18 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay::bridge::swift {
|
|
|
1456
1499
|
inline NitroMessageManeuver get_1() const noexcept {
|
|
1457
1500
|
return std::get<1>(variant);
|
|
1458
1501
|
}
|
|
1502
|
+
inline NitroLoadingManeuver get_2() const noexcept {
|
|
1503
|
+
return std::get<2>(variant);
|
|
1504
|
+
}
|
|
1459
1505
|
};
|
|
1460
|
-
inline
|
|
1461
|
-
return
|
|
1506
|
+
inline std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_ create_std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_(const std::vector<NitroRoutingManeuver>& value) noexcept {
|
|
1507
|
+
return std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_(value);
|
|
1508
|
+
}
|
|
1509
|
+
inline std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_ create_std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_(const NitroMessageManeuver& value) noexcept {
|
|
1510
|
+
return std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_(value);
|
|
1462
1511
|
}
|
|
1463
|
-
inline
|
|
1464
|
-
return
|
|
1512
|
+
inline std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_ create_std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_(const NitroLoadingManeuver& value) noexcept {
|
|
1513
|
+
return std__variant_std__vector_NitroRoutingManeuver___NitroMessageManeuver__NitroLoadingManeuver_(value);
|
|
1465
1514
|
}
|
|
1466
1515
|
|
|
1467
1516
|
// pragma MARK: std::shared_ptr<HybridMapTemplateSpec>
|
|
@@ -62,6 +62,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class KeepTyp
|
|
|
62
62
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct LaneGuidance; }
|
|
63
63
|
// Forward declaration of `ListTemplateConfig` to properly resolve imports.
|
|
64
64
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct ListTemplateConfig; }
|
|
65
|
+
// Forward declaration of `Location` to properly resolve imports.
|
|
66
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct Location; }
|
|
65
67
|
// Forward declaration of `ManeuverType` to properly resolve imports.
|
|
66
68
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ManeuverType; }
|
|
67
69
|
// Forward declaration of `MapTemplateConfig` to properly resolve imports.
|
|
@@ -90,6 +92,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroCarPla
|
|
|
90
92
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
91
93
|
// Forward declaration of `NitroGridButton` to properly resolve imports.
|
|
92
94
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroGridButton; }
|
|
95
|
+
// Forward declaration of `NitroLoadingManeuver` to properly resolve imports.
|
|
96
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroLoadingManeuver; }
|
|
93
97
|
// Forward declaration of `NitroMapButtonType` to properly resolve imports.
|
|
94
98
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMapButtonType; }
|
|
95
99
|
// Forward declaration of `NitroMapButton` to properly resolve imports.
|
|
@@ -171,6 +175,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ZoomEve
|
|
|
171
175
|
#include "KeepType.hpp"
|
|
172
176
|
#include "LaneGuidance.hpp"
|
|
173
177
|
#include "ListTemplateConfig.hpp"
|
|
178
|
+
#include "Location.hpp"
|
|
174
179
|
#include "ManeuverType.hpp"
|
|
175
180
|
#include "MapTemplateConfig.hpp"
|
|
176
181
|
#include "MessageTemplateConfig.hpp"
|
|
@@ -185,6 +190,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ZoomEve
|
|
|
185
190
|
#include "NitroCarPlayDashboardButton.hpp"
|
|
186
191
|
#include "NitroColor.hpp"
|
|
187
192
|
#include "NitroGridButton.hpp"
|
|
193
|
+
#include "NitroLoadingManeuver.hpp"
|
|
188
194
|
#include "NitroMapButton.hpp"
|
|
189
195
|
#include "NitroMapButtonType.hpp"
|
|
190
196
|
#include "NitroMessageManeuver.hpp"
|
|
@@ -16,6 +16,8 @@ namespace ReactNativeAutoPlay { class HybridAutoPlaySpec_cxx; }
|
|
|
16
16
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class EventName; }
|
|
17
17
|
// Forward declaration of `VisibilityState` to properly resolve imports.
|
|
18
18
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class VisibilityState; }
|
|
19
|
+
// Forward declaration of `Location` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct Location; }
|
|
19
21
|
// Forward declaration of `SafeAreaInsets` to properly resolve imports.
|
|
20
22
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct SafeAreaInsets; }
|
|
21
23
|
// Forward declaration of `NitroAction` to properly resolve imports.
|
|
@@ -37,8 +39,9 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
|
|
|
37
39
|
#include "EventName.hpp"
|
|
38
40
|
#include <string>
|
|
39
41
|
#include "VisibilityState.hpp"
|
|
40
|
-
#include
|
|
42
|
+
#include "Location.hpp"
|
|
41
43
|
#include <optional>
|
|
44
|
+
#include <NitroModules/Promise.hpp>
|
|
42
45
|
#include "SafeAreaInsets.hpp"
|
|
43
46
|
#include "NitroAction.hpp"
|
|
44
47
|
#include <vector>
|
|
@@ -110,6 +113,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
110
113
|
auto __value = std::move(__result.value());
|
|
111
114
|
return __value;
|
|
112
115
|
}
|
|
116
|
+
inline std::function<void()> addListenerVoiceInput(const std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>& callback) override {
|
|
117
|
+
auto __result = _swiftPart.addListenerVoiceInput(callback);
|
|
118
|
+
if (__result.hasError()) [[unlikely]] {
|
|
119
|
+
std::rethrow_exception(__result.error());
|
|
120
|
+
}
|
|
121
|
+
auto __value = std::move(__result.value());
|
|
122
|
+
return __value;
|
|
123
|
+
}
|
|
113
124
|
inline std::shared_ptr<Promise<void>> setRootTemplate(const std::string& templateId) override {
|
|
114
125
|
auto __result = _swiftPart.setRootTemplate(templateId);
|
|
115
126
|
if (__result.hasError()) [[unlikely]] {
|
|
@@ -70,6 +70,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct TripPreview
|
|
|
70
70
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroRoutingManeuver; }
|
|
71
71
|
// Forward declaration of `NitroMessageManeuver` to properly resolve imports.
|
|
72
72
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroMessageManeuver; }
|
|
73
|
+
// Forward declaration of `NitroLoadingManeuver` to properly resolve imports.
|
|
74
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroLoadingManeuver; }
|
|
73
75
|
// Forward declaration of `NitroAttributedString` to properly resolve imports.
|
|
74
76
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAttributedString; }
|
|
75
77
|
// Forward declaration of `NitroAttributedStringImage` to properly resolve imports.
|
|
@@ -132,6 +134,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct TripConfig;
|
|
|
132
134
|
#include <NitroModules/Promise.hpp>
|
|
133
135
|
#include "NitroRoutingManeuver.hpp"
|
|
134
136
|
#include "NitroMessageManeuver.hpp"
|
|
137
|
+
#include "NitroLoadingManeuver.hpp"
|
|
135
138
|
#include "NitroAttributedString.hpp"
|
|
136
139
|
#include "NitroAttributedStringImage.hpp"
|
|
137
140
|
#include "TurnType.hpp"
|
|
@@ -248,7 +251,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
248
251
|
std::rethrow_exception(__result.error());
|
|
249
252
|
}
|
|
250
253
|
}
|
|
251
|
-
inline void updateManeuvers(const std::string& templateId, const std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver>& maneuvers) override {
|
|
254
|
+
inline void updateManeuvers(const std::string& templateId, const std::variant<std::vector<NitroRoutingManeuver>, NitroMessageManeuver, NitroLoadingManeuver>& maneuvers) override {
|
|
252
255
|
auto __result = _swiftPart.updateManeuvers(templateId, maneuvers);
|
|
253
256
|
if (__result.hasError()) [[unlikely]] {
|
|
254
257
|
std::rethrow_exception(__result.error());
|