@onekeyfe/react-native-range-downloader 3.0.80 → 3.0.81-alpha.1
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 +8 -0
- package/android/build.gradle +1 -0
- package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveRules.kt +284 -0
- package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactStore.kt +842 -0
- package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/ReactNativeRangeDownloader.kt +148 -0
- package/android/src/test/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveRulesTest.kt +75 -0
- package/ios/FirmwareArchiveMinizipBridge.h +33 -0
- package/ios/FirmwareArchiveMinizipBridge.mm +213 -0
- package/ios/FirmwareArtifactStore.swift +1276 -0
- package/ios/FirmwareBackgroundSessionEventRouter.swift +17 -0
- package/ios/ReactNativeRangeDownloader.swift +638 -6
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts +95 -1
- package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JDownloadChannel.hpp +3 -0
- package/nitrogen/generated/android/c++/JFirmwareArchiveExpectedEntry.hpp +69 -0
- package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeParams.hpp +86 -0
- package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeResult.hpp +80 -0
- package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializedArtifact.hpp +63 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactCancelParams.hpp +57 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactCapabilities.hpp +88 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactDownloadParams.hpp +98 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactLease.hpp +57 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseCreateParams.hpp +57 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseReconcileParams.hpp +76 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseReleaseParams.hpp +61 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseRetainParams.hpp +61 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactReaderCloseParams.hpp +57 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactReaderInfo.hpp +61 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactReaderReadParams.hpp +65 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactReceipt.hpp +65 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactRefParams.hpp +57 -0
- package/nitrogen/generated/android/c++/JFirmwareArtifactSweepResult.hpp +61 -0
- package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.cpp +267 -0
- package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.hpp +13 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/DownloadChannel.kt +2 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveExpectedEntry.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeParams.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeResult.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializedArtifact.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCancelParams.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCapabilities.kt +47 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactDownloadParams.kt +68 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLease.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseCreateParams.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseReconcileParams.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseReleaseParams.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseRetainParams.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderCloseParams.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderInfo.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderReadParams.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReceipt.kt +44 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactRefParams.kt +38 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactSweepResult.kt +41 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/HybridReactNativeRangeDownloaderSpec.kt +53 -0
- package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.cpp +48 -0
- package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.hpp +329 -0
- package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Umbrella.hpp +56 -0
- package/nitrogen/generated/ios/c++/HybridReactNativeRangeDownloaderSpecSwift.hpp +163 -0
- package/nitrogen/generated/ios/swift/DownloadChannel.swift +4 -0
- package/nitrogen/generated/ios/swift/FirmwareArchiveExpectedEntry.swift +69 -0
- package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeParams.swift +70 -0
- package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeResult.swift +48 -0
- package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializedArtifact.swift +47 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactCancelParams.swift +36 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactCapabilities.swift +81 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactDownloadParams.swift +177 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactLease.swift +36 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseCreateParams.swift +36 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseReconcileParams.swift +48 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseReleaseParams.swift +47 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseRetainParams.swift +47 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactReaderCloseParams.swift +36 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactReaderInfo.swift +47 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactReaderReadParams.swift +58 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactReceipt.swift +58 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactRefParams.swift +36 -0
- package/nitrogen/generated/ios/swift/FirmwareArtifactSweepResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArchiveMaterializeResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactLease.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReaderInfo.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReceipt.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactSweepResult.swift +47 -0
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +47 -0
- package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec.swift +13 -0
- package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec_cxx.swift +240 -0
- package/nitrogen/generated/shared/c++/DownloadChannel.hpp +4 -0
- package/nitrogen/generated/shared/c++/FirmwareArchiveExpectedEntry.hpp +87 -0
- package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeParams.hpp +86 -0
- package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeResult.hpp +77 -0
- package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializedArtifact.hpp +81 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactCancelParams.hpp +75 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactCapabilities.hpp +88 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactDownloadParams.hpp +116 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactLease.hpp +75 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseCreateParams.hpp +75 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseReconcileParams.hpp +76 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseReleaseParams.hpp +79 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseRetainParams.hpp +79 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactReaderCloseParams.hpp +75 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactReaderInfo.hpp +79 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactReaderReadParams.hpp +83 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactReceipt.hpp +83 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactRefParams.hpp +75 -0
- package/nitrogen/generated/shared/c++/FirmwareArtifactSweepResult.hpp +79 -0
- package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.cpp +13 -0
- package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.hpp +62 -0
- package/package.json +4 -2
- package/src/ReactNativeRangeDownloader.nitro.ts +134 -1
- package/src/index.tsx +3 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// FirmwareArtifactCancelParams.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::reactnativerangedownloader {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (FirmwareArtifactCancelParams).
|
|
34
|
+
*/
|
|
35
|
+
struct FirmwareArtifactCancelParams {
|
|
36
|
+
public:
|
|
37
|
+
std::string transactionId SWIFT_PRIVATE;
|
|
38
|
+
|
|
39
|
+
public:
|
|
40
|
+
FirmwareArtifactCancelParams() = default;
|
|
41
|
+
explicit FirmwareArtifactCancelParams(std::string transactionId): transactionId(transactionId) {}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
} // namespace margelo::nitro::reactnativerangedownloader
|
|
45
|
+
|
|
46
|
+
namespace margelo::nitro {
|
|
47
|
+
|
|
48
|
+
// C++ FirmwareArtifactCancelParams <> JS FirmwareArtifactCancelParams (object)
|
|
49
|
+
template <>
|
|
50
|
+
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams> final {
|
|
51
|
+
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
+
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams(
|
|
54
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "transactionId"))
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactCancelParams& arg) {
|
|
58
|
+
jsi::Object obj(runtime);
|
|
59
|
+
obj.setProperty(runtime, "transactionId", JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
|
|
60
|
+
return obj;
|
|
61
|
+
}
|
|
62
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
63
|
+
if (!value.isObject()) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
jsi::Object obj = value.getObject(runtime);
|
|
67
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "transactionId"))) return false;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// FirmwareArtifactCapabilities.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
#include <vector>
|
|
30
|
+
|
|
31
|
+
namespace margelo::nitro::reactnativerangedownloader {
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A struct which can be represented as a JavaScript object (FirmwareArtifactCapabilities).
|
|
35
|
+
*/
|
|
36
|
+
struct FirmwareArtifactCapabilities {
|
|
37
|
+
public:
|
|
38
|
+
double firmwareArtifactProtocolVersion SWIFT_PRIVATE;
|
|
39
|
+
std::vector<std::string> supportedRouteTypes SWIFT_PRIVATE;
|
|
40
|
+
bool supportsArchiveMaterialization SWIFT_PRIVATE;
|
|
41
|
+
double maxReadBytes SWIFT_PRIVATE;
|
|
42
|
+
|
|
43
|
+
public:
|
|
44
|
+
FirmwareArtifactCapabilities() = default;
|
|
45
|
+
explicit FirmwareArtifactCapabilities(double firmwareArtifactProtocolVersion, std::vector<std::string> supportedRouteTypes, bool supportsArchiveMaterialization, double maxReadBytes): firmwareArtifactProtocolVersion(firmwareArtifactProtocolVersion), supportedRouteTypes(supportedRouteTypes), supportsArchiveMaterialization(supportsArchiveMaterialization), maxReadBytes(maxReadBytes) {}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
} // namespace margelo::nitro::reactnativerangedownloader
|
|
49
|
+
|
|
50
|
+
namespace margelo::nitro {
|
|
51
|
+
|
|
52
|
+
// C++ FirmwareArtifactCapabilities <> JS FirmwareArtifactCapabilities (object)
|
|
53
|
+
template <>
|
|
54
|
+
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities> final {
|
|
55
|
+
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
56
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
57
|
+
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"))
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactCapabilities& arg) {
|
|
65
|
+
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));
|
|
70
|
+
return obj;
|
|
71
|
+
}
|
|
72
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
73
|
+
if (!value.isObject()) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
jsi::Object obj = value.getObject(runtime);
|
|
77
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
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;
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// FirmwareArtifactDownloadParams.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
#include <optional>
|
|
30
|
+
|
|
31
|
+
namespace margelo::nitro::reactnativerangedownloader {
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A struct which can be represented as a JavaScript object (FirmwareArtifactDownloadParams).
|
|
35
|
+
*/
|
|
36
|
+
struct FirmwareArtifactDownloadParams {
|
|
37
|
+
public:
|
|
38
|
+
std::string taskId SWIFT_PRIVATE;
|
|
39
|
+
std::string transactionId SWIFT_PRIVATE;
|
|
40
|
+
std::string leaseRef SWIFT_PRIVATE;
|
|
41
|
+
std::string artifactId SWIFT_PRIVATE;
|
|
42
|
+
std::string url SWIFT_PRIVATE;
|
|
43
|
+
std::string routeType SWIFT_PRIVATE;
|
|
44
|
+
std::optional<std::string> resolvedIp SWIFT_PRIVATE;
|
|
45
|
+
double expectedSize SWIFT_PRIVATE;
|
|
46
|
+
std::string expectedSha256 SWIFT_PRIVATE;
|
|
47
|
+
double maxBytes SWIFT_PRIVATE;
|
|
48
|
+
std::optional<double> overallDeadlineSeconds SWIFT_PRIVATE;
|
|
49
|
+
|
|
50
|
+
public:
|
|
51
|
+
FirmwareArtifactDownloadParams() = default;
|
|
52
|
+
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, double expectedSize, 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) {}
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
} // namespace margelo::nitro::reactnativerangedownloader
|
|
56
|
+
|
|
57
|
+
namespace margelo::nitro {
|
|
58
|
+
|
|
59
|
+
// C++ FirmwareArtifactDownloadParams <> JS FirmwareArtifactDownloadParams (object)
|
|
60
|
+
template <>
|
|
61
|
+
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams> final {
|
|
62
|
+
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
63
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
64
|
+
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<double>::fromJSI(runtime, obj.getProperty(runtime, "expectedSize")),
|
|
73
|
+
JSIConverter<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"))
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactDownloadParams& arg) {
|
|
79
|
+
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<double>::toJSI(runtime, arg.expectedSize));
|
|
88
|
+
obj.setProperty(runtime, "expectedSha256", JSIConverter<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));
|
|
91
|
+
return obj;
|
|
92
|
+
}
|
|
93
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
94
|
+
if (!value.isObject()) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
jsi::Object obj = value.getObject(runtime);
|
|
98
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
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<double>::canConvert(runtime, obj.getProperty(runtime, "expectedSize"))) return false;
|
|
109
|
+
if (!JSIConverter<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;
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// FirmwareArtifactLease.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::reactnativerangedownloader {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (FirmwareArtifactLease).
|
|
34
|
+
*/
|
|
35
|
+
struct FirmwareArtifactLease {
|
|
36
|
+
public:
|
|
37
|
+
std::string leaseRef SWIFT_PRIVATE;
|
|
38
|
+
|
|
39
|
+
public:
|
|
40
|
+
FirmwareArtifactLease() = default;
|
|
41
|
+
explicit FirmwareArtifactLease(std::string leaseRef): leaseRef(leaseRef) {}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
} // namespace margelo::nitro::reactnativerangedownloader
|
|
45
|
+
|
|
46
|
+
namespace margelo::nitro {
|
|
47
|
+
|
|
48
|
+
// C++ FirmwareArtifactLease <> JS FirmwareArtifactLease (object)
|
|
49
|
+
template <>
|
|
50
|
+
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease> final {
|
|
51
|
+
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
+
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease(
|
|
54
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef"))
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLease& arg) {
|
|
58
|
+
jsi::Object obj(runtime);
|
|
59
|
+
obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
|
|
60
|
+
return obj;
|
|
61
|
+
}
|
|
62
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
63
|
+
if (!value.isObject()) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
jsi::Object obj = value.getObject(runtime);
|
|
67
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// FirmwareArtifactLeaseCreateParams.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::reactnativerangedownloader {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (FirmwareArtifactLeaseCreateParams).
|
|
34
|
+
*/
|
|
35
|
+
struct FirmwareArtifactLeaseCreateParams {
|
|
36
|
+
public:
|
|
37
|
+
std::string transactionId SWIFT_PRIVATE;
|
|
38
|
+
|
|
39
|
+
public:
|
|
40
|
+
FirmwareArtifactLeaseCreateParams() = default;
|
|
41
|
+
explicit FirmwareArtifactLeaseCreateParams(std::string transactionId): transactionId(transactionId) {}
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
} // namespace margelo::nitro::reactnativerangedownloader
|
|
45
|
+
|
|
46
|
+
namespace margelo::nitro {
|
|
47
|
+
|
|
48
|
+
// C++ FirmwareArtifactLeaseCreateParams <> JS FirmwareArtifactLeaseCreateParams (object)
|
|
49
|
+
template <>
|
|
50
|
+
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseCreateParams> final {
|
|
51
|
+
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseCreateParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
+
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseCreateParams(
|
|
54
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "transactionId"))
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseCreateParams& arg) {
|
|
58
|
+
jsi::Object obj(runtime);
|
|
59
|
+
obj.setProperty(runtime, "transactionId", JSIConverter<std::string>::toJSI(runtime, arg.transactionId));
|
|
60
|
+
return obj;
|
|
61
|
+
}
|
|
62
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
63
|
+
if (!value.isObject()) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
jsi::Object obj = value.getObject(runtime);
|
|
67
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "transactionId"))) return false;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// FirmwareArtifactLeaseReconcileParams.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
#include <vector>
|
|
30
|
+
|
|
31
|
+
namespace margelo::nitro::reactnativerangedownloader {
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A struct which can be represented as a JavaScript object (FirmwareArtifactLeaseReconcileParams).
|
|
35
|
+
*/
|
|
36
|
+
struct FirmwareArtifactLeaseReconcileParams {
|
|
37
|
+
public:
|
|
38
|
+
std::vector<std::string> activeLeaseRefs SWIFT_PRIVATE;
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
FirmwareArtifactLeaseReconcileParams() = default;
|
|
42
|
+
explicit FirmwareArtifactLeaseReconcileParams(std::vector<std::string> activeLeaseRefs): activeLeaseRefs(activeLeaseRefs) {}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} // namespace margelo::nitro::reactnativerangedownloader
|
|
46
|
+
|
|
47
|
+
namespace margelo::nitro {
|
|
48
|
+
|
|
49
|
+
// C++ FirmwareArtifactLeaseReconcileParams <> JS FirmwareArtifactLeaseReconcileParams (object)
|
|
50
|
+
template <>
|
|
51
|
+
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReconcileParams> final {
|
|
52
|
+
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReconcileParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
+
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReconcileParams(
|
|
55
|
+
JSIConverter<std::vector<std::string>>::fromJSI(runtime, obj.getProperty(runtime, "activeLeaseRefs"))
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReconcileParams& arg) {
|
|
59
|
+
jsi::Object obj(runtime);
|
|
60
|
+
obj.setProperty(runtime, "activeLeaseRefs", JSIConverter<std::vector<std::string>>::toJSI(runtime, arg.activeLeaseRefs));
|
|
61
|
+
return obj;
|
|
62
|
+
}
|
|
63
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
64
|
+
if (!value.isObject()) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
jsi::Object obj = value.getObject(runtime);
|
|
68
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
if (!JSIConverter<std::vector<std::string>>::canConvert(runtime, obj.getProperty(runtime, "activeLeaseRefs"))) return false;
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// FirmwareArtifactLeaseReleaseParams.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::reactnativerangedownloader {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (FirmwareArtifactLeaseReleaseParams).
|
|
34
|
+
*/
|
|
35
|
+
struct FirmwareArtifactLeaseReleaseParams {
|
|
36
|
+
public:
|
|
37
|
+
std::string leaseRef SWIFT_PRIVATE;
|
|
38
|
+
std::string disposition SWIFT_PRIVATE;
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
FirmwareArtifactLeaseReleaseParams() = default;
|
|
42
|
+
explicit FirmwareArtifactLeaseReleaseParams(std::string leaseRef, std::string disposition): leaseRef(leaseRef), disposition(disposition) {}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} // namespace margelo::nitro::reactnativerangedownloader
|
|
46
|
+
|
|
47
|
+
namespace margelo::nitro {
|
|
48
|
+
|
|
49
|
+
// C++ FirmwareArtifactLeaseReleaseParams <> JS FirmwareArtifactLeaseReleaseParams (object)
|
|
50
|
+
template <>
|
|
51
|
+
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReleaseParams> final {
|
|
52
|
+
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReleaseParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
+
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReleaseParams(
|
|
55
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef")),
|
|
56
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "disposition"))
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseReleaseParams& arg) {
|
|
60
|
+
jsi::Object obj(runtime);
|
|
61
|
+
obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
|
|
62
|
+
obj.setProperty(runtime, "disposition", JSIConverter<std::string>::toJSI(runtime, arg.disposition));
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
66
|
+
if (!value.isObject()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
|
|
74
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "disposition"))) return false;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
} // namespace margelo::nitro
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// FirmwareArtifactLeaseRetainParams.hpp
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © 2026 Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#if __has_include(<NitroModules/JSIConverter.hpp>)
|
|
11
|
+
#include <NitroModules/JSIConverter.hpp>
|
|
12
|
+
#else
|
|
13
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
14
|
+
#endif
|
|
15
|
+
#if __has_include(<NitroModules/NitroDefines.hpp>)
|
|
16
|
+
#include <NitroModules/NitroDefines.hpp>
|
|
17
|
+
#else
|
|
18
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
19
|
+
#endif
|
|
20
|
+
#if __has_include(<NitroModules/JSIHelpers.hpp>)
|
|
21
|
+
#include <NitroModules/JSIHelpers.hpp>
|
|
22
|
+
#else
|
|
23
|
+
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
#include <string>
|
|
29
|
+
|
|
30
|
+
namespace margelo::nitro::reactnativerangedownloader {
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* A struct which can be represented as a JavaScript object (FirmwareArtifactLeaseRetainParams).
|
|
34
|
+
*/
|
|
35
|
+
struct FirmwareArtifactLeaseRetainParams {
|
|
36
|
+
public:
|
|
37
|
+
std::string leaseRef SWIFT_PRIVATE;
|
|
38
|
+
std::string artifactRef SWIFT_PRIVATE;
|
|
39
|
+
|
|
40
|
+
public:
|
|
41
|
+
FirmwareArtifactLeaseRetainParams() = default;
|
|
42
|
+
explicit FirmwareArtifactLeaseRetainParams(std::string leaseRef, std::string artifactRef): leaseRef(leaseRef), artifactRef(artifactRef) {}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
} // namespace margelo::nitro::reactnativerangedownloader
|
|
46
|
+
|
|
47
|
+
namespace margelo::nitro {
|
|
48
|
+
|
|
49
|
+
// C++ FirmwareArtifactLeaseRetainParams <> JS FirmwareArtifactLeaseRetainParams (object)
|
|
50
|
+
template <>
|
|
51
|
+
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseRetainParams> final {
|
|
52
|
+
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseRetainParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
+
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
+
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseRetainParams(
|
|
55
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "leaseRef")),
|
|
56
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "artifactRef"))
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactLeaseRetainParams& arg) {
|
|
60
|
+
jsi::Object obj(runtime);
|
|
61
|
+
obj.setProperty(runtime, "leaseRef", JSIConverter<std::string>::toJSI(runtime, arg.leaseRef));
|
|
62
|
+
obj.setProperty(runtime, "artifactRef", JSIConverter<std::string>::toJSI(runtime, arg.artifactRef));
|
|
63
|
+
return obj;
|
|
64
|
+
}
|
|
65
|
+
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
66
|
+
if (!value.isObject()) {
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
jsi::Object obj = value.getObject(runtime);
|
|
70
|
+
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "leaseRef"))) return false;
|
|
74
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "artifactRef"))) return false;
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
} // namespace margelo::nitro
|