@iternio/react-native-auto-play 0.3.11 → 0.3.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/README.md +60 -2
- package/android/src/automotive/AndroidManifest.xml +1 -0
- package/android/src/main/AndroidManifest.xml +1 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlay.kt +91 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/VoiceInputManager.kt +214 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/MapTemplate.kt +2 -1
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/Parser.kt +108 -38
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/utils/BitmapCache.kt +14 -0
- package/ios/extensions/NitroImageExtensions.swift +10 -1
- package/ios/hybrid/HybridAutoPlay.swift +51 -4
- package/ios/templates/GridTemplate.swift +7 -0
- package/ios/templates/MapTemplate.swift +14 -0
- package/ios/templates/Parser.swift +91 -4
- package/ios/utils/VoiceInputManager.swift +233 -0
- package/lib/specs/AutoPlay.nitro.d.ts +31 -1
- package/lib/types/Image.d.ts +13 -0
- package/lib/utils/NitroImage.d.ts +6 -1
- package/lib/utils/NitroImage.js +7 -0
- package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +1 -1
- package/nitrogen/generated/android/c++/JGridTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.cpp +48 -1
- package/nitrogen/generated/android/c++/JHybridAutoPlaySpec.hpp +4 -0
- package/nitrogen/generated/android/c++/JHybridClusterSpec.cpp +4 -0
- package/nitrogen/generated/android/c++/JHybridGridTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridInformationTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridListTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridMapTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridMessageTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridSearchTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridSignInTemplateSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JImageLane.hpp +2 -0
- package/nitrogen/generated/android/c++/JInformationTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JLaneGuidance.hpp +2 -0
- package/nitrogen/generated/android/c++/JListTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JMapTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JMessageTemplateConfig.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroAction.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroAttributedString.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroAttributedStringImage.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroBaseMapTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JNitroGridButton.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroImage.cpp +6 -2
- package/nitrogen/generated/android/c++/JNitroImage.hpp +19 -2
- package/nitrogen/generated/android/c++/JNitroManeuver.hpp +3 -1
- package/nitrogen/generated/android/c++/JNitroMapButton.hpp +2 -0
- package/nitrogen/generated/android/c++/JNitroMessageManeuver.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroNavigationAlert.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroRoutingManeuver.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroRow.hpp +7 -5
- package/nitrogen/generated/android/c++/JNitroSection.hpp +3 -1
- package/nitrogen/generated/android/c++/JPreferredImageLane.hpp +2 -0
- package/nitrogen/generated/android/c++/JRemoteImage.hpp +68 -0
- package/nitrogen/generated/android/c++/JSearchTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JSignInTemplateConfig.hpp +3 -1
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.cpp +30 -0
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage_RemoteImage.hpp +92 -0
- package/nitrogen/generated/android/c++/JVariant_PreferredImageLane_ImageLane.hpp +2 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAutoPlaySpec.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/MessageTemplateConfig.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroAction.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroImage.kt +14 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroMessageManeuver.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroNavigationAlert.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRoutingManeuver.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/NitroRow.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/RemoteImage.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/{Variant_GlyphImage_AssetImage.kt → Variant_GlyphImage_AssetImage_RemoteImage.kt} +20 -8
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.cpp +16 -8
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Bridge.hpp +156 -79
- package/nitrogen/generated/ios/ReactNativeAutoPlay-Swift-Cxx-Umbrella.hpp +4 -0
- package/nitrogen/generated/ios/c++/HybridAutoPlaySpecSwift.hpp +37 -0
- package/nitrogen/generated/ios/c++/HybridCarPlayDashboardSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridClusterSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridGridTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridInformationTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridListTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridMapTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridMessageTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/c++/HybridSearchTemplateSpecSwift.hpp +3 -0
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +46 -0
- package/nitrogen/generated/ios/swift/HybridAutoPlaySpec.swift +4 -0
- package/nitrogen/generated/ios/swift/HybridAutoPlaySpec_cxx.swift +82 -0
- package/nitrogen/generated/ios/swift/ImageLane.swift +9 -4
- package/nitrogen/generated/ios/swift/MessageTemplateConfig.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroAction.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroAttributedStringImage.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroCarPlayDashboardButton.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroGridButton.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroImage.swift +2 -1
- package/nitrogen/generated/ios/swift/NitroMapButton.swift +9 -4
- package/nitrogen/generated/ios/swift/NitroMessageManeuver.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroNavigationAlert.swift +16 -11
- package/nitrogen/generated/ios/swift/NitroRoutingManeuver.swift +25 -15
- package/nitrogen/generated/ios/swift/NitroRow.swift +16 -11
- package/nitrogen/generated/ios/swift/PreferredImageLane.swift +9 -4
- package/nitrogen/generated/ios/swift/RemoteImage.swift +58 -0
- package/nitrogen/generated/ios/swift/{Variant_GlyphImage_AssetImage.swift → Variant_GlyphImage_AssetImage_RemoteImage.swift} +4 -3
- package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.cpp +4 -0
- package/nitrogen/generated/shared/c++/HybridAutoPlaySpec.hpp +5 -0
- package/nitrogen/generated/shared/c++/ImageLane.hpp +8 -5
- package/nitrogen/generated/shared/c++/MessageTemplateConfig.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroAction.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroAttributedStringImage.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroCarPlayDashboardButton.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroGridButton.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroMapButton.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroMessageManeuver.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroNavigationAlert.hpp +8 -5
- package/nitrogen/generated/shared/c++/NitroRoutingManeuver.hpp +12 -9
- package/nitrogen/generated/shared/c++/NitroRow.hpp +8 -5
- package/nitrogen/generated/shared/c++/PreferredImageLane.hpp +8 -5
- package/nitrogen/generated/shared/c++/RemoteImage.hpp +94 -0
- package/package.json +1 -1
- package/src/specs/AutoPlay.nitro.ts +39 -1
- package/src/types/Image.ts +14 -0
- package/src/utils/NitroImage.ts +15 -1
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.cpp +0 -26
- package/nitrogen/generated/android/c++/JVariant_GlyphImage_AssetImage.hpp +0 -75
|
@@ -21,6 +21,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
|
|
|
21
21
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
|
|
22
22
|
// Forward declaration of `AssetImage` to properly resolve imports.
|
|
23
23
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
|
|
24
|
+
// Forward declaration of `RemoteImage` to properly resolve imports.
|
|
25
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
|
|
24
26
|
// Forward declaration of `NitroColor` to properly resolve imports.
|
|
25
27
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
26
28
|
// Forward declaration of `NitroActionType` to properly resolve imports.
|
|
@@ -35,6 +37,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
|
|
|
35
37
|
#include <NitroModules/JNICallable.hpp>
|
|
36
38
|
#include <NitroModules/Promise.hpp>
|
|
37
39
|
#include <NitroModules/JPromise.hpp>
|
|
40
|
+
#include <NitroModules/ArrayBuffer.hpp>
|
|
41
|
+
#include <NitroModules/JArrayBuffer.hpp>
|
|
38
42
|
#include <NitroModules/JUnit.hpp>
|
|
39
43
|
#include "EventName.hpp"
|
|
40
44
|
#include "JEventName.hpp"
|
|
@@ -54,12 +58,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
|
|
|
54
58
|
#include "JNitroAction.hpp"
|
|
55
59
|
#include "GlyphImage.hpp"
|
|
56
60
|
#include "AssetImage.hpp"
|
|
61
|
+
#include "RemoteImage.hpp"
|
|
57
62
|
#include <variant>
|
|
58
|
-
#include "
|
|
63
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
59
64
|
#include "JGlyphImage.hpp"
|
|
60
65
|
#include "NitroColor.hpp"
|
|
61
66
|
#include "JNitroColor.hpp"
|
|
62
67
|
#include "JAssetImage.hpp"
|
|
68
|
+
#include "JRemoteImage.hpp"
|
|
63
69
|
#include "NitroActionType.hpp"
|
|
64
70
|
#include "JNitroActionType.hpp"
|
|
65
71
|
#include "NitroAlignment.hpp"
|
|
@@ -139,6 +145,47 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
139
145
|
}
|
|
140
146
|
}();
|
|
141
147
|
}
|
|
148
|
+
bool JHybridAutoPlaySpec::hasVoiceInputPermission() {
|
|
149
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jboolean()>("hasVoiceInputPermission");
|
|
150
|
+
auto __result = method(_javaPart);
|
|
151
|
+
return static_cast<bool>(__result);
|
|
152
|
+
}
|
|
153
|
+
std::shared_ptr<Promise<bool>> JHybridAutoPlaySpec::requestVoiceInputPermission() {
|
|
154
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>()>("requestVoiceInputPermission");
|
|
155
|
+
auto __result = method(_javaPart);
|
|
156
|
+
return [&]() {
|
|
157
|
+
auto __promise = Promise<bool>::create();
|
|
158
|
+
__result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
|
|
159
|
+
auto __result = jni::static_ref_cast<jni::JBoolean>(__boxedResult);
|
|
160
|
+
__promise->resolve(static_cast<bool>(__result->value()));
|
|
161
|
+
});
|
|
162
|
+
__result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
|
|
163
|
+
jni::JniException __jniError(__throwable);
|
|
164
|
+
__promise->reject(std::make_exception_ptr(__jniError));
|
|
165
|
+
});
|
|
166
|
+
return __promise;
|
|
167
|
+
}();
|
|
168
|
+
}
|
|
169
|
+
std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> JHybridAutoPlaySpec::startVoiceInput(std::optional<double> silenceThresholdMs, std::optional<double> maxDurationMs, const std::optional<std::string>& listeningText) {
|
|
170
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<jni::JDouble> /* silenceThresholdMs */, jni::alias_ref<jni::JDouble> /* maxDurationMs */, jni::alias_ref<jni::JString> /* listeningText */)>("startVoiceInput");
|
|
171
|
+
auto __result = method(_javaPart, silenceThresholdMs.has_value() ? jni::JDouble::valueOf(silenceThresholdMs.value()) : nullptr, maxDurationMs.has_value() ? jni::JDouble::valueOf(maxDurationMs.value()) : nullptr, listeningText.has_value() ? jni::make_jstring(listeningText.value()) : nullptr);
|
|
172
|
+
return [&]() {
|
|
173
|
+
auto __promise = Promise<std::shared_ptr<ArrayBuffer>>::create();
|
|
174
|
+
__result->cthis()->addOnResolvedListener([=](const jni::alias_ref<jni::JObject>& __boxedResult) {
|
|
175
|
+
auto __result = jni::static_ref_cast<JArrayBuffer::javaobject>(__boxedResult);
|
|
176
|
+
__promise->resolve(__result->cthis()->getArrayBuffer());
|
|
177
|
+
});
|
|
178
|
+
__result->cthis()->addOnRejectedListener([=](const jni::alias_ref<jni::JThrowable>& __throwable) {
|
|
179
|
+
jni::JniException __jniError(__throwable);
|
|
180
|
+
__promise->reject(std::make_exception_ptr(__jniError));
|
|
181
|
+
});
|
|
182
|
+
return __promise;
|
|
183
|
+
}();
|
|
184
|
+
}
|
|
185
|
+
void JHybridAutoPlaySpec::stopVoiceInput() {
|
|
186
|
+
static const auto method = _javaPart->javaClassStatic()->getMethod<void()>("stopVoiceInput");
|
|
187
|
+
method(_javaPart);
|
|
188
|
+
}
|
|
142
189
|
std::shared_ptr<Promise<void>> JHybridAutoPlaySpec::setRootTemplate(const std::string& templateId) {
|
|
143
190
|
static const auto method = _javaPart->javaClassStatic()->getMethod<jni::local_ref<JPromise::javaobject>(jni::alias_ref<jni::JString> /* templateId */)>("setRootTemplate");
|
|
144
191
|
auto __result = method(_javaPart, jni::make_jstring(templateId));
|
|
@@ -57,6 +57,10 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
57
57
|
std::function<void()> addListener(EventName eventType, const std::function<void()>& callback) override;
|
|
58
58
|
std::function<void()> addListenerRenderState(const std::string& moduleName, const std::function<void(VisibilityState /* payload */)>& callback) override;
|
|
59
59
|
std::function<void()> addListenerVoiceInput(const std::function<void(const std::optional<Location>& /* coordinates */, const std::optional<std::string>& /* query */)>& callback) override;
|
|
60
|
+
bool hasVoiceInputPermission() override;
|
|
61
|
+
std::shared_ptr<Promise<bool>> requestVoiceInputPermission() override;
|
|
62
|
+
std::shared_ptr<Promise<std::shared_ptr<ArrayBuffer>>> startVoiceInput(std::optional<double> silenceThresholdMs, std::optional<double> maxDurationMs, const std::optional<std::string>& listeningText) override;
|
|
63
|
+
void stopVoiceInput() override;
|
|
60
64
|
std::shared_ptr<Promise<void>> setRootTemplate(const std::string& templateId) override;
|
|
61
65
|
std::shared_ptr<Promise<void>> pushTemplate(const std::string& templateId) override;
|
|
62
66
|
std::shared_ptr<Promise<void>> popTemplate(std::optional<bool> animate) override;
|
|
@@ -17,6 +17,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAttrib
|
|
|
17
17
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
|
|
18
18
|
// Forward declaration of `AssetImage` to properly resolve imports.
|
|
19
19
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
|
|
20
|
+
// Forward declaration of `RemoteImage` to properly resolve imports.
|
|
21
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
|
|
20
22
|
// Forward declaration of `NitroColor` to properly resolve imports.
|
|
21
23
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
22
24
|
// Forward declaration of `ColorScheme` to properly resolve imports.
|
|
@@ -42,12 +44,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class ZoomEve
|
|
|
42
44
|
#include "JNitroAttributedStringImage.hpp"
|
|
43
45
|
#include "GlyphImage.hpp"
|
|
44
46
|
#include "AssetImage.hpp"
|
|
47
|
+
#include "RemoteImage.hpp"
|
|
45
48
|
#include <variant>
|
|
46
49
|
#include "JNitroImage.hpp"
|
|
47
50
|
#include "JGlyphImage.hpp"
|
|
48
51
|
#include "NitroColor.hpp"
|
|
49
52
|
#include "JNitroColor.hpp"
|
|
50
53
|
#include "JAssetImage.hpp"
|
|
54
|
+
#include "JRemoteImage.hpp"
|
|
51
55
|
#include "ColorScheme.hpp"
|
|
52
56
|
#include "JFunc_void_std__string_ColorScheme.hpp"
|
|
53
57
|
#include "JColorScheme.hpp"
|
|
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
|
|
|
15
15
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
|
|
16
16
|
// Forward declaration of `AssetImage` to properly resolve imports.
|
|
17
17
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
|
|
18
|
+
// Forward declaration of `RemoteImage` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
|
|
18
20
|
// Forward declaration of `NitroColor` to properly resolve imports.
|
|
19
21
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
20
22
|
// Forward declaration of `NitroActionType` to properly resolve imports.
|
|
@@ -54,12 +56,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
|
|
|
54
56
|
#include "JNitroAction.hpp"
|
|
55
57
|
#include "GlyphImage.hpp"
|
|
56
58
|
#include "AssetImage.hpp"
|
|
59
|
+
#include "RemoteImage.hpp"
|
|
57
60
|
#include <variant>
|
|
58
|
-
#include "
|
|
61
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
59
62
|
#include "JGlyphImage.hpp"
|
|
60
63
|
#include "NitroColor.hpp"
|
|
61
64
|
#include "JNitroColor.hpp"
|
|
62
65
|
#include "JAssetImage.hpp"
|
|
66
|
+
#include "JRemoteImage.hpp"
|
|
63
67
|
#include "NitroActionType.hpp"
|
|
64
68
|
#include "JNitroActionType.hpp"
|
|
65
69
|
#include "NitroAlignment.hpp"
|
|
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
|
|
|
15
15
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
|
|
16
16
|
// Forward declaration of `AssetImage` to properly resolve imports.
|
|
17
17
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
|
|
18
|
+
// Forward declaration of `RemoteImage` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
|
|
18
20
|
// Forward declaration of `NitroColor` to properly resolve imports.
|
|
19
21
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
20
22
|
// Forward declaration of `NitroActionType` to properly resolve imports.
|
|
@@ -58,12 +60,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
|
|
|
58
60
|
#include "JNitroAction.hpp"
|
|
59
61
|
#include "GlyphImage.hpp"
|
|
60
62
|
#include "AssetImage.hpp"
|
|
63
|
+
#include "RemoteImage.hpp"
|
|
61
64
|
#include <variant>
|
|
62
|
-
#include "
|
|
65
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
63
66
|
#include "JGlyphImage.hpp"
|
|
64
67
|
#include "NitroColor.hpp"
|
|
65
68
|
#include "JNitroColor.hpp"
|
|
66
69
|
#include "JAssetImage.hpp"
|
|
70
|
+
#include "JRemoteImage.hpp"
|
|
67
71
|
#include "NitroActionType.hpp"
|
|
68
72
|
#include "JNitroActionType.hpp"
|
|
69
73
|
#include "NitroAlignment.hpp"
|
|
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
|
|
|
15
15
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
|
|
16
16
|
// Forward declaration of `AssetImage` to properly resolve imports.
|
|
17
17
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
|
|
18
|
+
// Forward declaration of `RemoteImage` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
|
|
18
20
|
// Forward declaration of `NitroColor` to properly resolve imports.
|
|
19
21
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
20
22
|
// Forward declaration of `NitroActionType` to properly resolve imports.
|
|
@@ -58,12 +60,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
|
|
|
58
60
|
#include "JNitroAction.hpp"
|
|
59
61
|
#include "GlyphImage.hpp"
|
|
60
62
|
#include "AssetImage.hpp"
|
|
63
|
+
#include "RemoteImage.hpp"
|
|
61
64
|
#include <variant>
|
|
62
|
-
#include "
|
|
65
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
63
66
|
#include "JGlyphImage.hpp"
|
|
64
67
|
#include "NitroColor.hpp"
|
|
65
68
|
#include "JNitroColor.hpp"
|
|
66
69
|
#include "JAssetImage.hpp"
|
|
70
|
+
#include "JRemoteImage.hpp"
|
|
67
71
|
#include "NitroActionType.hpp"
|
|
68
72
|
#include "JNitroActionType.hpp"
|
|
69
73
|
#include "NitroAlignment.hpp"
|
|
@@ -25,6 +25,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
|
|
|
25
25
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
|
|
26
26
|
// Forward declaration of `AssetImage` to properly resolve imports.
|
|
27
27
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
|
|
28
|
+
// Forward declaration of `RemoteImage` to properly resolve imports.
|
|
29
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
|
|
28
30
|
// Forward declaration of `NitroColor` to properly resolve imports.
|
|
29
31
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
30
32
|
// Forward declaration of `NitroAction` to properly resolve imports.
|
|
@@ -127,15 +129,17 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class Maneuve
|
|
|
127
129
|
#include "JNitroMapButtonType.hpp"
|
|
128
130
|
#include "GlyphImage.hpp"
|
|
129
131
|
#include "AssetImage.hpp"
|
|
132
|
+
#include "RemoteImage.hpp"
|
|
130
133
|
#include <variant>
|
|
131
134
|
#include "JNitroImage.hpp"
|
|
132
135
|
#include "JGlyphImage.hpp"
|
|
133
136
|
#include "NitroColor.hpp"
|
|
134
137
|
#include "JNitroColor.hpp"
|
|
135
138
|
#include "JAssetImage.hpp"
|
|
139
|
+
#include "JRemoteImage.hpp"
|
|
136
140
|
#include "NitroAction.hpp"
|
|
137
141
|
#include "JNitroAction.hpp"
|
|
138
|
-
#include "
|
|
142
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
139
143
|
#include "NitroActionType.hpp"
|
|
140
144
|
#include "JNitroActionType.hpp"
|
|
141
145
|
#include "NitroAlignment.hpp"
|
|
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
|
|
|
15
15
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
|
|
16
16
|
// Forward declaration of `AssetImage` to properly resolve imports.
|
|
17
17
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
|
|
18
|
+
// Forward declaration of `RemoteImage` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
|
|
18
20
|
// Forward declaration of `NitroColor` to properly resolve imports.
|
|
19
21
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
20
22
|
// Forward declaration of `NitroActionType` to properly resolve imports.
|
|
@@ -49,12 +51,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroMa
|
|
|
49
51
|
#include "JNitroAction.hpp"
|
|
50
52
|
#include "GlyphImage.hpp"
|
|
51
53
|
#include "AssetImage.hpp"
|
|
54
|
+
#include "RemoteImage.hpp"
|
|
52
55
|
#include <variant>
|
|
53
|
-
#include "
|
|
56
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
54
57
|
#include "JGlyphImage.hpp"
|
|
55
58
|
#include "NitroColor.hpp"
|
|
56
59
|
#include "JNitroColor.hpp"
|
|
57
60
|
#include "JAssetImage.hpp"
|
|
61
|
+
#include "JRemoteImage.hpp"
|
|
58
62
|
#include "NitroActionType.hpp"
|
|
59
63
|
#include "JNitroActionType.hpp"
|
|
60
64
|
#include "NitroAlignment.hpp"
|
|
@@ -15,6 +15,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
|
|
|
15
15
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
|
|
16
16
|
// Forward declaration of `AssetImage` to properly resolve imports.
|
|
17
17
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
|
|
18
|
+
// Forward declaration of `RemoteImage` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
|
|
18
20
|
// Forward declaration of `NitroColor` to properly resolve imports.
|
|
19
21
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
20
22
|
// Forward declaration of `NitroActionType` to properly resolve imports.
|
|
@@ -52,12 +54,14 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroSe
|
|
|
52
54
|
#include "JNitroAction.hpp"
|
|
53
55
|
#include "GlyphImage.hpp"
|
|
54
56
|
#include "AssetImage.hpp"
|
|
57
|
+
#include "RemoteImage.hpp"
|
|
55
58
|
#include <variant>
|
|
56
|
-
#include "
|
|
59
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
57
60
|
#include "JGlyphImage.hpp"
|
|
58
61
|
#include "NitroColor.hpp"
|
|
59
62
|
#include "JNitroColor.hpp"
|
|
60
63
|
#include "JAssetImage.hpp"
|
|
64
|
+
#include "JRemoteImage.hpp"
|
|
61
65
|
#include "NitroActionType.hpp"
|
|
62
66
|
#include "JNitroActionType.hpp"
|
|
63
67
|
#include "NitroAlignment.hpp"
|
|
@@ -31,6 +31,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction
|
|
|
31
31
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GlyphImage; }
|
|
32
32
|
// Forward declaration of `AssetImage` to properly resolve imports.
|
|
33
33
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct AssetImage; }
|
|
34
|
+
// Forward declaration of `RemoteImage` to properly resolve imports.
|
|
35
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct RemoteImage; }
|
|
34
36
|
// Forward declaration of `NitroColor` to properly resolve imports.
|
|
35
37
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroColor; }
|
|
36
38
|
// Forward declaration of `NitroActionType` to properly resolve imports.
|
|
@@ -76,11 +78,13 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
|
|
|
76
78
|
#include "JNitroAction.hpp"
|
|
77
79
|
#include "GlyphImage.hpp"
|
|
78
80
|
#include "AssetImage.hpp"
|
|
79
|
-
#include "
|
|
81
|
+
#include "RemoteImage.hpp"
|
|
82
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
80
83
|
#include "JGlyphImage.hpp"
|
|
81
84
|
#include "NitroColor.hpp"
|
|
82
85
|
#include "JNitroColor.hpp"
|
|
83
86
|
#include "JAssetImage.hpp"
|
|
87
|
+
#include "JRemoteImage.hpp"
|
|
84
88
|
#include "NitroActionType.hpp"
|
|
85
89
|
#include "JNitroActionType.hpp"
|
|
86
90
|
#include "NitroAlignment.hpp"
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
#include "JNitroRow.hpp"
|
|
36
36
|
#include "JNitroSection.hpp"
|
|
37
37
|
#include "JNitroSectionType.hpp"
|
|
38
|
-
#include "
|
|
38
|
+
#include "JRemoteImage.hpp"
|
|
39
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
39
40
|
#include "NitroAction.hpp"
|
|
40
41
|
#include "NitroActionType.hpp"
|
|
41
42
|
#include "NitroAlignment.hpp"
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
#include "NitroRow.hpp"
|
|
48
49
|
#include "NitroSection.hpp"
|
|
49
50
|
#include "NitroSectionType.hpp"
|
|
51
|
+
#include "RemoteImage.hpp"
|
|
50
52
|
#include <NitroModules/JNICallable.hpp>
|
|
51
53
|
#include <functional>
|
|
52
54
|
#include <optional>
|
|
@@ -19,9 +19,11 @@
|
|
|
19
19
|
#include "JNitroColor.hpp"
|
|
20
20
|
#include "JNitroImage.hpp"
|
|
21
21
|
#include "JPreferredImageLane.hpp"
|
|
22
|
+
#include "JRemoteImage.hpp"
|
|
22
23
|
#include "JVariant_PreferredImageLane_ImageLane.hpp"
|
|
23
24
|
#include "NitroColor.hpp"
|
|
24
25
|
#include "PreferredImageLane.hpp"
|
|
26
|
+
#include "RemoteImage.hpp"
|
|
25
27
|
#include <optional>
|
|
26
28
|
#include <string>
|
|
27
29
|
#include <variant>
|
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
#include "JNitroRow.hpp"
|
|
36
36
|
#include "JNitroSection.hpp"
|
|
37
37
|
#include "JNitroSectionType.hpp"
|
|
38
|
-
#include "
|
|
38
|
+
#include "JRemoteImage.hpp"
|
|
39
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
39
40
|
#include "NitroAction.hpp"
|
|
40
41
|
#include "NitroActionType.hpp"
|
|
41
42
|
#include "NitroAlignment.hpp"
|
|
@@ -47,6 +48,7 @@
|
|
|
47
48
|
#include "NitroRow.hpp"
|
|
48
49
|
#include "NitroSection.hpp"
|
|
49
50
|
#include "NitroSectionType.hpp"
|
|
51
|
+
#include "RemoteImage.hpp"
|
|
50
52
|
#include <NitroModules/JNICallable.hpp>
|
|
51
53
|
#include <functional>
|
|
52
54
|
#include <optional>
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
#include "JNitroMapButton.hpp"
|
|
33
33
|
#include "JNitroMapButtonType.hpp"
|
|
34
34
|
#include "JPoint.hpp"
|
|
35
|
-
#include "
|
|
35
|
+
#include "JRemoteImage.hpp"
|
|
36
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
36
37
|
#include "JVisibleTravelEstimate.hpp"
|
|
37
38
|
#include "NitroAction.hpp"
|
|
38
39
|
#include "NitroActionType.hpp"
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
#include "NitroMapButton.hpp"
|
|
43
44
|
#include "NitroMapButtonType.hpp"
|
|
44
45
|
#include "Point.hpp"
|
|
46
|
+
#include "RemoteImage.hpp"
|
|
45
47
|
#include "VisibleTravelEstimate.hpp"
|
|
46
48
|
#include <NitroModules/JNICallable.hpp>
|
|
47
49
|
#include <functional>
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
#include "JNitroImage.hpp"
|
|
33
33
|
#include "JNitroMapButton.hpp"
|
|
34
34
|
#include "JNitroMapButtonType.hpp"
|
|
35
|
-
#include "
|
|
35
|
+
#include "JRemoteImage.hpp"
|
|
36
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
36
37
|
#include "NitroAction.hpp"
|
|
37
38
|
#include "NitroActionType.hpp"
|
|
38
39
|
#include "NitroAlignment.hpp"
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
#include "NitroColor.hpp"
|
|
42
43
|
#include "NitroMapButton.hpp"
|
|
43
44
|
#include "NitroMapButtonType.hpp"
|
|
45
|
+
#include "RemoteImage.hpp"
|
|
44
46
|
#include <NitroModules/JNICallable.hpp>
|
|
45
47
|
#include <functional>
|
|
46
48
|
#include <optional>
|
|
@@ -89,8 +91,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
89
91
|
jni::local_ref<JAutoText> message = this->getFieldValue(fieldMessage);
|
|
90
92
|
static const auto fieldActions = clazz->getField<jni::JArrayClass<JNitroAction>>("actions");
|
|
91
93
|
jni::local_ref<jni::JArrayClass<JNitroAction>> actions = this->getFieldValue(fieldActions);
|
|
92
|
-
static const auto fieldImage = clazz->getField<
|
|
93
|
-
jni::local_ref<
|
|
94
|
+
static const auto fieldImage = clazz->getField<JVariant_GlyphImage_AssetImage_RemoteImage>("image");
|
|
95
|
+
jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> image = this->getFieldValue(fieldImage);
|
|
94
96
|
static const auto fieldMapConfig = clazz->getField<JNitroBaseMapTemplateConfig>("mapConfig");
|
|
95
97
|
jni::local_ref<JNitroBaseMapTemplateConfig> mapConfig = this->getFieldValue(fieldMapConfig);
|
|
96
98
|
return MessageTemplateConfig(
|
|
@@ -174,7 +176,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
174
176
|
*/
|
|
175
177
|
[[maybe_unused]]
|
|
176
178
|
static jni::local_ref<JMessageTemplateConfig::javaobject> fromCpp(const MessageTemplateConfig& value) {
|
|
177
|
-
using JSignature = JMessageTemplateConfig(jni::alias_ref<jni::JString>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void::javaobject>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<JAutoText>, jni::alias_ref<JAutoText>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<
|
|
179
|
+
using JSignature = JMessageTemplateConfig(jni::alias_ref<jni::JString>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void_std__optional_bool_::javaobject>, jni::alias_ref<JFunc_void::javaobject>, jni::alias_ref<jni::JDouble>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<JAutoText>, jni::alias_ref<JAutoText>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<JVariant_GlyphImage_AssetImage_RemoteImage>, jni::alias_ref<JNitroBaseMapTemplateConfig>);
|
|
178
180
|
static const auto clazz = javaClassStatic();
|
|
179
181
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
180
182
|
return create(
|
|
@@ -208,7 +210,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
208
210
|
}
|
|
209
211
|
return __array;
|
|
210
212
|
}() : nullptr,
|
|
211
|
-
value.image.has_value() ?
|
|
213
|
+
value.image.has_value() ? JVariant_GlyphImage_AssetImage_RemoteImage::fromCpp(value.image.value()) : nullptr,
|
|
212
214
|
value.mapConfig.has_value() ? JNitroBaseMapTemplateConfig::fromCpp(value.mapConfig.value()) : nullptr
|
|
213
215
|
);
|
|
214
216
|
}
|
|
@@ -19,11 +19,13 @@
|
|
|
19
19
|
#include "JNitroAlignment.hpp"
|
|
20
20
|
#include "JNitroButtonStyle.hpp"
|
|
21
21
|
#include "JNitroColor.hpp"
|
|
22
|
-
#include "
|
|
22
|
+
#include "JRemoteImage.hpp"
|
|
23
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
23
24
|
#include "NitroActionType.hpp"
|
|
24
25
|
#include "NitroAlignment.hpp"
|
|
25
26
|
#include "NitroButtonStyle.hpp"
|
|
26
27
|
#include "NitroColor.hpp"
|
|
28
|
+
#include "RemoteImage.hpp"
|
|
27
29
|
#include <NitroModules/JNICallable.hpp>
|
|
28
30
|
#include <functional>
|
|
29
31
|
#include <optional>
|
|
@@ -51,8 +53,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
51
53
|
static const auto clazz = javaClassStatic();
|
|
52
54
|
static const auto fieldTitle = clazz->getField<jni::JString>("title");
|
|
53
55
|
jni::local_ref<jni::JString> title = this->getFieldValue(fieldTitle);
|
|
54
|
-
static const auto fieldImage = clazz->getField<
|
|
55
|
-
jni::local_ref<
|
|
56
|
+
static const auto fieldImage = clazz->getField<JVariant_GlyphImage_AssetImage_RemoteImage>("image");
|
|
57
|
+
jni::local_ref<JVariant_GlyphImage_AssetImage_RemoteImage> image = this->getFieldValue(fieldImage);
|
|
56
58
|
static const auto fieldEnabled = clazz->getField<jni::JBoolean>("enabled");
|
|
57
59
|
jni::local_ref<jni::JBoolean> enabled = this->getFieldValue(fieldEnabled);
|
|
58
60
|
static const auto fieldOnPress = clazz->getField<JFunc_void::javaobject>("onPress");
|
|
@@ -91,13 +93,13 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
91
93
|
*/
|
|
92
94
|
[[maybe_unused]]
|
|
93
95
|
static jni::local_ref<JNitroAction::javaobject> fromCpp(const NitroAction& value) {
|
|
94
|
-
using JSignature = JNitroAction(jni::alias_ref<jni::JString>, jni::alias_ref<
|
|
96
|
+
using JSignature = JNitroAction(jni::alias_ref<jni::JString>, jni::alias_ref<JVariant_GlyphImage_AssetImage_RemoteImage>, jni::alias_ref<jni::JBoolean>, jni::alias_ref<JFunc_void::javaobject>, jni::alias_ref<JNitroActionType>, jni::alias_ref<JNitroAlignment>, jni::alias_ref<jni::JDouble>, jni::alias_ref<JNitroButtonStyle>);
|
|
95
97
|
static const auto clazz = javaClassStatic();
|
|
96
98
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
97
99
|
return create(
|
|
98
100
|
clazz,
|
|
99
101
|
value.title.has_value() ? jni::make_jstring(value.title.value()) : nullptr,
|
|
100
|
-
value.image.has_value() ?
|
|
102
|
+
value.image.has_value() ? JVariant_GlyphImage_AssetImage_RemoteImage::fromCpp(value.image.value()) : nullptr,
|
|
101
103
|
value.enabled.has_value() ? jni::JBoolean::valueOf(value.enabled.value()) : nullptr,
|
|
102
104
|
JFunc_void_cxx::fromCpp(value.onPress),
|
|
103
105
|
JNitroActionType::fromCpp(value.type),
|
|
@@ -17,8 +17,10 @@
|
|
|
17
17
|
#include "JNitroAttributedStringImage.hpp"
|
|
18
18
|
#include "JNitroColor.hpp"
|
|
19
19
|
#include "JNitroImage.hpp"
|
|
20
|
+
#include "JRemoteImage.hpp"
|
|
20
21
|
#include "NitroAttributedStringImage.hpp"
|
|
21
22
|
#include "NitroColor.hpp"
|
|
23
|
+
#include "RemoteImage.hpp"
|
|
22
24
|
#include <optional>
|
|
23
25
|
#include <string>
|
|
24
26
|
#include <variant>
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
#include "JNitroImage.hpp"
|
|
26
26
|
#include "JNitroMapButton.hpp"
|
|
27
27
|
#include "JNitroMapButtonType.hpp"
|
|
28
|
-
#include "
|
|
28
|
+
#include "JRemoteImage.hpp"
|
|
29
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
29
30
|
#include "NitroAction.hpp"
|
|
30
31
|
#include "NitroActionType.hpp"
|
|
31
32
|
#include "NitroAlignment.hpp"
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
#include "NitroColor.hpp"
|
|
34
35
|
#include "NitroMapButton.hpp"
|
|
35
36
|
#include "NitroMapButtonType.hpp"
|
|
37
|
+
#include "RemoteImage.hpp"
|
|
36
38
|
#include <NitroModules/JNICallable.hpp>
|
|
37
39
|
#include <functional>
|
|
38
40
|
#include <optional>
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
#include "JGlyphImage.hpp"
|
|
24
24
|
#include "JNitroColor.hpp"
|
|
25
25
|
#include "JNitroImage.hpp"
|
|
26
|
+
#include "JRemoteImage.hpp"
|
|
26
27
|
#include "NitroColor.hpp"
|
|
28
|
+
#include "RemoteImage.hpp"
|
|
27
29
|
#include <NitroModules/JNICallable.hpp>
|
|
28
30
|
#include <functional>
|
|
29
31
|
#include <optional>
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
11
11
|
/**
|
|
12
|
-
* Converts JNitroImage to std::variant<GlyphImage, AssetImage>
|
|
12
|
+
* Converts JNitroImage to std::variant<GlyphImage, AssetImage, RemoteImage>
|
|
13
13
|
*/
|
|
14
|
-
std::variant<GlyphImage, AssetImage> JNitroImage::toCpp() const {
|
|
14
|
+
std::variant<GlyphImage, AssetImage, RemoteImage> JNitroImage::toCpp() const {
|
|
15
15
|
if (isInstanceOf(JNitroImage_impl::First::javaClassStatic())) {
|
|
16
16
|
// It's a `GlyphImage`
|
|
17
17
|
auto jniValue = static_cast<const JNitroImage_impl::First*>(this)->getValue();
|
|
@@ -20,6 +20,10 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
20
20
|
// It's a `AssetImage`
|
|
21
21
|
auto jniValue = static_cast<const JNitroImage_impl::Second*>(this)->getValue();
|
|
22
22
|
return jniValue->toCpp();
|
|
23
|
+
} else if (isInstanceOf(JNitroImage_impl::Third::javaClassStatic())) {
|
|
24
|
+
// It's a `RemoteImage`
|
|
25
|
+
auto jniValue = static_cast<const JNitroImage_impl::Third*>(this)->getValue();
|
|
26
|
+
return jniValue->toCpp();
|
|
23
27
|
}
|
|
24
28
|
throw std::invalid_argument("Variant is unknown Kotlin instance!");
|
|
25
29
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
#include "GlyphImage.hpp"
|
|
14
14
|
#include "AssetImage.hpp"
|
|
15
|
+
#include "RemoteImage.hpp"
|
|
15
16
|
#include <variant>
|
|
16
17
|
#include "JGlyphImage.hpp"
|
|
17
18
|
#include "NitroColor.hpp"
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
#include <optional>
|
|
20
21
|
#include "JAssetImage.hpp"
|
|
21
22
|
#include <string>
|
|
23
|
+
#include "JRemoteImage.hpp"
|
|
22
24
|
|
|
23
25
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
24
26
|
|
|
@@ -39,16 +41,21 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
39
41
|
static const auto method = javaClassStatic()->getStaticMethod<JNitroImage(jni::alias_ref<JAssetImage>)>("create");
|
|
40
42
|
return method(javaClassStatic(), value);
|
|
41
43
|
}
|
|
44
|
+
static jni::local_ref<JNitroImage> create_2(jni::alias_ref<JRemoteImage> value) {
|
|
45
|
+
static const auto method = javaClassStatic()->getStaticMethod<JNitroImage(jni::alias_ref<JRemoteImage>)>("create");
|
|
46
|
+
return method(javaClassStatic(), value);
|
|
47
|
+
}
|
|
42
48
|
|
|
43
|
-
static jni::local_ref<JNitroImage> fromCpp(const std::variant<GlyphImage, AssetImage>& variant) {
|
|
49
|
+
static jni::local_ref<JNitroImage> fromCpp(const std::variant<GlyphImage, AssetImage, RemoteImage>& variant) {
|
|
44
50
|
switch (variant.index()) {
|
|
45
51
|
case 0: return create_0(JGlyphImage::fromCpp(std::get<0>(variant)));
|
|
46
52
|
case 1: return create_1(JAssetImage::fromCpp(std::get<1>(variant)));
|
|
53
|
+
case 2: return create_2(JRemoteImage::fromCpp(std::get<2>(variant)));
|
|
47
54
|
default: throw std::invalid_argument("Variant holds unknown index! (" + std::to_string(variant.index()) + ")");
|
|
48
55
|
}
|
|
49
56
|
}
|
|
50
57
|
|
|
51
|
-
[[nodiscard]] std::variant<GlyphImage, AssetImage> toCpp() const;
|
|
58
|
+
[[nodiscard]] std::variant<GlyphImage, AssetImage, RemoteImage> toCpp() const;
|
|
52
59
|
};
|
|
53
60
|
|
|
54
61
|
namespace JNitroImage_impl {
|
|
@@ -71,5 +78,15 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
71
78
|
return getFieldValue(field);
|
|
72
79
|
}
|
|
73
80
|
};
|
|
81
|
+
|
|
82
|
+
class Third final: public jni::JavaClass<Third, JNitroImage> {
|
|
83
|
+
public:
|
|
84
|
+
static constexpr auto kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/NitroImage$Third;";
|
|
85
|
+
|
|
86
|
+
[[nodiscard]] jni::local_ref<JRemoteImage> getValue() const {
|
|
87
|
+
static const auto field = javaClassStatic()->getField<JRemoteImage>("value");
|
|
88
|
+
return getFieldValue(field);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
74
91
|
} // namespace JNitroImage_impl
|
|
75
92
|
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -24,12 +24,14 @@
|
|
|
24
24
|
#include "JNitroAttributedStringImage.hpp"
|
|
25
25
|
#include "GlyphImage.hpp"
|
|
26
26
|
#include "AssetImage.hpp"
|
|
27
|
+
#include "RemoteImage.hpp"
|
|
27
28
|
#include "JNitroImage.hpp"
|
|
28
29
|
#include "JGlyphImage.hpp"
|
|
29
30
|
#include "NitroColor.hpp"
|
|
30
31
|
#include "JNitroColor.hpp"
|
|
31
32
|
#include "JAssetImage.hpp"
|
|
32
|
-
#include "
|
|
33
|
+
#include "JRemoteImage.hpp"
|
|
34
|
+
#include "JVariant_GlyphImage_AssetImage_RemoteImage.hpp"
|
|
33
35
|
#include "TurnType.hpp"
|
|
34
36
|
#include "JTurnType.hpp"
|
|
35
37
|
#include "OffRampType.hpp"
|
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
#include "JNitroColor.hpp"
|
|
19
19
|
#include "JNitroImage.hpp"
|
|
20
20
|
#include "JNitroMapButtonType.hpp"
|
|
21
|
+
#include "JRemoteImage.hpp"
|
|
21
22
|
#include "NitroColor.hpp"
|
|
22
23
|
#include "NitroMapButtonType.hpp"
|
|
24
|
+
#include "RemoteImage.hpp"
|
|
23
25
|
#include <NitroModules/JNICallable.hpp>
|
|
24
26
|
#include <functional>
|
|
25
27
|
#include <optional>
|