@onekeyfe/react-native-range-downloader 3.0.81-alpha.8 → 3.0.81
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 +0 -8
- package/android/build.gradle +0 -1
- package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/ReactNativeRangeDownloader.kt +0 -144
- package/ios/RangeDownloadLogic.swift +0 -120
- package/ios/ReactNativeRangeDownloader.swift +6 -623
- package/lib/module/index.js +1 -2
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts +1 -91
- package/lib/typescript/src/ReactNativeRangeDownloader.nitro.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/nitrogen/generated/android/c++/JDownloadChannel.hpp +0 -3
- package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.cpp +0 -248
- package/nitrogen/generated/android/c++/JHybridReactNativeRangeDownloaderSpec.hpp +0 -12
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/DownloadChannel.kt +1 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/HybridReactNativeRangeDownloaderSpec.kt +0 -49
- package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.cpp +0 -48
- package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Bridge.hpp +0 -329
- package/nitrogen/generated/ios/ReactNativeRangeDownloader-Swift-Cxx-Umbrella.hpp +0 -53
- package/nitrogen/generated/ios/c++/HybridReactNativeRangeDownloaderSpecSwift.hpp +0 -152
- package/nitrogen/generated/ios/swift/DownloadChannel.swift +0 -4
- package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec.swift +0 -12
- package/nitrogen/generated/ios/swift/HybridReactNativeRangeDownloaderSpec_cxx.swift +0 -221
- package/nitrogen/generated/shared/c++/DownloadChannel.hpp +0 -4
- package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.cpp +0 -12
- package/nitrogen/generated/shared/c++/HybridReactNativeRangeDownloaderSpec.hpp +0 -58
- package/package.json +2 -4
- package/src/ReactNativeRangeDownloader.nitro.ts +1 -127
- package/src/index.tsx +1 -3
- package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveRules.kt +0 -284
- package/android/src/main/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactStore.kt +0 -774
- package/android/src/test/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveRulesTest.kt +0 -75
- package/android/src/test/java/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactDeadlineTest.kt +0 -26
- package/ios/FirmwareArchiveMinizipBridge.h +0 -33
- package/ios/FirmwareArchiveMinizipBridge.mm +0 -213
- package/ios/FirmwareArtifactStore.swift +0 -1445
- package/ios/FirmwareBackgroundSessionEventRouter.swift +0 -17
- package/nitrogen/generated/android/c++/JFirmwareArchiveExpectedEntry.hpp +0 -69
- package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeParams.hpp +0 -86
- package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializeResult.hpp +0 -80
- package/nitrogen/generated/android/c++/JFirmwareArchiveMaterializedArtifact.hpp +0 -63
- package/nitrogen/generated/android/c++/JFirmwareArtifactCancelParams.hpp +0 -57
- package/nitrogen/generated/android/c++/JFirmwareArtifactCapabilities.hpp +0 -88
- package/nitrogen/generated/android/c++/JFirmwareArtifactDownloadParams.hpp +0 -98
- package/nitrogen/generated/android/c++/JFirmwareArtifactLease.hpp +0 -57
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseCreateParams.hpp +0 -57
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseReleaseParams.hpp +0 -61
- package/nitrogen/generated/android/c++/JFirmwareArtifactLeaseRetainParams.hpp +0 -61
- package/nitrogen/generated/android/c++/JFirmwareArtifactReaderCloseParams.hpp +0 -57
- package/nitrogen/generated/android/c++/JFirmwareArtifactReaderInfo.hpp +0 -61
- package/nitrogen/generated/android/c++/JFirmwareArtifactReaderReadParams.hpp +0 -65
- package/nitrogen/generated/android/c++/JFirmwareArtifactReceipt.hpp +0 -65
- package/nitrogen/generated/android/c++/JFirmwareArtifactRefParams.hpp +0 -57
- package/nitrogen/generated/android/c++/JFirmwareArtifactSweepResult.hpp +0 -61
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveExpectedEntry.kt +0 -47
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeParams.kt +0 -44
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializeResult.kt +0 -38
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArchiveMaterializedArtifact.kt +0 -41
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCancelParams.kt +0 -38
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactCapabilities.kt +0 -47
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactDownloadParams.kt +0 -68
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLease.kt +0 -38
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseCreateParams.kt +0 -38
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseReleaseParams.kt +0 -41
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactLeaseRetainParams.kt +0 -41
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderCloseParams.kt +0 -38
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderInfo.kt +0 -41
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReaderReadParams.kt +0 -44
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactReceipt.kt +0 -44
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactRefParams.kt +0 -38
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/reactnativerangedownloader/FirmwareArtifactSweepResult.kt +0 -41
- package/nitrogen/generated/ios/swift/FirmwareArchiveExpectedEntry.swift +0 -69
- package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeParams.swift +0 -70
- package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializeResult.swift +0 -48
- package/nitrogen/generated/ios/swift/FirmwareArchiveMaterializedArtifact.swift +0 -47
- package/nitrogen/generated/ios/swift/FirmwareArtifactCancelParams.swift +0 -36
- package/nitrogen/generated/ios/swift/FirmwareArtifactCapabilities.swift +0 -81
- package/nitrogen/generated/ios/swift/FirmwareArtifactDownloadParams.swift +0 -177
- package/nitrogen/generated/ios/swift/FirmwareArtifactLease.swift +0 -36
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseCreateParams.swift +0 -36
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseReleaseParams.swift +0 -47
- package/nitrogen/generated/ios/swift/FirmwareArtifactLeaseRetainParams.swift +0 -47
- package/nitrogen/generated/ios/swift/FirmwareArtifactReaderCloseParams.swift +0 -36
- package/nitrogen/generated/ios/swift/FirmwareArtifactReaderInfo.swift +0 -47
- package/nitrogen/generated/ios/swift/FirmwareArtifactReaderReadParams.swift +0 -58
- package/nitrogen/generated/ios/swift/FirmwareArtifactReceipt.swift +0 -58
- package/nitrogen/generated/ios/swift/FirmwareArtifactRefParams.swift +0 -36
- package/nitrogen/generated/ios/swift/FirmwareArtifactSweepResult.swift +0 -47
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArchiveMaterializeResult.swift +0 -47
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactLease.swift +0 -47
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReaderInfo.swift +0 -47
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactReceipt.swift +0 -47
- package/nitrogen/generated/ios/swift/Func_void_FirmwareArtifactSweepResult.swift +0 -47
- package/nitrogen/generated/ios/swift/Func_void_std__shared_ptr_ArrayBuffer_.swift +0 -47
- package/nitrogen/generated/shared/c++/FirmwareArchiveExpectedEntry.hpp +0 -87
- package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeParams.hpp +0 -86
- package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializeResult.hpp +0 -77
- package/nitrogen/generated/shared/c++/FirmwareArchiveMaterializedArtifact.hpp +0 -81
- package/nitrogen/generated/shared/c++/FirmwareArtifactCancelParams.hpp +0 -75
- package/nitrogen/generated/shared/c++/FirmwareArtifactCapabilities.hpp +0 -88
- package/nitrogen/generated/shared/c++/FirmwareArtifactDownloadParams.hpp +0 -116
- package/nitrogen/generated/shared/c++/FirmwareArtifactLease.hpp +0 -75
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseCreateParams.hpp +0 -75
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseReleaseParams.hpp +0 -79
- package/nitrogen/generated/shared/c++/FirmwareArtifactLeaseRetainParams.hpp +0 -79
- package/nitrogen/generated/shared/c++/FirmwareArtifactReaderCloseParams.hpp +0 -75
- package/nitrogen/generated/shared/c++/FirmwareArtifactReaderInfo.hpp +0 -79
- package/nitrogen/generated/shared/c++/FirmwareArtifactReaderReadParams.hpp +0 -83
- package/nitrogen/generated/shared/c++/FirmwareArtifactReceipt.hpp +0 -83
- package/nitrogen/generated/shared/c++/FirmwareArtifactRefParams.hpp +0 -75
- package/nitrogen/generated/shared/c++/FirmwareArtifactSweepResult.hpp +0 -79
|
@@ -1,75 +0,0 @@
|
|
|
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
|
|
@@ -1,79 +0,0 @@
|
|
|
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
|
|
@@ -1,79 +0,0 @@
|
|
|
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
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// FirmwareArtifactReaderCloseParams.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 (FirmwareArtifactReaderCloseParams).
|
|
34
|
-
*/
|
|
35
|
-
struct FirmwareArtifactReaderCloseParams {
|
|
36
|
-
public:
|
|
37
|
-
std::string readerId SWIFT_PRIVATE;
|
|
38
|
-
|
|
39
|
-
public:
|
|
40
|
-
FirmwareArtifactReaderCloseParams() = default;
|
|
41
|
-
explicit FirmwareArtifactReaderCloseParams(std::string readerId): readerId(readerId) {}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
} // namespace margelo::nitro::reactnativerangedownloader
|
|
45
|
-
|
|
46
|
-
namespace margelo::nitro {
|
|
47
|
-
|
|
48
|
-
// C++ FirmwareArtifactReaderCloseParams <> JS FirmwareArtifactReaderCloseParams (object)
|
|
49
|
-
template <>
|
|
50
|
-
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderCloseParams> final {
|
|
51
|
-
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderCloseParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
-
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderCloseParams(
|
|
54
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "readerId"))
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderCloseParams& arg) {
|
|
58
|
-
jsi::Object obj(runtime);
|
|
59
|
-
obj.setProperty(runtime, "readerId", JSIConverter<std::string>::toJSI(runtime, arg.readerId));
|
|
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, "readerId"))) return false;
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
} // namespace margelo::nitro
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// FirmwareArtifactReaderInfo.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 (FirmwareArtifactReaderInfo).
|
|
34
|
-
*/
|
|
35
|
-
struct FirmwareArtifactReaderInfo {
|
|
36
|
-
public:
|
|
37
|
-
std::string readerId SWIFT_PRIVATE;
|
|
38
|
-
double size SWIFT_PRIVATE;
|
|
39
|
-
|
|
40
|
-
public:
|
|
41
|
-
FirmwareArtifactReaderInfo() = default;
|
|
42
|
-
explicit FirmwareArtifactReaderInfo(std::string readerId, double size): readerId(readerId), size(size) {}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
} // namespace margelo::nitro::reactnativerangedownloader
|
|
46
|
-
|
|
47
|
-
namespace margelo::nitro {
|
|
48
|
-
|
|
49
|
-
// C++ FirmwareArtifactReaderInfo <> JS FirmwareArtifactReaderInfo (object)
|
|
50
|
-
template <>
|
|
51
|
-
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderInfo> final {
|
|
52
|
-
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderInfo fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
54
|
-
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderInfo(
|
|
55
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "readerId")),
|
|
56
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "size"))
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderInfo& arg) {
|
|
60
|
-
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "readerId", JSIConverter<std::string>::toJSI(runtime, arg.readerId));
|
|
62
|
-
obj.setProperty(runtime, "size", JSIConverter<double>::toJSI(runtime, arg.size));
|
|
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, "readerId"))) return false;
|
|
74
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "size"))) return false;
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
} // namespace margelo::nitro
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// FirmwareArtifactReaderReadParams.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 (FirmwareArtifactReaderReadParams).
|
|
34
|
-
*/
|
|
35
|
-
struct FirmwareArtifactReaderReadParams {
|
|
36
|
-
public:
|
|
37
|
-
std::string readerId SWIFT_PRIVATE;
|
|
38
|
-
double offset SWIFT_PRIVATE;
|
|
39
|
-
double length SWIFT_PRIVATE;
|
|
40
|
-
|
|
41
|
-
public:
|
|
42
|
-
FirmwareArtifactReaderReadParams() = default;
|
|
43
|
-
explicit FirmwareArtifactReaderReadParams(std::string readerId, double offset, double length): readerId(readerId), offset(offset), length(length) {}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
} // namespace margelo::nitro::reactnativerangedownloader
|
|
47
|
-
|
|
48
|
-
namespace margelo::nitro {
|
|
49
|
-
|
|
50
|
-
// C++ FirmwareArtifactReaderReadParams <> JS FirmwareArtifactReaderReadParams (object)
|
|
51
|
-
template <>
|
|
52
|
-
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderReadParams> final {
|
|
53
|
-
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderReadParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
55
|
-
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderReadParams(
|
|
56
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "readerId")),
|
|
57
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "offset")),
|
|
58
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "length"))
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactReaderReadParams& arg) {
|
|
62
|
-
jsi::Object obj(runtime);
|
|
63
|
-
obj.setProperty(runtime, "readerId", JSIConverter<std::string>::toJSI(runtime, arg.readerId));
|
|
64
|
-
obj.setProperty(runtime, "offset", JSIConverter<double>::toJSI(runtime, arg.offset));
|
|
65
|
-
obj.setProperty(runtime, "length", JSIConverter<double>::toJSI(runtime, arg.length));
|
|
66
|
-
return obj;
|
|
67
|
-
}
|
|
68
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
69
|
-
if (!value.isObject()) {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
jsi::Object obj = value.getObject(runtime);
|
|
73
|
-
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "readerId"))) return false;
|
|
77
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "offset"))) return false;
|
|
78
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "length"))) return false;
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
} // namespace margelo::nitro
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// FirmwareArtifactReceipt.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 (FirmwareArtifactReceipt).
|
|
34
|
-
*/
|
|
35
|
-
struct FirmwareArtifactReceipt {
|
|
36
|
-
public:
|
|
37
|
-
std::string artifactRef SWIFT_PRIVATE;
|
|
38
|
-
double size SWIFT_PRIVATE;
|
|
39
|
-
std::string sha256 SWIFT_PRIVATE;
|
|
40
|
-
|
|
41
|
-
public:
|
|
42
|
-
FirmwareArtifactReceipt() = default;
|
|
43
|
-
explicit FirmwareArtifactReceipt(std::string artifactRef, double size, std::string sha256): artifactRef(artifactRef), size(size), sha256(sha256) {}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
} // namespace margelo::nitro::reactnativerangedownloader
|
|
47
|
-
|
|
48
|
-
namespace margelo::nitro {
|
|
49
|
-
|
|
50
|
-
// C++ FirmwareArtifactReceipt <> JS FirmwareArtifactReceipt (object)
|
|
51
|
-
template <>
|
|
52
|
-
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt> final {
|
|
53
|
-
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
54
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
55
|
-
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt(
|
|
56
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "artifactRef")),
|
|
57
|
-
JSIConverter<double>::fromJSI(runtime, obj.getProperty(runtime, "size")),
|
|
58
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "sha256"))
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactReceipt& arg) {
|
|
62
|
-
jsi::Object obj(runtime);
|
|
63
|
-
obj.setProperty(runtime, "artifactRef", JSIConverter<std::string>::toJSI(runtime, arg.artifactRef));
|
|
64
|
-
obj.setProperty(runtime, "size", JSIConverter<double>::toJSI(runtime, arg.size));
|
|
65
|
-
obj.setProperty(runtime, "sha256", JSIConverter<std::string>::toJSI(runtime, arg.sha256));
|
|
66
|
-
return obj;
|
|
67
|
-
}
|
|
68
|
-
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
69
|
-
if (!value.isObject()) {
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
jsi::Object obj = value.getObject(runtime);
|
|
73
|
-
if (!nitro::isPlainObject(runtime, obj)) {
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "artifactRef"))) return false;
|
|
77
|
-
if (!JSIConverter<double>::canConvert(runtime, obj.getProperty(runtime, "size"))) return false;
|
|
78
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "sha256"))) return false;
|
|
79
|
-
return true;
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
} // namespace margelo::nitro
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
///
|
|
2
|
-
/// FirmwareArtifactRefParams.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 (FirmwareArtifactRefParams).
|
|
34
|
-
*/
|
|
35
|
-
struct FirmwareArtifactRefParams {
|
|
36
|
-
public:
|
|
37
|
-
std::string artifactRef SWIFT_PRIVATE;
|
|
38
|
-
|
|
39
|
-
public:
|
|
40
|
-
FirmwareArtifactRefParams() = default;
|
|
41
|
-
explicit FirmwareArtifactRefParams(std::string artifactRef): artifactRef(artifactRef) {}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
} // namespace margelo::nitro::reactnativerangedownloader
|
|
45
|
-
|
|
46
|
-
namespace margelo::nitro {
|
|
47
|
-
|
|
48
|
-
// C++ FirmwareArtifactRefParams <> JS FirmwareArtifactRefParams (object)
|
|
49
|
-
template <>
|
|
50
|
-
struct JSIConverter<margelo::nitro::reactnativerangedownloader::FirmwareArtifactRefParams> final {
|
|
51
|
-
static inline margelo::nitro::reactnativerangedownloader::FirmwareArtifactRefParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
|
-
jsi::Object obj = arg.asObject(runtime);
|
|
53
|
-
return margelo::nitro::reactnativerangedownloader::FirmwareArtifactRefParams(
|
|
54
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "artifactRef"))
|
|
55
|
-
);
|
|
56
|
-
}
|
|
57
|
-
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::reactnativerangedownloader::FirmwareArtifactRefParams& arg) {
|
|
58
|
-
jsi::Object obj(runtime);
|
|
59
|
-
obj.setProperty(runtime, "artifactRef", JSIConverter<std::string>::toJSI(runtime, arg.artifactRef));
|
|
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, "artifactRef"))) return false;
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
} // namespace margelo::nitro
|