@onekeyfe/react-native-range-downloader 3.0.81-alpha.9 → 3.0.82
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/ReactNativeRangeDownloader.podspec +1 -2
- package/android/build.gradle +0 -1
- package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactStore.kt +9 -25
- package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/ReactNativeRangeDownloader.kt +6 -2
- package/ios/FirmwareArtifactStore.swift +33 -40
- package/ios/RangeDownloadLogic.swift +41 -2
- package/ios/ReactNativeRangeDownloader.swift +20 -15
- package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts +1 -0
- package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JDownloadChannel.hpp +6 -7
- package/nitrogen/generated/android/c++/JFirmwareArchiveExpectedEntry.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeResult.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializedArtifact.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactCancelParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactCapabilities.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactDownloadParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactLease.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseCreateParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseReleaseParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseRetainParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactReaderCloseParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactReaderInfo.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactReaderReadParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactReceipt.hpp +9 -5
- package/nitrogen/generated/android/c++/JFirmwareArtifactRefParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JFirmwareArtifactSweepResult.hpp +2 -2
- package/nitrogen/generated/android/c++/JFunc_void_RangeDownloadEvent.hpp +3 -3
- package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.cpp +39 -38
- package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.hpp +20 -22
- package/nitrogen/generated/android/c++/JRangeDownloadEvent.hpp +2 -2
- package/nitrogen/generated/android/c++/JRangeDownloadOutcome.hpp +6 -7
- package/nitrogen/generated/android/c++/JRangeDownloadParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JRangeDownloadResult.hpp +2 -2
- package/nitrogen/generated/android/c++/JRangeFallbackKind.hpp +12 -13
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/DownloadChannel.kt +3 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveExpectedEntry.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializedArtifact.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCancelParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCapabilities.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactDownloadParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLease.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseCreateParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseReleaseParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseRetainParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderCloseParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderInfo.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderReadParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReceipt.kt +8 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactRefParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactSweepResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/Func_void_RangeDownloadEvent.kt +1 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/HybridReactNativeRangeDownloaderSpec.kt +16 -19
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeDownloadEvent.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeDownloadOutcome.kt +3 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeDownloadParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeDownloadResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/RangeFallbackKind.kt +3 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/reactnativerangedownloaderOnLoad.kt +1 -1
- package/nitrogen/generated/android/reactnativerangedownloader+autolinking.cmake +1 -1
- package/nitrogen/generated/android/reactnativerangedownloader+autolinking.gradle +1 -1
- package/nitrogen/generated/android/reactnativerangedownloaderOnLoad.cpp +28 -18
- package/nitrogen/generated/android/reactnativerangedownloaderOnLoad.hpp +14 -5
- package/nitrogen/generated/ios/ReactNativeRangeDownloader+autolinking.rb +2 -2
- package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.hpp +5 -5
- package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/ReactNativeRangeDownloaderAutolinking.mm +1 -1
- package/nitrogen/generated/ios/ReactNativeRangeDownloaderAutolinking.swift +9 -8
- package/nitrogen/generated/ios/c++/HybridReactNativeRangeDownloaderSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridReactNativeRangeDownloaderSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/swift/DownloadChannel.swift +1 -1
- package/nitrogen/generated/ios/swift/FirmwareArchiveExpectedEntry.swift +9 -34
- package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeParams.swift +14 -45
- package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeResult.swift +3 -16
- package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializedArtifact.swift +5 -18
- package/nitrogen/generated/ios/swift/FirmwareArtifactCancelParams.swift +3 -10
- package/nitrogen/generated/ios/swift/FirmwareArtifactCapabilities.swift +9 -40
- package/nitrogen/generated/ios/swift/FirmwareArtifactDownloadParams.swift +51 -128
- package/nitrogen/generated/ios/swift/FirmwareArtifactLease.swift +3 -10
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseCreateParams.swift +3 -10
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseReleaseParams.swift +5 -18
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseRetainParams.swift +5 -18
- package/nitrogen/generated/ios/swift/FirmwareArtifactReaderCloseParams.swift +3 -10
- package/nitrogen/generated/ios/swift/FirmwareArtifactReaderInfo.swift +5 -18
- package/nitrogen/generated/ios/swift/FirmwareArtifactReaderReadParams.swift +7 -26
- package/nitrogen/generated/ios/swift/FirmwareArtifactReceipt.swift +14 -28
- package/nitrogen/generated/ios/swift/FirmwareArtifactRefParams.swift +3 -10
- package/nitrogen/generated/ios/swift/FirmwareArtifactSweepResult.swift +5 -18
- package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArchiveMaterializeResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactLease.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReaderInfo.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReceipt.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactSweepResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_RangeDownloadEvent.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_RangeDownloadResult.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +1 -2
- package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/RangeDownloadEvent.swift +11 -42
- package/nitrogen/generated/ios/swift/RangeDownloadOutcome.swift +1 -1
- package/nitrogen/generated/ios/swift/RangeDownloadParams.swift +72 -139
- package/nitrogen/generated/ios/swift/RangeDownloadResult.swift +16 -53
- package/nitrogen/generated/ios/swift/RangeFallbackKind.swift +1 -1
- package/nitrogen/generated/shared/c++/DownloadChannel.hpp +1 -1
- package/nitrogen/generated/shared/c++/FirmwareArchiveExpectedEntry.hpp +22 -14
- package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeParams.hpp +19 -11
- package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeResult.hpp +13 -5
- package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializedArtifact.hpp +16 -8
- package/nitrogen/generated/shared/c++/FirmwareArtifactCancelParams.hpp +13 -5
- package/nitrogen/generated/shared/c++/FirmwareArtifactCapabilities.hpp +22 -14
- package/nitrogen/generated/shared/c++/FirmwareArtifactDownloadParams.hpp +43 -35
- package/nitrogen/generated/shared/c++/FirmwareArtifactLease.hpp +13 -5
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseCreateParams.hpp +13 -5
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseReleaseParams.hpp +16 -8
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseRetainParams.hpp +16 -8
- package/nitrogen/generated/shared/c++/FirmwareArtifactReaderCloseParams.hpp +13 -5
- package/nitrogen/generated/shared/c++/FirmwareArtifactReaderInfo.hpp +16 -8
- package/nitrogen/generated/shared/c++/FirmwareArtifactReaderReadParams.hpp +19 -11
- package/nitrogen/generated/shared/c++/FirmwareArtifactReceipt.hpp +24 -12
- package/nitrogen/generated/shared/c++/FirmwareArtifactRefParams.hpp +13 -5
- package/nitrogen/generated/shared/c++/FirmwareArtifactSweepResult.hpp +16 -8
- package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/RangeDownloadEvent.hpp +25 -17
- package/nitrogen/generated/shared/c++/RangeDownloadOutcome.hpp +1 -1
- package/nitrogen/generated/shared/c++/RangeDownloadParams.hpp +43 -35
- package/nitrogen/generated/shared/c++/RangeDownloadResult.hpp +22 -14
- package/nitrogen/generated/shared/c++/RangeFallbackKind.hpp +1 -1
- package/package.json +5 -7
- package/src/ReactNativeRangeDownloader.nitro.ts +3 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FirmwareArchiveMaterializeParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
// Forward declaration of `FirmwareArchiveExpectedEntry` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::reactnativerangedownloader { struct FirmwareArchiveExpectedEntry; }
|
|
@@ -36,7 +41,7 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
36
41
|
/**
|
|
37
42
|
* A struct which can be represented as a JavaScript object (FirmwareArchiveMaterializeParams).
|
|
38
43
|
*/
|
|
39
|
-
struct FirmwareArchiveMaterializeParams {
|
|
44
|
+
struct FirmwareArchiveMaterializeParams final {
|
|
40
45
|
public:
|
|
41
46
|
std::string leaseRef SWIFT_PRIVATE;
|
|
42
47
|
std::string archiveArtifactRef SWIFT_PRIVATE;
|
|
@@ -45,6 +50,9 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
45
50
|
public:
|
|
46
51
|
FirmwareArchiveMaterializeParams() = default;
|
|
47
52
|
explicit FirmwareArchiveMaterializeParams(std::string leaseRef, std::string archiveArtifactRef, std::optional<std::vector<FirmwareArchiveExpectedEntry>> expectedEntries): leaseRef(leaseRef), archiveArtifactRef(archiveArtifactRef), expectedEntries(expectedEntries) {}
|
|
53
|
+
|
|
54
|
+
public:
|
|
55
|
+
friend bool operator==(const FirmwareArchiveMaterializeParams& lhs, const FirmwareArchiveMaterializeParams& rhs) = default;
|
|
48
56
|
};
|
|
49
57
|
|
|
50
58
|
} // namespace margelo::nitro::reactnativerangedownloader
|
|
@@ -57,16 +65,16 @@ namespace margelo::nitro {
|
|
|
57
65
|
static inline margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
58
66
|
jsi::Object obj = arg.asObject(runtime);
|
|
59
67
|
return margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeParams(
|
|
60
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef")),
|
|
61
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "archiveArtifactRef")),
|
|
62
|
-
JSIConverter<std::optional<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveExpectedEntry>>>::fromJSI(runtime, obj.getProperty(runtime, "expectedEntries"))
|
|
68
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef"))),
|
|
69
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "archiveArtifactRef"))),
|
|
70
|
+
JSIConverter<std::optional<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveExpectedEntry>>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expectedEntries")))
|
|
63
71
|
);
|
|
64
72
|
}
|
|
65
73
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeParams& arg) {
|
|
66
74
|
jsi::Object obj(runtime);
|
|
67
|
-
obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
|
|
68
|
-
obj.setProperty(runtime, "archiveArtifactRef", JSIConverter<std::string>::toJSI(runtime, arg.archiveArtifactRef));
|
|
69
|
-
obj.setProperty(runtime, "expectedEntries", JSIConverter<std::optional<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveExpectedEntry>>>::toJSI(runtime, arg.expectedEntries));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "leaseRef"), JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "archiveArtifactRef"), JSIConverter<std::string>::toJSI(runtime, arg.archiveArtifactRef));
|
|
77
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "expectedEntries"), JSIConverter<std::optional<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveExpectedEntry>>>::toJSI(runtime, arg.expectedEntries));
|
|
70
78
|
return obj;
|
|
71
79
|
}
|
|
72
80
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -77,9 +85,9 @@ namespace margelo::nitro {
|
|
|
77
85
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
78
86
|
return false;
|
|
79
87
|
}
|
|
80
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
|
|
81
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "archiveArtifactRef"))) return false;
|
|
82
|
-
if (!JSIConverter<std::optional<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveExpectedEntry>>>::canConvert(runtime, obj.getProperty(runtime, "expectedEntries"))) return false;
|
|
88
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef")))) return false;
|
|
89
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "archiveArtifactRef")))) return false;
|
|
90
|
+
if (!JSIConverter<std::optional<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveExpectedEntry>>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expectedEntries")))) return false;
|
|
83
91
|
return true;
|
|
84
92
|
}
|
|
85
93
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FirmwareArchiveMaterializeResult.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
// Forward declaration of `FirmwareArchiveMaterializedArtifact` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::reactnativerangedownloader { struct FirmwareArchiveMaterializedArtifact; }
|
|
@@ -34,13 +39,16 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
34
39
|
/**
|
|
35
40
|
* A struct which can be represented as a JavaScript object (FirmwareArchiveMaterializeResult).
|
|
36
41
|
*/
|
|
37
|
-
struct FirmwareArchiveMaterializeResult {
|
|
42
|
+
struct FirmwareArchiveMaterializeResult final {
|
|
38
43
|
public:
|
|
39
44
|
std::vector<FirmwareArchiveMaterializedArtifact> artifacts SWIFT_PRIVATE;
|
|
40
45
|
|
|
41
46
|
public:
|
|
42
47
|
FirmwareArchiveMaterializeResult() = default;
|
|
43
48
|
explicit FirmwareArchiveMaterializeResult(std::vector<FirmwareArchiveMaterializedArtifact> artifacts): artifacts(artifacts) {}
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
friend bool operator==(const FirmwareArchiveMaterializeResult& lhs, const FirmwareArchiveMaterializeResult& rhs) = default;
|
|
44
52
|
};
|
|
45
53
|
|
|
46
54
|
} // namespace margelo::nitro::reactnativerangedownloader
|
|
@@ -53,12 +61,12 @@ namespace margelo::nitro {
|
|
|
53
61
|
static inline margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
62
|
jsi::Object obj = arg.asObject(runtime);
|
|
55
63
|
return margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeResult(
|
|
56
|
-
JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact>>::fromJSI(runtime, obj.getProperty(runtime, "artifacts"))
|
|
64
|
+
JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifacts")))
|
|
57
65
|
);
|
|
58
66
|
}
|
|
59
67
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializeResult& arg) {
|
|
60
68
|
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "artifacts", JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact>>::toJSI(runtime, arg.artifacts));
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "artifacts"), JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact>>::toJSI(runtime, arg.artifacts));
|
|
62
70
|
return obj;
|
|
63
71
|
}
|
|
64
72
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -69,7 +77,7 @@ namespace margelo::nitro {
|
|
|
69
77
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
70
78
|
return false;
|
|
71
79
|
}
|
|
72
|
-
if (!JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact>>::canConvert(runtime, obj.getProperty(runtime, "artifacts"))) return false;
|
|
80
|
+
if (!JSIConverter<std::vector<margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifacts")))) return false;
|
|
73
81
|
return true;
|
|
74
82
|
}
|
|
75
83
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FirmwareArchiveMaterializedArtifact.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
// Forward declaration of `FirmwareArtifactReceipt` to properly resolve imports.
|
|
27
32
|
namespace margelo::nitro::reactnativerangedownloader { struct FirmwareArtifactReceipt; }
|
|
@@ -34,7 +39,7 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
34
39
|
/**
|
|
35
40
|
* A struct which can be represented as a JavaScript object (FirmwareArchiveMaterializedArtifact).
|
|
36
41
|
*/
|
|
37
|
-
struct FirmwareArchiveMaterializedArtifact {
|
|
42
|
+
struct FirmwareArchiveMaterializedArtifact final {
|
|
38
43
|
public:
|
|
39
44
|
std::string entryName SWIFT_PRIVATE;
|
|
40
45
|
FirmwareArtifactReceipt receipt SWIFT_PRIVATE;
|
|
@@ -42,6 +47,9 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
42
47
|
public:
|
|
43
48
|
FirmwareArchiveMaterializedArtifact() = default;
|
|
44
49
|
explicit FirmwareArchiveMaterializedArtifact(std::string entryName, FirmwareArtifactReceipt receipt): entryName(entryName), receipt(receipt) {}
|
|
50
|
+
|
|
51
|
+
public:
|
|
52
|
+
friend bool operator==(const FirmwareArchiveMaterializedArtifact& lhs, const FirmwareArchiveMaterializedArtifact& rhs) = default;
|
|
45
53
|
};
|
|
46
54
|
|
|
47
55
|
} // namespace margelo::nitro::reactnativerangedownloader
|
|
@@ -54,14 +62,14 @@ namespace margelo::nitro {
|
|
|
54
62
|
static inline margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
55
63
|
jsi::Object obj = arg.asObject(runtime);
|
|
56
64
|
return margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact(
|
|
57
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "entryName")),
|
|
58
|
-
JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt>::fromJSI(runtime, obj.getProperty(runtime, "receipt"))
|
|
65
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "entryName"))),
|
|
66
|
+
JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "receipt")))
|
|
59
67
|
);
|
|
60
68
|
}
|
|
61
69
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArchiveMaterializedArtifact& arg) {
|
|
62
70
|
jsi::Object obj(runtime);
|
|
63
|
-
obj.setProperty(runtime, "entryName", JSIConverter<std::string>::toJSI(runtime, arg.entryName));
|
|
64
|
-
obj.setProperty(runtime, "receipt", JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt>::toJSI(runtime, arg.receipt));
|
|
71
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "entryName"), JSIConverter<std::string>::toJSI(runtime, arg.entryName));
|
|
72
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "receipt"), JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt>::toJSI(runtime, arg.receipt));
|
|
65
73
|
return obj;
|
|
66
74
|
}
|
|
67
75
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -72,8 +80,8 @@ namespace margelo::nitro {
|
|
|
72
80
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
73
81
|
return false;
|
|
74
82
|
}
|
|
75
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "entryName"))) return false;
|
|
76
|
-
if (!JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt>::canConvert(runtime, obj.getProperty(runtime, "receipt"))) return false;
|
|
83
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "entryName")))) return false;
|
|
84
|
+
if (!JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "receipt")))) return false;
|
|
77
85
|
return true;
|
|
78
86
|
}
|
|
79
87
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FirmwareArtifactCancelParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,13 +37,16 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (FirmwareArtifactCancelParams).
|
|
34
39
|
*/
|
|
35
|
-
struct FirmwareArtifactCancelParams {
|
|
40
|
+
struct FirmwareArtifactCancelParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string transactionId SWIFT_PRIVATE;
|
|
38
43
|
|
|
39
44
|
public:
|
|
40
45
|
FirmwareArtifactCancelParams() = default;
|
|
41
46
|
explicit FirmwareArtifactCancelParams(std::string transactionId): transactionId(transactionId) {}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
friend bool operator==(const FirmwareArtifactCancelParams& lhs, const FirmwareArtifactCancelParams& rhs) = default;
|
|
42
50
|
};
|
|
43
51
|
|
|
44
52
|
} // namespace margelo::nitro::reactnativerangedownloader
|
|
@@ -51,12 +59,12 @@ namespace margelo::nitro {
|
|
|
51
59
|
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
60
|
jsi::Object obj = arg.asObject(runtime);
|
|
53
61
|
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams(
|
|
54
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "transactionId"))
|
|
62
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionId")))
|
|
55
63
|
);
|
|
56
64
|
}
|
|
57
65
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams& arg) {
|
|
58
66
|
jsi::Object obj(runtime);
|
|
59
|
-
obj.setProperty(runtime, "transactionId", JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
|
|
67
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "transactionId"), JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
|
|
60
68
|
return obj;
|
|
61
69
|
}
|
|
62
70
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -67,7 +75,7 @@ namespace margelo::nitro {
|
|
|
67
75
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
68
76
|
return false;
|
|
69
77
|
}
|
|
70
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "transactionId"))) return false;
|
|
78
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionId")))) return false;
|
|
71
79
|
return true;
|
|
72
80
|
}
|
|
73
81
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FirmwareArtifactCapabilities.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -33,7 +38,7 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
33
38
|
/**
|
|
34
39
|
* A struct which can be represented as a JavaScript object (FirmwareArtifactCapabilities).
|
|
35
40
|
*/
|
|
36
|
-
struct FirmwareArtifactCapabilities {
|
|
41
|
+
struct FirmwareArtifactCapabilities final {
|
|
37
42
|
public:
|
|
38
43
|
double firmwareArtifactProtocolVersion SWIFT_PRIVATE;
|
|
39
44
|
std::vector<std::string> supportedRouteTypes SWIFT_PRIVATE;
|
|
@@ -43,6 +48,9 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
43
48
|
public:
|
|
44
49
|
FirmwareArtifactCapabilities() = default;
|
|
45
50
|
explicit FirmwareArtifactCapabilities(double firmwareArtifactProtocolVersion, std::vector<std::string> supportedRouteTypes, bool supportsArchiveMaterialization, double maxReadBytes): firmwareArtifactProtocolVersion(firmwareArtifactProtocolVersion), supportedRouteTypes(supportedRouteTypes), supportsArchiveMaterialization(supportsArchiveMaterialization), maxReadBytes(maxReadBytes) {}
|
|
51
|
+
|
|
52
|
+
public:
|
|
53
|
+
friend bool operator==(const FirmwareArtifactCapabilities& lhs, const FirmwareArtifactCapabilities& rhs) = default;
|
|
46
54
|
};
|
|
47
55
|
|
|
48
56
|
} // namespace margelo::nitro::reactnativerangedownloader
|
|
@@ -55,18 +63,18 @@ namespace margelo::nitro {
|
|
|
55
63
|
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
64
|
jsi::Object obj = arg.asObject(runtime);
|
|
57
65
|
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities(
|
|
58
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "firmwareArtifactProtocolVersion")),
|
|
59
|
-
JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "supportedRouteTypes")),
|
|
60
|
-
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, "supportsArchiveMaterialization")),
|
|
61
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "maxReadBytes"))
|
|
66
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "firmwareArtifactProtocolVersion"))),
|
|
67
|
+
JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "supportedRouteTypes"))),
|
|
68
|
+
JSIConverter<bool>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "supportsArchiveMaterialization"))),
|
|
69
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxReadBytes")))
|
|
62
70
|
);
|
|
63
71
|
}
|
|
64
72
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities& arg) {
|
|
65
73
|
jsi::Object obj(runtime);
|
|
66
|
-
obj.setProperty(runtime, "firmwareArtifactProtocolVersion", JSIConverter<double>::toJSI(runtime, arg.firmwareArtifactProtocolVersion));
|
|
67
|
-
obj.setProperty(runtime, "supportedRouteTypes", JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.supportedRouteTypes));
|
|
68
|
-
obj.setProperty(runtime, "supportsArchiveMaterialization", JSIConverter<bool>::toJSI(runtime, arg.supportsArchiveMaterialization));
|
|
69
|
-
obj.setProperty(runtime, "maxReadBytes", JSIConverter<double>::toJSI(runtime, arg.maxReadBytes));
|
|
74
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "firmwareArtifactProtocolVersion"), JSIConverter<double>::toJSI(runtime, arg.firmwareArtifactProtocolVersion));
|
|
75
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "supportedRouteTypes"), JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.supportedRouteTypes));
|
|
76
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "supportsArchiveMaterialization"), JSIConverter<bool>::toJSI(runtime, arg.supportsArchiveMaterialization));
|
|
77
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maxReadBytes"), JSIConverter<double>::toJSI(runtime, arg.maxReadBytes));
|
|
70
78
|
return obj;
|
|
71
79
|
}
|
|
72
80
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -77,10 +85,10 @@ namespace margelo::nitro {
|
|
|
77
85
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
78
86
|
return false;
|
|
79
87
|
}
|
|
80
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "firmwareArtifactProtocolVersion"))) return false;
|
|
81
|
-
if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, "supportedRouteTypes"))) return false;
|
|
82
|
-
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, "supportsArchiveMaterialization"))) return false;
|
|
83
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "maxReadBytes"))) return false;
|
|
88
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "firmwareArtifactProtocolVersion")))) return false;
|
|
89
|
+
if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "supportedRouteTypes")))) return false;
|
|
90
|
+
if (!JSIConverter<bool>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "supportsArchiveMaterialization")))) return false;
|
|
91
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxReadBytes")))) return false;
|
|
84
92
|
return true;
|
|
85
93
|
}
|
|
86
94
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FirmwareArtifactDownloadParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -33,7 +38,7 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
33
38
|
/**
|
|
34
39
|
* A struct which can be represented as a JavaScript object (FirmwareArtifactDownloadParams).
|
|
35
40
|
*/
|
|
36
|
-
struct FirmwareArtifactDownloadParams {
|
|
41
|
+
struct FirmwareArtifactDownloadParams final {
|
|
37
42
|
public:
|
|
38
43
|
std::string taskId SWIFT_PRIVATE;
|
|
39
44
|
std::string transactionId SWIFT_PRIVATE;
|
|
@@ -50,6 +55,9 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
50
55
|
public:
|
|
51
56
|
FirmwareArtifactDownloadParams() = default;
|
|
52
57
|
explicit FirmwareArtifactDownloadParams(std::string taskId, std::string transactionId, std::string leaseRef, std::string artifactId, std::string url, std::string routeType, std::optional<std::string> resolvedIp, std::optional<double> expectedSize, std::optional<std::string> expectedSha256, double maxBytes, std::optional<double> overallDeadlineSeconds): taskId(taskId), transactionId(transactionId), leaseRef(leaseRef), artifactId(artifactId), url(url), routeType(routeType), resolvedIp(resolvedIp), expectedSize(expectedSize), expectedSha256(expectedSha256), maxBytes(maxBytes), overallDeadlineSeconds(overallDeadlineSeconds) {}
|
|
58
|
+
|
|
59
|
+
public:
|
|
60
|
+
friend bool operator==(const FirmwareArtifactDownloadParams& lhs, const FirmwareArtifactDownloadParams& rhs) = default;
|
|
53
61
|
};
|
|
54
62
|
|
|
55
63
|
} // namespace margelo::nitro::reactnativerangedownloader
|
|
@@ -62,32 +70,32 @@ namespace margelo::nitro {
|
|
|
62
70
|
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
63
71
|
jsi::Object obj = arg.asObject(runtime);
|
|
64
72
|
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams(
|
|
65
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "taskId")),
|
|
66
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "transactionId")),
|
|
67
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef")),
|
|
68
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "artifactId")),
|
|
69
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "url")),
|
|
70
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "routeType")),
|
|
71
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "resolvedIp")),
|
|
72
|
-
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "expectedSize")),
|
|
73
|
-
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "expectedSha256")),
|
|
74
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "maxBytes")),
|
|
75
|
-
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, "overallDeadlineSeconds"))
|
|
73
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "taskId"))),
|
|
74
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionId"))),
|
|
75
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef"))),
|
|
76
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifactId"))),
|
|
77
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "url"))),
|
|
78
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "routeType"))),
|
|
79
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "resolvedIp"))),
|
|
80
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expectedSize"))),
|
|
81
|
+
JSIConverter<std::optional<std::string>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expectedSha256"))),
|
|
82
|
+
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxBytes"))),
|
|
83
|
+
JSIConverter<std::optional<double>>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "overallDeadlineSeconds")))
|
|
76
84
|
);
|
|
77
85
|
}
|
|
78
86
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams& arg) {
|
|
79
87
|
jsi::Object obj(runtime);
|
|
80
|
-
obj.setProperty(runtime, "taskId", JSIConverter<std::string>::toJSI(runtime, arg.taskId));
|
|
81
|
-
obj.setProperty(runtime, "transactionId", JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
|
|
82
|
-
obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
|
|
83
|
-
obj.setProperty(runtime, "artifactId", JSIConverter<std::string>::toJSI(runtime, arg.artifactId));
|
|
84
|
-
obj.setProperty(runtime, "url", JSIConverter<std::string>::toJSI(runtime, arg.url));
|
|
85
|
-
obj.setProperty(runtime, "routeType", JSIConverter<std::string>::toJSI(runtime, arg.routeType));
|
|
86
|
-
obj.setProperty(runtime, "resolvedIp", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.resolvedIp));
|
|
87
|
-
obj.setProperty(runtime, "expectedSize", JSIConverter<std::optional<double>>::toJSI(runtime, arg.expectedSize));
|
|
88
|
-
obj.setProperty(runtime, "expectedSha256", JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.expectedSha256));
|
|
89
|
-
obj.setProperty(runtime, "maxBytes", JSIConverter<double>::toJSI(runtime, arg.maxBytes));
|
|
90
|
-
obj.setProperty(runtime, "overallDeadlineSeconds", JSIConverter<std::optional<double>>::toJSI(runtime, arg.overallDeadlineSeconds));
|
|
88
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "taskId"), JSIConverter<std::string>::toJSI(runtime, arg.taskId));
|
|
89
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "transactionId"), JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
|
|
90
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "leaseRef"), JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
|
|
91
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "artifactId"), JSIConverter<std::string>::toJSI(runtime, arg.artifactId));
|
|
92
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "url"), JSIConverter<std::string>::toJSI(runtime, arg.url));
|
|
93
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "routeType"), JSIConverter<std::string>::toJSI(runtime, arg.routeType));
|
|
94
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "resolvedIp"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.resolvedIp));
|
|
95
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "expectedSize"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.expectedSize));
|
|
96
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "expectedSha256"), JSIConverter<std::optional<std::string>>::toJSI(runtime, arg.expectedSha256));
|
|
97
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "maxBytes"), JSIConverter<double>::toJSI(runtime, arg.maxBytes));
|
|
98
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "overallDeadlineSeconds"), JSIConverter<std::optional<double>>::toJSI(runtime, arg.overallDeadlineSeconds));
|
|
91
99
|
return obj;
|
|
92
100
|
}
|
|
93
101
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -98,17 +106,17 @@ namespace margelo::nitro {
|
|
|
98
106
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
99
107
|
return false;
|
|
100
108
|
}
|
|
101
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "taskId"))) return false;
|
|
102
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "transactionId"))) return false;
|
|
103
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
|
|
104
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "artifactId"))) return false;
|
|
105
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "url"))) return false;
|
|
106
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "routeType"))) return false;
|
|
107
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "resolvedIp"))) return false;
|
|
108
|
-
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "expectedSize"))) return false;
|
|
109
|
-
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, "expectedSha256"))) return false;
|
|
110
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "maxBytes"))) return false;
|
|
111
|
-
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, "overallDeadlineSeconds"))) return false;
|
|
109
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "taskId")))) return false;
|
|
110
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionId")))) return false;
|
|
111
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef")))) return false;
|
|
112
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "artifactId")))) return false;
|
|
113
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "url")))) return false;
|
|
114
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "routeType")))) return false;
|
|
115
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "resolvedIp")))) return false;
|
|
116
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expectedSize")))) return false;
|
|
117
|
+
if (!JSIConverter<std::optional<std::string>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "expectedSha256")))) return false;
|
|
118
|
+
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "maxBytes")))) return false;
|
|
119
|
+
if (!JSIConverter<std::optional<double>>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "overallDeadlineSeconds")))) return false;
|
|
112
120
|
return true;
|
|
113
121
|
}
|
|
114
122
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FirmwareArtifactLease.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,13 +37,16 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (FirmwareArtifactLease).
|
|
34
39
|
*/
|
|
35
|
-
struct FirmwareArtifactLease {
|
|
40
|
+
struct FirmwareArtifactLease final {
|
|
36
41
|
public:
|
|
37
42
|
std::string leaseRef SWIFT_PRIVATE;
|
|
38
43
|
|
|
39
44
|
public:
|
|
40
45
|
FirmwareArtifactLease() = default;
|
|
41
46
|
explicit FirmwareArtifactLease(std::string leaseRef): leaseRef(leaseRef) {}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
friend bool operator==(const FirmwareArtifactLease& lhs, const FirmwareArtifactLease& rhs) = default;
|
|
42
50
|
};
|
|
43
51
|
|
|
44
52
|
} // namespace margelo::nitro::reactnativerangedownloader
|
|
@@ -51,12 +59,12 @@ namespace margelo::nitro {
|
|
|
51
59
|
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
60
|
jsi::Object obj = arg.asObject(runtime);
|
|
53
61
|
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease(
|
|
54
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef"))
|
|
62
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef")))
|
|
55
63
|
);
|
|
56
64
|
}
|
|
57
65
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease& arg) {
|
|
58
66
|
jsi::Object obj(runtime);
|
|
59
|
-
obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
|
|
67
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "leaseRef"), JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
|
|
60
68
|
return obj;
|
|
61
69
|
}
|
|
62
70
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -67,7 +75,7 @@ namespace margelo::nitro {
|
|
|
67
75
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
68
76
|
return false;
|
|
69
77
|
}
|
|
70
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
|
|
78
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "leaseRef")))) return false;
|
|
71
79
|
return true;
|
|
72
80
|
}
|
|
73
81
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// FirmwareArtifactLeaseCreateParams.hpp
|
|
3
3
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
4
|
/// https://github.com/mrousavy/nitro
|
|
5
|
-
/// Copyright ©
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
6
|
///
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
@@ -22,6 +22,11 @@
|
|
|
22
22
|
#else
|
|
23
23
|
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
24
|
#endif
|
|
25
|
+
#if __has_include(<NitroModules/PropNameIDCache.hpp>)
|
|
26
|
+
#include <NitroModules/PropNameIDCache.hpp>
|
|
27
|
+
#else
|
|
28
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
29
|
+
#endif
|
|
25
30
|
|
|
26
31
|
|
|
27
32
|
|
|
@@ -32,13 +37,16 @@ namespace margelo::nitro::reactnativerangedownloader {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (FirmwareArtifactLeaseCreateParams).
|
|
34
39
|
*/
|
|
35
|
-
struct FirmwareArtifactLeaseCreateParams {
|
|
40
|
+
struct FirmwareArtifactLeaseCreateParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string transactionId SWIFT_PRIVATE;
|
|
38
43
|
|
|
39
44
|
public:
|
|
40
45
|
FirmwareArtifactLeaseCreateParams() = default;
|
|
41
46
|
explicit FirmwareArtifactLeaseCreateParams(std::string transactionId): transactionId(transactionId) {}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
friend bool operator==(const FirmwareArtifactLeaseCreateParams& lhs, const FirmwareArtifactLeaseCreateParams& rhs) = default;
|
|
42
50
|
};
|
|
43
51
|
|
|
44
52
|
} // namespace margelo::nitro::reactnativerangedownloader
|
|
@@ -51,12 +59,12 @@ namespace margelo::nitro {
|
|
|
51
59
|
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseCreateParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
60
|
jsi::Object obj = arg.asObject(runtime);
|
|
53
61
|
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseCreateParams(
|
|
54
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "transactionId"))
|
|
62
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionId")))
|
|
55
63
|
);
|
|
56
64
|
}
|
|
57
65
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseCreateParams& arg) {
|
|
58
66
|
jsi::Object obj(runtime);
|
|
59
|
-
obj.setProperty(runtime, "transactionId", JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
|
|
67
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "transactionId"), JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
|
|
60
68
|
return obj;
|
|
61
69
|
}
|
|
62
70
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -67,7 +75,7 @@ namespace margelo::nitro {
|
|
|
67
75
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
68
76
|
return false;
|
|
69
77
|
}
|
|
70
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "transactionId"))) return false;
|
|
78
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "transactionId")))) return false;
|
|
71
79
|
return true;
|
|
72
80
|
}
|
|
73
81
|
};
|