@onekeyfe/react-native-keychain-module 3.0.81 → 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/nitrogen/generated/android/c++/JGetItemParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JGetItemResult.hpp +2 -2
- package/nitrogen/generated/android/c++/JHasItemParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JHybridKeychainModuleSpec.cpp +26 -24
- package/nitrogen/generated/android/c++/JHybridKeychainModuleSpec.hpp +20 -22
- package/nitrogen/generated/android/c++/JRemoveItemParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JSetItemParams.hpp +2 -2
- package/nitrogen/generated/android/c++/JVariant_NullType_GetItemResult.cpp +1 -1
- package/nitrogen/generated/android/c++/JVariant_NullType_GetItemResult.hpp +6 -6
- package/nitrogen/generated/android/keychainmodule+autolinking.cmake +1 -1
- package/nitrogen/generated/android/keychainmodule+autolinking.gradle +1 -1
- package/nitrogen/generated/android/keychainmoduleOnLoad.cpp +27 -17
- package/nitrogen/generated/android/keychainmoduleOnLoad.hpp +14 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/keychainmodule/GetItemParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/keychainmodule/GetItemResult.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/keychainmodule/HasItemParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/keychainmodule/HybridKeychainModuleSpec.kt +16 -19
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/keychainmodule/RemoveItemParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/keychainmodule/SetItemParams.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/keychainmodule/Variant_NullType_GetItemResult.kt +1 -7
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/keychainmodule/keychainmoduleOnLoad.kt +1 -1
- package/nitrogen/generated/ios/KeychainModule+autolinking.rb +2 -2
- package/nitrogen/generated/ios/KeychainModule-Swift-Cxx-Bridge.cpp +1 -1
- package/nitrogen/generated/ios/KeychainModule-Swift-Cxx-Bridge.hpp +4 -4
- package/nitrogen/generated/ios/KeychainModule-Swift-Cxx-Umbrella.hpp +1 -1
- package/nitrogen/generated/ios/KeychainModuleAutolinking.mm +1 -1
- package/nitrogen/generated/ios/KeychainModuleAutolinking.swift +9 -8
- package/nitrogen/generated/ios/c++/HybridKeychainModuleSpecSwift.cpp +1 -1
- package/nitrogen/generated/ios/c++/HybridKeychainModuleSpecSwift.hpp +7 -1
- package/nitrogen/generated/ios/swift/Func_void.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_bool.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__exception_ptr.swift +1 -2
- package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__GetItemResult_.swift +1 -2
- package/nitrogen/generated/ios/swift/GetItemParams.swift +3 -10
- package/nitrogen/generated/ios/swift/GetItemResult.swift +5 -18
- package/nitrogen/generated/ios/swift/HasItemParams.swift +3 -10
- package/nitrogen/generated/ios/swift/HybridKeychainModuleSpec.swift +3 -4
- package/nitrogen/generated/ios/swift/HybridKeychainModuleSpec_cxx.swift +9 -2
- package/nitrogen/generated/ios/swift/RemoveItemParams.swift +3 -10
- package/nitrogen/generated/ios/swift/SetItemParams.swift +32 -81
- package/nitrogen/generated/ios/swift/Variant_NullType_GetItemResult.swift +1 -1
- package/nitrogen/generated/shared/c++/GetItemParams.hpp +13 -5
- package/nitrogen/generated/shared/c++/GetItemResult.hpp +16 -8
- package/nitrogen/generated/shared/c++/HasItemParams.hpp +13 -5
- package/nitrogen/generated/shared/c++/HybridKeychainModuleSpec.cpp +1 -1
- package/nitrogen/generated/shared/c++/HybridKeychainModuleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/RemoveItemParams.hpp +13 -5
- package/nitrogen/generated/shared/c++/SetItemParams.hpp +25 -17
- package/package.json +4 -4
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// KeychainModule-Swift-Cxx-Bridge.cpp
|
|
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
|
#include "KeychainModule-Swift-Cxx-Bridge.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// KeychainModule-Swift-Cxx-Bridge.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
|
|
@@ -105,7 +105,7 @@ namespace margelo::nitro::keychainmodule::bridge::swift {
|
|
|
105
105
|
return optional.has_value();
|
|
106
106
|
}
|
|
107
107
|
inline bool get_std__optional_bool_(const std::optional<bool>& optional) noexcept {
|
|
108
|
-
return
|
|
108
|
+
return optional.value();
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
// pragma MARK: std::optional<std::string>
|
|
@@ -120,7 +120,7 @@ namespace margelo::nitro::keychainmodule::bridge::swift {
|
|
|
120
120
|
return optional.has_value();
|
|
121
121
|
}
|
|
122
122
|
inline std::string get_std__optional_std__string_(const std::optional<std::string>& optional) noexcept {
|
|
123
|
-
return
|
|
123
|
+
return optional.value();
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
// pragma MARK: std::variant<nitro::NullType, GetItemResult>
|
|
@@ -129,7 +129,7 @@ namespace margelo::nitro::keychainmodule::bridge::swift {
|
|
|
129
129
|
* std::variant cannot be used in Swift because of a Swift bug.
|
|
130
130
|
* Not even specializing it works. So we create a wrapper struct.
|
|
131
131
|
*/
|
|
132
|
-
struct std__variant_nitro__NullType__GetItemResult_ {
|
|
132
|
+
struct std__variant_nitro__NullType__GetItemResult_ final {
|
|
133
133
|
std::variant<nitro::NullType, GetItemResult> variant;
|
|
134
134
|
std__variant_nitro__NullType__GetItemResult_(std::variant<nitro::NullType, GetItemResult> variant): variant(variant) { }
|
|
135
135
|
operator std::variant<nitro::NullType, GetItemResult>() const noexcept {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// KeychainModuleAutolinking.mm
|
|
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
|
#import <Foundation/Foundation.h>
|
|
@@ -2,19 +2,16 @@
|
|
|
2
2
|
/// KeychainModuleAutolinking.swift
|
|
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
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
// TODO: Use empty enums once Swift supports exporting them as namespaces
|
|
11
|
+
// See: https://github.com/swiftlang/swift/pull/83616
|
|
8
12
|
public final class KeychainModuleAutolinking {
|
|
9
13
|
public typealias bridge = margelo.nitro.keychainmodule.bridge.swift
|
|
10
14
|
|
|
11
|
-
/**
|
|
12
|
-
* Creates an instance of a Swift class that implements `HybridKeychainModuleSpec`,
|
|
13
|
-
* and wraps it in a Swift class that can directly interop with C++ (`HybridKeychainModuleSpec_cxx`)
|
|
14
|
-
*
|
|
15
|
-
* This is generated by Nitrogen and will initialize the class specified
|
|
16
|
-
* in the `"autolinking"` property of `nitro.json` (in this case, `KeychainModule`).
|
|
17
|
-
*/
|
|
18
15
|
public static func createKeychainModule() -> bridge.std__shared_ptr_HybridKeychainModuleSpec_ {
|
|
19
16
|
let hybridObject = KeychainModule()
|
|
20
17
|
return { () -> bridge.std__shared_ptr_HybridKeychainModuleSpec_ in
|
|
@@ -22,4 +19,8 @@ public final class KeychainModuleAutolinking {
|
|
|
22
19
|
return __cxxWrapped.getCxxPart()
|
|
23
20
|
}()
|
|
24
21
|
}
|
|
22
|
+
|
|
23
|
+
public static func isKeychainModuleRecyclable() -> Bool {
|
|
24
|
+
return KeychainModule.self is any RecyclableView.Type
|
|
25
|
+
}
|
|
25
26
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridKeychainModuleSpecSwift.cpp
|
|
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
|
#include "HybridKeychainModuleSpecSwift.hpp"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// HybridKeychainModuleSpecSwift.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
|
|
@@ -65,6 +65,12 @@ namespace margelo::nitro::keychainmodule {
|
|
|
65
65
|
inline size_t getExternalMemorySize() noexcept override {
|
|
66
66
|
return _swiftPart.getMemorySize();
|
|
67
67
|
}
|
|
68
|
+
bool equals(const std::shared_ptr<HybridObject>& other) override {
|
|
69
|
+
if (auto otherCast = std::dynamic_pointer_cast<HybridKeychainModuleSpecSwift>(other)) {
|
|
70
|
+
return _swiftPart.equals(otherCast->_swiftPart);
|
|
71
|
+
}
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
68
74
|
void dispose() noexcept override {
|
|
69
75
|
_swiftPart.dispose();
|
|
70
76
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_bool.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_std__exception_ptr.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
package/nitrogen/generated/ios/swift/Func_void_std__variant_nitro__NullType__GetItemResult_.swift
CHANGED
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// Func_void_std__variant_nitro__NullType__GetItemResult_.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// GetItemParams.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -23,14 +22,8 @@ public extension GetItemParams {
|
|
|
23
22
|
self.init(std.string(key))
|
|
24
23
|
}
|
|
25
24
|
|
|
25
|
+
@inline(__always)
|
|
26
26
|
var key: String {
|
|
27
|
-
|
|
28
|
-
get {
|
|
29
|
-
return String(self.__key)
|
|
30
|
-
}
|
|
31
|
-
@inline(__always)
|
|
32
|
-
set {
|
|
33
|
-
self.__key = std.string(newValue)
|
|
34
|
-
}
|
|
27
|
+
return String(self.__key)
|
|
35
28
|
}
|
|
36
29
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// GetItemResult.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -23,25 +22,13 @@ public extension GetItemResult {
|
|
|
23
22
|
self.init(std.string(key), std.string(value))
|
|
24
23
|
}
|
|
25
24
|
|
|
25
|
+
@inline(__always)
|
|
26
26
|
var key: String {
|
|
27
|
-
|
|
28
|
-
get {
|
|
29
|
-
return String(self.__key)
|
|
30
|
-
}
|
|
31
|
-
@inline(__always)
|
|
32
|
-
set {
|
|
33
|
-
self.__key = std.string(newValue)
|
|
34
|
-
}
|
|
27
|
+
return String(self.__key)
|
|
35
28
|
}
|
|
36
29
|
|
|
30
|
+
@inline(__always)
|
|
37
31
|
var value: String {
|
|
38
|
-
|
|
39
|
-
get {
|
|
40
|
-
return String(self.__value)
|
|
41
|
-
}
|
|
42
|
-
@inline(__always)
|
|
43
|
-
set {
|
|
44
|
-
self.__value = std.string(newValue)
|
|
45
|
-
}
|
|
32
|
+
return String(self.__value)
|
|
46
33
|
}
|
|
47
34
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// HasItemParams.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -23,14 +22,8 @@ public extension HasItemParams {
|
|
|
23
22
|
self.init(std.string(key))
|
|
24
23
|
}
|
|
25
24
|
|
|
25
|
+
@inline(__always)
|
|
26
26
|
var key: String {
|
|
27
|
-
|
|
28
|
-
get {
|
|
29
|
-
return String(self.__key)
|
|
30
|
-
}
|
|
31
|
-
@inline(__always)
|
|
32
|
-
set {
|
|
33
|
-
self.__key = std.string(newValue)
|
|
34
|
-
}
|
|
27
|
+
return String(self.__key)
|
|
35
28
|
}
|
|
36
29
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// HybridKeychainModuleSpec.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/// See ``HybridKeychainModuleSpec``
|
|
@@ -34,14 +33,14 @@ open class HybridKeychainModuleSpec_base {
|
|
|
34
33
|
public init() { }
|
|
35
34
|
public func getCxxWrapper() -> HybridKeychainModuleSpec_cxx {
|
|
36
35
|
#if DEBUG
|
|
37
|
-
guard self is HybridKeychainModuleSpec else {
|
|
36
|
+
guard self is any HybridKeychainModuleSpec else {
|
|
38
37
|
fatalError("`self` is not a `HybridKeychainModuleSpec`! Did you accidentally inherit from `HybridKeychainModuleSpec_base` instead of `HybridKeychainModuleSpec`?")
|
|
39
38
|
}
|
|
40
39
|
#endif
|
|
41
40
|
if let cxxWrapper = self.cxxWrapper {
|
|
42
41
|
return cxxWrapper
|
|
43
42
|
} else {
|
|
44
|
-
let cxxWrapper = HybridKeychainModuleSpec_cxx(self as! HybridKeychainModuleSpec)
|
|
43
|
+
let cxxWrapper = HybridKeychainModuleSpec_cxx(self as! any HybridKeychainModuleSpec)
|
|
45
44
|
self.cxxWrapper = cxxWrapper
|
|
46
45
|
return cxxWrapper
|
|
47
46
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// HybridKeychainModuleSpec_cxx.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -96,6 +95,14 @@ open class HybridKeychainModuleSpec_cxx {
|
|
|
96
95
|
return MemoryHelper.getSizeOf(self.__implementation) + self.__implementation.memorySize
|
|
97
96
|
}
|
|
98
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Compares this object with the given [other] object for reference equality.
|
|
100
|
+
*/
|
|
101
|
+
@inline(__always)
|
|
102
|
+
public func equals(other: HybridKeychainModuleSpec_cxx) -> Bool {
|
|
103
|
+
return self.__implementation === other.__implementation
|
|
104
|
+
}
|
|
105
|
+
|
|
99
106
|
/**
|
|
100
107
|
* Call dispose() on the Swift class.
|
|
101
108
|
* This _may_ be called manually from JS.
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// RemoveItemParams.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -23,14 +22,8 @@ public extension RemoveItemParams {
|
|
|
23
22
|
self.init(std.string(key))
|
|
24
23
|
}
|
|
25
24
|
|
|
25
|
+
@inline(__always)
|
|
26
26
|
var key: String {
|
|
27
|
-
|
|
28
|
-
get {
|
|
29
|
-
return String(self.__key)
|
|
30
|
-
}
|
|
31
|
-
@inline(__always)
|
|
32
|
-
set {
|
|
33
|
-
self.__key = std.string(newValue)
|
|
34
|
-
}
|
|
27
|
+
return String(self.__key)
|
|
35
28
|
}
|
|
36
29
|
}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/// SetItemParams.swift
|
|
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
|
-
import Foundation
|
|
9
8
|
import NitroModules
|
|
10
9
|
|
|
11
10
|
/**
|
|
@@ -41,97 +40,49 @@ public extension SetItemParams {
|
|
|
41
40
|
}())
|
|
42
41
|
}
|
|
43
42
|
|
|
43
|
+
@inline(__always)
|
|
44
44
|
var key: String {
|
|
45
|
-
|
|
46
|
-
get {
|
|
47
|
-
return String(self.__key)
|
|
48
|
-
}
|
|
49
|
-
@inline(__always)
|
|
50
|
-
set {
|
|
51
|
-
self.__key = std.string(newValue)
|
|
52
|
-
}
|
|
45
|
+
return String(self.__key)
|
|
53
46
|
}
|
|
54
47
|
|
|
48
|
+
@inline(__always)
|
|
55
49
|
var value: String {
|
|
56
|
-
|
|
57
|
-
get {
|
|
58
|
-
return String(self.__value)
|
|
59
|
-
}
|
|
60
|
-
@inline(__always)
|
|
61
|
-
set {
|
|
62
|
-
self.__value = std.string(newValue)
|
|
63
|
-
}
|
|
50
|
+
return String(self.__value)
|
|
64
51
|
}
|
|
65
52
|
|
|
53
|
+
@inline(__always)
|
|
66
54
|
var enableSync: Bool? {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
}()
|
|
77
|
-
}
|
|
78
|
-
@inline(__always)
|
|
79
|
-
set {
|
|
80
|
-
self.__enableSync = { () -> bridge.std__optional_bool_ in
|
|
81
|
-
if let __unwrappedValue = newValue {
|
|
82
|
-
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
83
|
-
} else {
|
|
84
|
-
return .init()
|
|
85
|
-
}
|
|
86
|
-
}()
|
|
87
|
-
}
|
|
55
|
+
return { () -> Bool? in
|
|
56
|
+
if bridge.has_value_std__optional_bool_(self.__enableSync) {
|
|
57
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__enableSync)
|
|
58
|
+
return __unwrapped
|
|
59
|
+
} else {
|
|
60
|
+
return nil
|
|
61
|
+
}
|
|
62
|
+
}()
|
|
88
63
|
}
|
|
89
64
|
|
|
65
|
+
@inline(__always)
|
|
90
66
|
var label: String? {
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
100
|
-
}()
|
|
101
|
-
}
|
|
102
|
-
@inline(__always)
|
|
103
|
-
set {
|
|
104
|
-
self.__label = { () -> bridge.std__optional_std__string_ in
|
|
105
|
-
if let __unwrappedValue = newValue {
|
|
106
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
107
|
-
} else {
|
|
108
|
-
return .init()
|
|
109
|
-
}
|
|
110
|
-
}()
|
|
111
|
-
}
|
|
67
|
+
return { () -> String? in
|
|
68
|
+
if bridge.has_value_std__optional_std__string_(self.__label) {
|
|
69
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__label)
|
|
70
|
+
return String(__unwrapped)
|
|
71
|
+
} else {
|
|
72
|
+
return nil
|
|
73
|
+
}
|
|
74
|
+
}()
|
|
112
75
|
}
|
|
113
76
|
|
|
77
|
+
@inline(__always)
|
|
114
78
|
var description: String? {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
}
|
|
124
|
-
}()
|
|
125
|
-
}
|
|
126
|
-
@inline(__always)
|
|
127
|
-
set {
|
|
128
|
-
self.__description = { () -> bridge.std__optional_std__string_ in
|
|
129
|
-
if let __unwrappedValue = newValue {
|
|
130
|
-
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
131
|
-
} else {
|
|
132
|
-
return .init()
|
|
133
|
-
}
|
|
134
|
-
}()
|
|
135
|
-
}
|
|
79
|
+
return { () -> String? in
|
|
80
|
+
if bridge.has_value_std__optional_std__string_(self.__description) {
|
|
81
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__description)
|
|
82
|
+
return String(__unwrapped)
|
|
83
|
+
} else {
|
|
84
|
+
return nil
|
|
85
|
+
}
|
|
86
|
+
}()
|
|
136
87
|
}
|
|
137
88
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// GetItemParams.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::keychainmodule {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (GetItemParams).
|
|
34
39
|
*/
|
|
35
|
-
struct GetItemParams {
|
|
40
|
+
struct GetItemParams final {
|
|
36
41
|
public:
|
|
37
42
|
std::string key SWIFT_PRIVATE;
|
|
38
43
|
|
|
39
44
|
public:
|
|
40
45
|
GetItemParams() = default;
|
|
41
46
|
explicit GetItemParams(std::string key): key(key) {}
|
|
47
|
+
|
|
48
|
+
public:
|
|
49
|
+
friend bool operator==(const GetItemParams& lhs, const GetItemParams& rhs) = default;
|
|
42
50
|
};
|
|
43
51
|
|
|
44
52
|
} // namespace margelo::nitro::keychainmodule
|
|
@@ -51,12 +59,12 @@ namespace margelo::nitro {
|
|
|
51
59
|
static inline margelo::nitro::keychainmodule::GetItemParams fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
52
60
|
jsi::Object obj = arg.asObject(runtime);
|
|
53
61
|
return margelo::nitro::keychainmodule::GetItemParams(
|
|
54
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "key"))
|
|
62
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "key")))
|
|
55
63
|
);
|
|
56
64
|
}
|
|
57
65
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::keychainmodule::GetItemParams& arg) {
|
|
58
66
|
jsi::Object obj(runtime);
|
|
59
|
-
obj.setProperty(runtime, "key", JSIConverter<std::string>::toJSI(runtime, arg.key));
|
|
67
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "key"), JSIConverter<std::string>::toJSI(runtime, arg.key));
|
|
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, "key"))) return false;
|
|
78
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "key")))) return false;
|
|
71
79
|
return true;
|
|
72
80
|
}
|
|
73
81
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/// GetItemResult.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,7 +37,7 @@ namespace margelo::nitro::keychainmodule {
|
|
|
32
37
|
/**
|
|
33
38
|
* A struct which can be represented as a JavaScript object (GetItemResult).
|
|
34
39
|
*/
|
|
35
|
-
struct GetItemResult {
|
|
40
|
+
struct GetItemResult final {
|
|
36
41
|
public:
|
|
37
42
|
std::string key SWIFT_PRIVATE;
|
|
38
43
|
std::string value SWIFT_PRIVATE;
|
|
@@ -40,6 +45,9 @@ namespace margelo::nitro::keychainmodule {
|
|
|
40
45
|
public:
|
|
41
46
|
GetItemResult() = default;
|
|
42
47
|
explicit GetItemResult(std::string key, std::string value): key(key), value(value) {}
|
|
48
|
+
|
|
49
|
+
public:
|
|
50
|
+
friend bool operator==(const GetItemResult& lhs, const GetItemResult& rhs) = default;
|
|
43
51
|
};
|
|
44
52
|
|
|
45
53
|
} // namespace margelo::nitro::keychainmodule
|
|
@@ -52,14 +60,14 @@ namespace margelo::nitro {
|
|
|
52
60
|
static inline margelo::nitro::keychainmodule::GetItemResult fromJSI(jsi::Runtime& runtime, const jsi::Value& arg) {
|
|
53
61
|
jsi::Object obj = arg.asObject(runtime);
|
|
54
62
|
return margelo::nitro::keychainmodule::GetItemResult(
|
|
55
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "key")),
|
|
56
|
-
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, "value"))
|
|
63
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "key"))),
|
|
64
|
+
JSIConverter<std::string>::fromJSI(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value")))
|
|
57
65
|
);
|
|
58
66
|
}
|
|
59
67
|
static inline jsi::Value toJSI(jsi::Runtime& runtime, const margelo::nitro::keychainmodule::GetItemResult& arg) {
|
|
60
68
|
jsi::Object obj(runtime);
|
|
61
|
-
obj.setProperty(runtime, "key", JSIConverter<std::string>::toJSI(runtime, arg.key));
|
|
62
|
-
obj.setProperty(runtime, "value", JSIConverter<std::string>::toJSI(runtime, arg.value));
|
|
69
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "key"), JSIConverter<std::string>::toJSI(runtime, arg.key));
|
|
70
|
+
obj.setProperty(runtime, PropNameIDCache::get(runtime, "value"), JSIConverter<std::string>::toJSI(runtime, arg.value));
|
|
63
71
|
return obj;
|
|
64
72
|
}
|
|
65
73
|
static inline bool canConvert(jsi::Runtime& runtime, const jsi::Value& value) {
|
|
@@ -70,8 +78,8 @@ namespace margelo::nitro {
|
|
|
70
78
|
if (!nitro::isPlainObject(runtime, obj)) {
|
|
71
79
|
return false;
|
|
72
80
|
}
|
|
73
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "key"))) return false;
|
|
74
|
-
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, "value"))) return false;
|
|
81
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "key")))) return false;
|
|
82
|
+
if (!JSIConverter<std::string>::canConvert(runtime, obj.getProperty(runtime, PropNameIDCache::get(runtime, "value")))) return false;
|
|
75
83
|
return true;
|
|
76
84
|
}
|
|
77
85
|
};
|