@iternio/react-native-auto-play 0.2.0-alpha.3 → 0.2.0-alpha.6
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/build.gradle +2 -2
- package/android/src/automotive/AndroidManifest.xml +2 -0
- package/android/src/automotive/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/HybridAndroidAutomotive.kt +22 -27
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/SignInWithGoogleActivity.kt +57 -0
- package/android/src/main/java/com/margelo/nitro/swe/iternio/reactnativeautoplay/template/SignInTemplate.kt +58 -3
- package/android/src/main/res/drawable/google.xml +18 -0
- package/lib/types/SignInMethod.d.ts +18 -2
- package/lib/types/SignInMethod.js +1 -1
- package/nitrogen/generated/android/ReactNativeAutoPlay+autolinking.cmake +1 -1
- package/nitrogen/generated/android/ReactNativeAutoPlayOnLoad.cpp +2 -0
- package/nitrogen/generated/android/c++/JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_.hpp +79 -0
- package/nitrogen/generated/android/c++/JGoogleSignIn.hpp +85 -0
- package/nitrogen/generated/android/c++/JGoogleSignInAccount.hpp +86 -0
- package/nitrogen/generated/android/c++/JHybridSignInTemplateSpec.cpp +10 -1
- package/nitrogen/generated/android/c++/JSignInMethods.hpp +3 -3
- package/nitrogen/generated/android/c++/JSignInTemplateConfig.hpp +10 -5
- package/nitrogen/generated/android/c++/JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.cpp +34 -0
- package/nitrogen/generated/android/c++/{JVariant_QrSignIn_PinSignIn_InputSignIn.hpp → JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.hpp} +40 -20
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_.kt +80 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GoogleSignIn.kt +51 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/GoogleSignInAccount.kt +59 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/SignInMethods.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/SignInTemplateConfig.kt +3 -3
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/swe/iternio/reactnativeautoplay/{Variant_QrSignIn_PinSignIn_InputSignIn.kt → Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.kt} +23 -10
- package/nitrogen/generated/shared/c++/GoogleSignIn.hpp +102 -0
- package/nitrogen/generated/shared/c++/GoogleSignInAccount.hpp +112 -0
- package/nitrogen/generated/shared/c++/SignInMethods.hpp +1 -1
- package/nitrogen/generated/shared/c++/SignInTemplateConfig.hpp +8 -5
- package/package.json +1 -1
- package/src/types/SignInMethod.ts +20 -2
- package/nitrogen/generated/android/c++/JVariant_QrSignIn_PinSignIn_InputSignIn.cpp +0 -30
|
@@ -15,12 +15,16 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct QrSignIn; }
|
|
|
15
15
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct PinSignIn; }
|
|
16
16
|
// Forward declaration of `InputSignIn` to properly resolve imports.
|
|
17
17
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct InputSignIn; }
|
|
18
|
+
// Forward declaration of `GoogleSignIn` to properly resolve imports.
|
|
19
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GoogleSignIn; }
|
|
18
20
|
// Forward declaration of `SignInMethods` to properly resolve imports.
|
|
19
21
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class SignInMethods; }
|
|
20
22
|
// Forward declaration of `KeyboardType` to properly resolve imports.
|
|
21
23
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class KeyboardType; }
|
|
22
24
|
// Forward declaration of `TextInputType` to properly resolve imports.
|
|
23
25
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class TextInputType; }
|
|
26
|
+
// Forward declaration of `GoogleSignInAccount` to properly resolve imports.
|
|
27
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct GoogleSignInAccount; }
|
|
24
28
|
// Forward declaration of `NitroAction` to properly resolve imports.
|
|
25
29
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay { struct NitroAction; }
|
|
26
30
|
// Forward declaration of `GlyphImage` to properly resolve imports.
|
|
@@ -50,8 +54,9 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
|
|
|
50
54
|
#include "QrSignIn.hpp"
|
|
51
55
|
#include "PinSignIn.hpp"
|
|
52
56
|
#include "InputSignIn.hpp"
|
|
57
|
+
#include "GoogleSignIn.hpp"
|
|
53
58
|
#include <variant>
|
|
54
|
-
#include "
|
|
59
|
+
#include "JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.hpp"
|
|
55
60
|
#include "JQrSignIn.hpp"
|
|
56
61
|
#include "SignInMethods.hpp"
|
|
57
62
|
#include "JSignInMethods.hpp"
|
|
@@ -62,6 +67,10 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay { enum class NitroBu
|
|
|
62
67
|
#include "JFunc_void_std__string.hpp"
|
|
63
68
|
#include "TextInputType.hpp"
|
|
64
69
|
#include "JTextInputType.hpp"
|
|
70
|
+
#include "JGoogleSignIn.hpp"
|
|
71
|
+
#include "GoogleSignInAccount.hpp"
|
|
72
|
+
#include "JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_.hpp"
|
|
73
|
+
#include "JGoogleSignInAccount.hpp"
|
|
65
74
|
#include "NitroAction.hpp"
|
|
66
75
|
#include <vector>
|
|
67
76
|
#include "JNitroAction.hpp"
|
|
@@ -45,9 +45,9 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
45
45
|
case SignInMethods::QR:
|
|
46
46
|
static const auto fieldQR = clazz->getStaticField<JSignInMethods>("QR");
|
|
47
47
|
return clazz->getStaticFieldValue(fieldQR);
|
|
48
|
-
case SignInMethods::
|
|
49
|
-
static const auto
|
|
50
|
-
return clazz->getStaticFieldValue(
|
|
48
|
+
case SignInMethods::GOOGLE:
|
|
49
|
+
static const auto fieldGOOGLE = clazz->getStaticField<JSignInMethods>("GOOGLE");
|
|
50
|
+
return clazz->getStaticFieldValue(fieldGOOGLE);
|
|
51
51
|
case SignInMethods::PIN:
|
|
52
52
|
static const auto fieldPIN = clazz->getStaticField<JSignInMethods>("PIN");
|
|
53
53
|
return clazz->getStaticFieldValue(fieldPIN);
|
|
@@ -12,12 +12,17 @@
|
|
|
12
12
|
|
|
13
13
|
#include "AssetImage.hpp"
|
|
14
14
|
#include "GlyphImage.hpp"
|
|
15
|
+
#include "GoogleSignIn.hpp"
|
|
16
|
+
#include "GoogleSignInAccount.hpp"
|
|
15
17
|
#include "InputSignIn.hpp"
|
|
16
18
|
#include "JAssetImage.hpp"
|
|
17
19
|
#include "JFunc_void.hpp"
|
|
18
20
|
#include "JFunc_void_std__optional_bool_.hpp"
|
|
21
|
+
#include "JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_.hpp"
|
|
19
22
|
#include "JFunc_void_std__string.hpp"
|
|
20
23
|
#include "JGlyphImage.hpp"
|
|
24
|
+
#include "JGoogleSignIn.hpp"
|
|
25
|
+
#include "JGoogleSignInAccount.hpp"
|
|
21
26
|
#include "JInputSignIn.hpp"
|
|
22
27
|
#include "JKeyboardType.hpp"
|
|
23
28
|
#include "JNitroAction.hpp"
|
|
@@ -30,7 +35,7 @@
|
|
|
30
35
|
#include "JSignInMethods.hpp"
|
|
31
36
|
#include "JTextInputType.hpp"
|
|
32
37
|
#include "JVariant_GlyphImage_AssetImage.hpp"
|
|
33
|
-
#include "
|
|
38
|
+
#include "JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.hpp"
|
|
34
39
|
#include "KeyboardType.hpp"
|
|
35
40
|
#include "NitroAction.hpp"
|
|
36
41
|
#include "NitroActionType.hpp"
|
|
@@ -85,8 +90,8 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
85
90
|
jni::local_ref<jni::JString> title = this->getFieldValue(fieldTitle);
|
|
86
91
|
static const auto fieldAdditionalText = clazz->getField<jni::JString>("additionalText");
|
|
87
92
|
jni::local_ref<jni::JString> additionalText = this->getFieldValue(fieldAdditionalText);
|
|
88
|
-
static const auto fieldSignInMethod = clazz->getField<
|
|
89
|
-
jni::local_ref<
|
|
93
|
+
static const auto fieldSignInMethod = clazz->getField<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn>("signInMethod");
|
|
94
|
+
jni::local_ref<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> signInMethod = this->getFieldValue(fieldSignInMethod);
|
|
90
95
|
static const auto fieldHeaderActions = clazz->getField<jni::JArrayClass<JNitroAction>>("headerActions");
|
|
91
96
|
jni::local_ref<jni::JArrayClass<JNitroAction>> headerActions = this->getFieldValue(fieldHeaderActions);
|
|
92
97
|
static const auto fieldActions = clazz->getField<jni::JArrayClass<JNitroAction>>("actions");
|
|
@@ -174,7 +179,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
174
179
|
*/
|
|
175
180
|
[[maybe_unused]]
|
|
176
181
|
static jni::local_ref<JSignInTemplateConfig::javaobject> fromCpp(const SignInTemplateConfig& value) {
|
|
177
|
-
using JSignature = JSignInTemplateConfig(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::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<
|
|
182
|
+
using JSignature = JSignInTemplateConfig(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::JString>, jni::alias_ref<jni::JString>, jni::alias_ref<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<jni::JArrayClass<JNitroAction>>, jni::alias_ref<jni::JString>);
|
|
178
183
|
static const auto clazz = javaClassStatic();
|
|
179
184
|
static const auto create = clazz->getStaticMethod<JSignature>("fromCpp");
|
|
180
185
|
return create(
|
|
@@ -188,7 +193,7 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
188
193
|
value.autoDismissMs.has_value() ? jni::JDouble::valueOf(value.autoDismissMs.value()) : nullptr,
|
|
189
194
|
value.title.has_value() ? jni::make_jstring(value.title.value()) : nullptr,
|
|
190
195
|
value.additionalText.has_value() ? jni::make_jstring(value.additionalText.value()) : nullptr,
|
|
191
|
-
value.signInMethod.has_value() ?
|
|
196
|
+
value.signInMethod.has_value() ? JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn::fromCpp(value.signInMethod.value()) : nullptr,
|
|
192
197
|
value.headerActions.has_value() ? [&]() {
|
|
193
198
|
size_t __size = value.headerActions.value().size();
|
|
194
199
|
jni::local_ref<jni::JArrayClass<JNitroAction>> __array = jni::JArrayClass<JNitroAction>::newArray(__size);
|
package/nitrogen/generated/android/c++/JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.cpp
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.cpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#include "JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.hpp"
|
|
9
|
+
|
|
10
|
+
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
11
|
+
/**
|
|
12
|
+
* Converts JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn to std::variant<QrSignIn, PinSignIn, InputSignIn, GoogleSignIn>
|
|
13
|
+
*/
|
|
14
|
+
std::variant<QrSignIn, PinSignIn, InputSignIn, GoogleSignIn> JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn::toCpp() const {
|
|
15
|
+
if (isInstanceOf(JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl::First::javaClassStatic())) {
|
|
16
|
+
// It's a `QrSignIn`
|
|
17
|
+
auto jniValue = static_cast<const JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl::First*>(this)->getValue();
|
|
18
|
+
return jniValue->toCpp();
|
|
19
|
+
} else if (isInstanceOf(JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl::Second::javaClassStatic())) {
|
|
20
|
+
// It's a `PinSignIn`
|
|
21
|
+
auto jniValue = static_cast<const JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl::Second*>(this)->getValue();
|
|
22
|
+
return jniValue->toCpp();
|
|
23
|
+
} else if (isInstanceOf(JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl::Third::javaClassStatic())) {
|
|
24
|
+
// It's a `InputSignIn`
|
|
25
|
+
auto jniValue = static_cast<const JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl::Third*>(this)->getValue();
|
|
26
|
+
return jniValue->toCpp();
|
|
27
|
+
} else if (isInstanceOf(JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl::Fourth::javaClassStatic())) {
|
|
28
|
+
// It's a `GoogleSignIn`
|
|
29
|
+
auto jniValue = static_cast<const JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl::Fourth*>(this)->getValue();
|
|
30
|
+
return jniValue->toCpp();
|
|
31
|
+
}
|
|
32
|
+
throw std::invalid_argument("Variant is unknown Kotlin instance!");
|
|
33
|
+
}
|
|
34
|
+
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.hpp
|
|
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
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
#include "QrSignIn.hpp"
|
|
14
14
|
#include "PinSignIn.hpp"
|
|
15
15
|
#include "InputSignIn.hpp"
|
|
16
|
+
#include "GoogleSignIn.hpp"
|
|
16
17
|
#include <variant>
|
|
17
18
|
#include "JQrSignIn.hpp"
|
|
18
19
|
#include "SignInMethods.hpp"
|
|
@@ -28,47 +29,56 @@
|
|
|
28
29
|
#include <NitroModules/JNICallable.hpp>
|
|
29
30
|
#include "TextInputType.hpp"
|
|
30
31
|
#include "JTextInputType.hpp"
|
|
32
|
+
#include "JGoogleSignIn.hpp"
|
|
33
|
+
#include "GoogleSignInAccount.hpp"
|
|
34
|
+
#include "JFunc_void_std__optional_std__string__std__optional_GoogleSignInAccount_.hpp"
|
|
35
|
+
#include "JGoogleSignInAccount.hpp"
|
|
31
36
|
|
|
32
37
|
namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
33
38
|
|
|
34
39
|
using namespace facebook;
|
|
35
40
|
|
|
36
41
|
/**
|
|
37
|
-
* The C++ JNI bridge between the C++ std::variant and the Java class "
|
|
42
|
+
* The C++ JNI bridge between the C++ std::variant and the Java class "Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn".
|
|
38
43
|
*/
|
|
39
|
-
class
|
|
44
|
+
class JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn: public jni::JavaClass<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> {
|
|
40
45
|
public:
|
|
41
|
-
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/
|
|
46
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn;";
|
|
42
47
|
|
|
43
|
-
static jni::local_ref<
|
|
44
|
-
static const auto method = javaClassStatic()->getStaticMethod<
|
|
48
|
+
static jni::local_ref<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> create_0(jni::alias_ref<JQrSignIn> value) {
|
|
49
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn(jni::alias_ref<JQrSignIn>)>("create");
|
|
45
50
|
return method(javaClassStatic(), value);
|
|
46
51
|
}
|
|
47
|
-
static jni::local_ref<
|
|
48
|
-
static const auto method = javaClassStatic()->getStaticMethod<
|
|
52
|
+
static jni::local_ref<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> create_1(jni::alias_ref<JPinSignIn> value) {
|
|
53
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn(jni::alias_ref<JPinSignIn>)>("create");
|
|
49
54
|
return method(javaClassStatic(), value);
|
|
50
55
|
}
|
|
51
|
-
static jni::local_ref<
|
|
52
|
-
static const auto method = javaClassStatic()->getStaticMethod<
|
|
56
|
+
static jni::local_ref<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> create_2(jni::alias_ref<JInputSignIn> value) {
|
|
57
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn(jni::alias_ref<JInputSignIn>)>("create");
|
|
58
|
+
return method(javaClassStatic(), value);
|
|
59
|
+
}
|
|
60
|
+
static jni::local_ref<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> create_3(jni::alias_ref<JGoogleSignIn> value) {
|
|
61
|
+
static const auto method = javaClassStatic()->getStaticMethod<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn(jni::alias_ref<JGoogleSignIn>)>("create");
|
|
53
62
|
return method(javaClassStatic(), value);
|
|
54
63
|
}
|
|
55
64
|
|
|
56
|
-
static jni::local_ref<
|
|
65
|
+
static jni::local_ref<JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> fromCpp(const std::variant<QrSignIn, PinSignIn, InputSignIn, GoogleSignIn>& variant) {
|
|
57
66
|
switch (variant.index()) {
|
|
58
67
|
case 0: return create_0(JQrSignIn::fromCpp(std::get<0>(variant)));
|
|
59
68
|
case 1: return create_1(JPinSignIn::fromCpp(std::get<1>(variant)));
|
|
60
69
|
case 2: return create_2(JInputSignIn::fromCpp(std::get<2>(variant)));
|
|
70
|
+
case 3: return create_3(JGoogleSignIn::fromCpp(std::get<3>(variant)));
|
|
61
71
|
default: throw std::invalid_argument("Variant holds unknown index! (" + std::to_string(variant.index()) + ")");
|
|
62
72
|
}
|
|
63
73
|
}
|
|
64
74
|
|
|
65
|
-
[[nodiscard]] std::variant<QrSignIn, PinSignIn, InputSignIn> toCpp() const;
|
|
75
|
+
[[nodiscard]] std::variant<QrSignIn, PinSignIn, InputSignIn, GoogleSignIn> toCpp() const;
|
|
66
76
|
};
|
|
67
77
|
|
|
68
|
-
namespace
|
|
69
|
-
class First final: public jni::JavaClass<First,
|
|
78
|
+
namespace JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl {
|
|
79
|
+
class First final: public jni::JavaClass<First, JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> {
|
|
70
80
|
public:
|
|
71
|
-
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/
|
|
81
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn$First;";
|
|
72
82
|
|
|
73
83
|
[[nodiscard]] jni::local_ref<JQrSignIn> getValue() const {
|
|
74
84
|
static const auto field = javaClassStatic()->getField<JQrSignIn>("value");
|
|
@@ -76,9 +86,9 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
76
86
|
}
|
|
77
87
|
};
|
|
78
88
|
|
|
79
|
-
class Second final: public jni::JavaClass<Second,
|
|
89
|
+
class Second final: public jni::JavaClass<Second, JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> {
|
|
80
90
|
public:
|
|
81
|
-
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/
|
|
91
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn$Second;";
|
|
82
92
|
|
|
83
93
|
[[nodiscard]] jni::local_ref<JPinSignIn> getValue() const {
|
|
84
94
|
static const auto field = javaClassStatic()->getField<JPinSignIn>("value");
|
|
@@ -86,14 +96,24 @@ namespace margelo::nitro::swe::iternio::reactnativeautoplay {
|
|
|
86
96
|
}
|
|
87
97
|
};
|
|
88
98
|
|
|
89
|
-
class Third final: public jni::JavaClass<Third,
|
|
99
|
+
class Third final: public jni::JavaClass<Third, JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> {
|
|
90
100
|
public:
|
|
91
|
-
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/
|
|
101
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn$Third;";
|
|
92
102
|
|
|
93
103
|
[[nodiscard]] jni::local_ref<JInputSignIn> getValue() const {
|
|
94
104
|
static const auto field = javaClassStatic()->getField<JInputSignIn>("value");
|
|
95
105
|
return getFieldValue(field);
|
|
96
106
|
}
|
|
97
107
|
};
|
|
98
|
-
|
|
108
|
+
|
|
109
|
+
class Fourth final: public jni::JavaClass<Fourth, JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn> {
|
|
110
|
+
public:
|
|
111
|
+
static auto constexpr kJavaDescriptor = "Lcom/margelo/nitro/swe/iternio/reactnativeautoplay/Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn$Fourth;";
|
|
112
|
+
|
|
113
|
+
[[nodiscard]] jni::local_ref<JGoogleSignIn> getValue() const {
|
|
114
|
+
static const auto field = javaClassStatic()->getField<JGoogleSignIn>("value");
|
|
115
|
+
return getFieldValue(field);
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
} // namespace JVariant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn_impl
|
|
99
119
|
} // namespace margelo::nitro::swe::iternio::reactnativeautoplay
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 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 `(error: optional, signInAccount: 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_std__string__std__optional_GoogleSignInAccount_: (String?, GoogleSignInAccount?) -> 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(error: String?, signInAccount: GoogleSignInAccount?): Unit
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Represents the JavaScript callback `(error: optional, signInAccount: 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_std__string__std__optional_GoogleSignInAccount__cxx: Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_ {
|
|
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(error: String?, signInAccount: GoogleSignInAccount?): Unit
|
|
60
|
+
= invoke_cxx(error,signInAccount)
|
|
61
|
+
|
|
62
|
+
@FastNative
|
|
63
|
+
private external fun invoke_cxx(error: String?, signInAccount: GoogleSignInAccount?): Unit
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Represents the JavaScript callback `(error: optional, signInAccount: optional) => void`.
|
|
68
|
+
* This is implemented in Java/Kotlin, via a `(String?, GoogleSignInAccount?) -> 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_std__string__std__optional_GoogleSignInAccount__java(private val function: (String?, GoogleSignInAccount?) -> Unit): Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_ {
|
|
75
|
+
@DoNotStrip
|
|
76
|
+
@Keep
|
|
77
|
+
override fun invoke(error: String?, signInAccount: GoogleSignInAccount?): Unit {
|
|
78
|
+
return this.function(error, signInAccount)
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// GoogleSignIn.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 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 "GoogleSignIn".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class GoogleSignIn(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val method: SignInMethods,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val serverClientId: String,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val callback: Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val signInButtonText: String
|
|
32
|
+
) {
|
|
33
|
+
/**
|
|
34
|
+
* Create a new instance of GoogleSignIn from Kotlin
|
|
35
|
+
*/
|
|
36
|
+
constructor(method: SignInMethods, serverClientId: String, callback: (error: String?, signInAccount: GoogleSignInAccount?) -> Unit, signInButtonText: String):
|
|
37
|
+
this(method, serverClientId, Func_void_std__optional_std__string__std__optional_GoogleSignInAccount__java(callback), signInButtonText)
|
|
38
|
+
|
|
39
|
+
companion object {
|
|
40
|
+
/**
|
|
41
|
+
* Constructor called from C++
|
|
42
|
+
*/
|
|
43
|
+
@DoNotStrip
|
|
44
|
+
@Keep
|
|
45
|
+
@Suppress("unused")
|
|
46
|
+
@JvmStatic
|
|
47
|
+
private fun fromCpp(method: SignInMethods, serverClientId: String, callback: Func_void_std__optional_std__string__std__optional_GoogleSignInAccount_, signInButtonText: String): GoogleSignIn {
|
|
48
|
+
return GoogleSignIn(method, serverClientId, callback, signInButtonText)
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// GoogleSignInAccount.kt
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 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 "GoogleSignInAccount".
|
|
16
|
+
*/
|
|
17
|
+
@DoNotStrip
|
|
18
|
+
@Keep
|
|
19
|
+
data class GoogleSignInAccount(
|
|
20
|
+
@DoNotStrip
|
|
21
|
+
@Keep
|
|
22
|
+
val serverAuthCode: String?,
|
|
23
|
+
@DoNotStrip
|
|
24
|
+
@Keep
|
|
25
|
+
val email: String?,
|
|
26
|
+
@DoNotStrip
|
|
27
|
+
@Keep
|
|
28
|
+
val id: String?,
|
|
29
|
+
@DoNotStrip
|
|
30
|
+
@Keep
|
|
31
|
+
val displayName: String?,
|
|
32
|
+
@DoNotStrip
|
|
33
|
+
@Keep
|
|
34
|
+
val photoUrl: String?,
|
|
35
|
+
@DoNotStrip
|
|
36
|
+
@Keep
|
|
37
|
+
val idToken: String?,
|
|
38
|
+
@DoNotStrip
|
|
39
|
+
@Keep
|
|
40
|
+
val givenName: String?,
|
|
41
|
+
@DoNotStrip
|
|
42
|
+
@Keep
|
|
43
|
+
val familyName: String?
|
|
44
|
+
) {
|
|
45
|
+
/* primary constructor */
|
|
46
|
+
|
|
47
|
+
companion object {
|
|
48
|
+
/**
|
|
49
|
+
* Constructor called from C++
|
|
50
|
+
*/
|
|
51
|
+
@DoNotStrip
|
|
52
|
+
@Keep
|
|
53
|
+
@Suppress("unused")
|
|
54
|
+
@JvmStatic
|
|
55
|
+
private fun fromCpp(serverAuthCode: String?, email: String?, id: String?, displayName: String?, photoUrl: String?, idToken: String?, givenName: String?, familyName: String?): GoogleSignInAccount {
|
|
56
|
+
return GoogleSignInAccount(serverAuthCode, email, id, displayName, photoUrl, idToken, givenName, familyName)
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -46,7 +46,7 @@ data class SignInTemplateConfig(
|
|
|
46
46
|
val additionalText: String?,
|
|
47
47
|
@DoNotStrip
|
|
48
48
|
@Keep
|
|
49
|
-
val signInMethod:
|
|
49
|
+
val signInMethod: Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn?,
|
|
50
50
|
@DoNotStrip
|
|
51
51
|
@Keep
|
|
52
52
|
val headerActions: Array<NitroAction>?,
|
|
@@ -60,7 +60,7 @@ data class SignInTemplateConfig(
|
|
|
60
60
|
/**
|
|
61
61
|
* Create a new instance of SignInTemplateConfig from Kotlin
|
|
62
62
|
*/
|
|
63
|
-
constructor(id: String, onWillAppear: ((animated: Boolean?) -> Unit)?, onWillDisappear: ((animated: Boolean?) -> Unit)?, onDidAppear: ((animated: Boolean?) -> Unit)?, onDidDisappear: ((animated: Boolean?) -> Unit)?, onPopped: (() -> Unit)?, autoDismissMs: Double?, title: String?, additionalText: String?, signInMethod:
|
|
63
|
+
constructor(id: String, onWillAppear: ((animated: Boolean?) -> Unit)?, onWillDisappear: ((animated: Boolean?) -> Unit)?, onDidAppear: ((animated: Boolean?) -> Unit)?, onDidDisappear: ((animated: Boolean?) -> Unit)?, onPopped: (() -> Unit)?, autoDismissMs: Double?, title: String?, additionalText: String?, signInMethod: Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn?, headerActions: Array<NitroAction>?, actions: Array<NitroAction>?, instructions: String?):
|
|
64
64
|
this(id, onWillAppear?.let { Func_void_std__optional_bool__java(it) }, onWillDisappear?.let { Func_void_std__optional_bool__java(it) }, onDidAppear?.let { Func_void_std__optional_bool__java(it) }, onDidDisappear?.let { Func_void_std__optional_bool__java(it) }, onPopped?.let { Func_void_java(it) }, autoDismissMs, title, additionalText, signInMethod, headerActions, actions, instructions)
|
|
65
65
|
|
|
66
66
|
companion object {
|
|
@@ -71,7 +71,7 @@ data class SignInTemplateConfig(
|
|
|
71
71
|
@Keep
|
|
72
72
|
@Suppress("unused")
|
|
73
73
|
@JvmStatic
|
|
74
|
-
private fun fromCpp(id: String, onWillAppear: Func_void_std__optional_bool_?, onWillDisappear: Func_void_std__optional_bool_?, onDidAppear: Func_void_std__optional_bool_?, onDidDisappear: Func_void_std__optional_bool_?, onPopped: Func_void?, autoDismissMs: Double?, title: String?, additionalText: String?, signInMethod:
|
|
74
|
+
private fun fromCpp(id: String, onWillAppear: Func_void_std__optional_bool_?, onWillDisappear: Func_void_std__optional_bool_?, onDidAppear: Func_void_std__optional_bool_?, onDidDisappear: Func_void_std__optional_bool_?, onPopped: Func_void?, autoDismissMs: Double?, title: String?, additionalText: String?, signInMethod: Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn?, headerActions: Array<NitroAction>?, actions: Array<NitroAction>?, instructions: String?): SignInTemplateConfig {
|
|
75
75
|
return SignInTemplateConfig(id, onWillAppear, onWillDisappear, onDidAppear, onDidDisappear, onPopped, autoDismissMs, title, additionalText, signInMethod, headerActions, actions, instructions)
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
///
|
|
2
|
-
///
|
|
2
|
+
/// Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn.kt
|
|
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
|
|
@@ -11,23 +11,26 @@ import com.facebook.proguard.annotations.DoNotStrip
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Represents the TypeScript variant "QrSignIn | PinSignIn | InputSignIn".
|
|
14
|
+
* Represents the TypeScript variant "QrSignIn | PinSignIn | InputSignIn | GoogleSignIn".
|
|
15
15
|
*/
|
|
16
16
|
@Suppress("ClassName")
|
|
17
17
|
@DoNotStrip
|
|
18
|
-
sealed class
|
|
18
|
+
sealed class Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn {
|
|
19
19
|
@DoNotStrip
|
|
20
|
-
data class First(@DoNotStrip val value: QrSignIn):
|
|
20
|
+
data class First(@DoNotStrip val value: QrSignIn): Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn()
|
|
21
21
|
@DoNotStrip
|
|
22
|
-
data class Second(@DoNotStrip val value: PinSignIn):
|
|
22
|
+
data class Second(@DoNotStrip val value: PinSignIn): Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn()
|
|
23
23
|
@DoNotStrip
|
|
24
|
-
data class Third(@DoNotStrip val value: InputSignIn):
|
|
24
|
+
data class Third(@DoNotStrip val value: InputSignIn): Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn()
|
|
25
|
+
@DoNotStrip
|
|
26
|
+
data class Fourth(@DoNotStrip val value: GoogleSignIn): Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn()
|
|
25
27
|
|
|
26
28
|
@Deprecated("getAs() is not type-safe. Use fold/asFirstOrNull/asSecondOrNull instead.", level = DeprecationLevel.ERROR)
|
|
27
29
|
inline fun <reified T> getAs(): T? = when (this) {
|
|
28
30
|
is First -> value as? T
|
|
29
31
|
is Second -> value as? T
|
|
30
32
|
is Third -> value as? T
|
|
33
|
+
is Fourth -> value as? T
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
val isFirst: Boolean
|
|
@@ -36,6 +39,8 @@ sealed class Variant_QrSignIn_PinSignIn_InputSignIn {
|
|
|
36
39
|
get() = this is Second
|
|
37
40
|
val isThird: Boolean
|
|
38
41
|
get() = this is Third
|
|
42
|
+
val isFourth: Boolean
|
|
43
|
+
get() = this is Fourth
|
|
39
44
|
|
|
40
45
|
fun asFirstOrNull(): QrSignIn? {
|
|
41
46
|
val value = (this as? First)?.value ?: return null
|
|
@@ -49,24 +54,32 @@ sealed class Variant_QrSignIn_PinSignIn_InputSignIn {
|
|
|
49
54
|
val value = (this as? Third)?.value ?: return null
|
|
50
55
|
return value
|
|
51
56
|
}
|
|
57
|
+
fun asFourthOrNull(): GoogleSignIn? {
|
|
58
|
+
val value = (this as? Fourth)?.value ?: return null
|
|
59
|
+
return value
|
|
60
|
+
}
|
|
52
61
|
|
|
53
|
-
inline fun <R> match(first: (QrSignIn) -> R, second: (PinSignIn) -> R, third: (InputSignIn) -> R): R {
|
|
62
|
+
inline fun <R> match(first: (QrSignIn) -> R, second: (PinSignIn) -> R, third: (InputSignIn) -> R, fourth: (GoogleSignIn) -> R): R {
|
|
54
63
|
return when (this) {
|
|
55
64
|
is First -> first(value)
|
|
56
65
|
is Second -> second(value)
|
|
57
66
|
is Third -> third(value)
|
|
67
|
+
is Fourth -> fourth(value)
|
|
58
68
|
}
|
|
59
69
|
}
|
|
60
70
|
|
|
61
71
|
companion object {
|
|
62
72
|
@JvmStatic
|
|
63
73
|
@DoNotStrip
|
|
64
|
-
fun create(value: QrSignIn):
|
|
74
|
+
fun create(value: QrSignIn): Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn = First(value)
|
|
75
|
+
@JvmStatic
|
|
76
|
+
@DoNotStrip
|
|
77
|
+
fun create(value: PinSignIn): Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn = Second(value)
|
|
65
78
|
@JvmStatic
|
|
66
79
|
@DoNotStrip
|
|
67
|
-
fun create(value:
|
|
80
|
+
fun create(value: InputSignIn): Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn = Third(value)
|
|
68
81
|
@JvmStatic
|
|
69
82
|
@DoNotStrip
|
|
70
|
-
fun create(value:
|
|
83
|
+
fun create(value: GoogleSignIn): Variant_QrSignIn_PinSignIn_InputSignIn_GoogleSignIn = Fourth(value)
|
|
71
84
|
}
|
|
72
85
|
}
|