react-native-security-pack 1.0.0 → 1.0.2
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/package.json +4 -1
- package/android/generated/java/com/leerman/rnsecuritypack/NativeSecurityPackSpec.java +0 -42
- package/android/generated/jni/CMakeLists.txt +0 -49
- package/android/generated/jni/RNSecurityPackSpec-generated.cpp +0 -38
- package/android/generated/jni/RNSecurityPackSpec.h +0 -31
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/ComponentDescriptors.cpp +0 -22
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/ComponentDescriptors.h +0 -24
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/EventEmitters.cpp +0 -16
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/EventEmitters.h +0 -17
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/Props.cpp +0 -19
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/Props.h +0 -18
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/RNSecurityPackSpecJSI-generated.cpp +0 -32
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/RNSecurityPackSpecJSI.h +0 -76
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/ShadowNodes.cpp +0 -17
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/ShadowNodes.h +0 -23
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/States.cpp +0 -16
- package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/States.h +0 -19
- package/ios/generated/RNSecurityPackSpec/ComponentDescriptors.cpp +0 -22
- package/ios/generated/RNSecurityPackSpec/ComponentDescriptors.h +0 -24
- package/ios/generated/RNSecurityPackSpec/EventEmitters.cpp +0 -16
- package/ios/generated/RNSecurityPackSpec/EventEmitters.h +0 -17
- package/ios/generated/RNSecurityPackSpec/Props.cpp +0 -19
- package/ios/generated/RNSecurityPackSpec/Props.h +0 -18
- package/ios/generated/RNSecurityPackSpec/RCTComponentViewHelpers.h +0 -18
- package/ios/generated/RNSecurityPackSpec/RNSecurityPackSpec-generated.mm +0 -36
- package/ios/generated/RNSecurityPackSpec/RNSecurityPackSpec.h +0 -52
- package/ios/generated/RNSecurityPackSpec/ShadowNodes.cpp +0 -17
- package/ios/generated/RNSecurityPackSpec/ShadowNodes.h +0 -23
- package/ios/generated/RNSecurityPackSpec/States.cpp +0 -16
- package/ios/generated/RNSecurityPackSpec/States.h +0 -19
- package/ios/generated/RNSecurityPackSpecJSI-generated.cpp +0 -32
- package/ios/generated/RNSecurityPackSpecJSI.h +0 -76
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-security-pack",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "security",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/commonjs/index.js",
|
|
7
7
|
"module": "./lib/module/index.js",
|
|
8
|
+
"types": "./lib/typescript/module/src/index.d.ts",
|
|
8
9
|
"exports": {
|
|
9
10
|
".": {
|
|
10
11
|
"import": {
|
|
@@ -25,11 +26,13 @@
|
|
|
25
26
|
"cpp",
|
|
26
27
|
"*.podspec",
|
|
27
28
|
"!ios/build",
|
|
29
|
+
"!ios/generated",
|
|
28
30
|
"!android/build",
|
|
29
31
|
"!android/gradle",
|
|
30
32
|
"!android/gradlew",
|
|
31
33
|
"!android/gradlew.bat",
|
|
32
34
|
"!android/local.properties",
|
|
35
|
+
"!android/generated",
|
|
33
36
|
"!**/__tests__",
|
|
34
37
|
"!**/__fixtures__",
|
|
35
38
|
"!**/__mocks__",
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJavaSpec.js
|
|
9
|
-
*
|
|
10
|
-
* @nolint
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
package com.leerman.rnsecuritypack;
|
|
14
|
-
|
|
15
|
-
import com.facebook.proguard.annotations.DoNotStrip;
|
|
16
|
-
import com.facebook.react.bridge.Promise;
|
|
17
|
-
import com.facebook.react.bridge.ReactApplicationContext;
|
|
18
|
-
import com.facebook.react.bridge.ReactContextBaseJavaModule;
|
|
19
|
-
import com.facebook.react.bridge.ReactMethod;
|
|
20
|
-
import com.facebook.react.turbomodule.core.interfaces.TurboModule;
|
|
21
|
-
import javax.annotation.Nonnull;
|
|
22
|
-
|
|
23
|
-
public abstract class NativeSecurityPackSpec extends ReactContextBaseJavaModule implements TurboModule {
|
|
24
|
-
public static final String NAME = "SecurityPack";
|
|
25
|
-
|
|
26
|
-
public NativeSecurityPackSpec(ReactApplicationContext reactContext) {
|
|
27
|
-
super(reactContext);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
@Override
|
|
31
|
-
public @Nonnull String getName() {
|
|
32
|
-
return NAME;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
@ReactMethod
|
|
36
|
-
@DoNotStrip
|
|
37
|
-
public abstract void getSignatures(Promise promise);
|
|
38
|
-
|
|
39
|
-
@ReactMethod
|
|
40
|
-
@DoNotStrip
|
|
41
|
-
public abstract void isRooted(Promise promise);
|
|
42
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
-
#
|
|
3
|
-
# This source code is licensed under the MIT license found in the
|
|
4
|
-
# LICENSE file in the root directory of this source tree.
|
|
5
|
-
|
|
6
|
-
cmake_minimum_required(VERSION 3.13)
|
|
7
|
-
set(CMAKE_VERBOSE_MAKEFILE on)
|
|
8
|
-
|
|
9
|
-
file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/RNSecurityPackSpec/*.cpp)
|
|
10
|
-
|
|
11
|
-
add_library(
|
|
12
|
-
react_codegen_RNSecurityPackSpec
|
|
13
|
-
SHARED
|
|
14
|
-
${react_codegen_SRCS}
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
target_include_directories(react_codegen_RNSecurityPackSpec PUBLIC . react/renderer/components/RNSecurityPackSpec)
|
|
18
|
-
|
|
19
|
-
target_link_libraries(
|
|
20
|
-
react_codegen_RNSecurityPackSpec
|
|
21
|
-
fbjni
|
|
22
|
-
folly_runtime
|
|
23
|
-
glog
|
|
24
|
-
jsi
|
|
25
|
-
react_codegen_rncore
|
|
26
|
-
react_debug
|
|
27
|
-
react_nativemodule_core
|
|
28
|
-
react_render_componentregistry
|
|
29
|
-
react_render_core
|
|
30
|
-
react_render_debug
|
|
31
|
-
react_render_graphics
|
|
32
|
-
react_render_imagemanager
|
|
33
|
-
react_render_mapbuffer
|
|
34
|
-
react_utils
|
|
35
|
-
rrc_image
|
|
36
|
-
rrc_view
|
|
37
|
-
turbomodulejsijni
|
|
38
|
-
yoga
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
target_compile_options(
|
|
42
|
-
react_codegen_RNSecurityPackSpec
|
|
43
|
-
PRIVATE
|
|
44
|
-
-DLOG_TAG=\"ReactNative\"
|
|
45
|
-
-fexceptions
|
|
46
|
-
-frtti
|
|
47
|
-
-std=c++20
|
|
48
|
-
-Wall
|
|
49
|
-
)
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "RNSecurityPackSpec.h"
|
|
12
|
-
|
|
13
|
-
namespace facebook::react {
|
|
14
|
-
|
|
15
|
-
static facebook::jsi::Value __hostFunction_NativeSecurityPackSpecJSI_getSignatures(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
16
|
-
static jmethodID cachedMethodId = nullptr;
|
|
17
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "getSignatures", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
static facebook::jsi::Value __hostFunction_NativeSecurityPackSpecJSI_isRooted(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
21
|
-
static jmethodID cachedMethodId = nullptr;
|
|
22
|
-
return static_cast<JavaTurboModule &>(turboModule).invokeJavaMethod(rt, PromiseKind, "isRooted", "(Lcom/facebook/react/bridge/Promise;)V", args, count, cachedMethodId);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
NativeSecurityPackSpecJSI::NativeSecurityPackSpecJSI(const JavaTurboModule::InitParams ¶ms)
|
|
26
|
-
: JavaTurboModule(params) {
|
|
27
|
-
methodMap_["getSignatures"] = MethodMetadata {0, __hostFunction_NativeSecurityPackSpecJSI_getSignatures};
|
|
28
|
-
methodMap_["isRooted"] = MethodMetadata {0, __hostFunction_NativeSecurityPackSpecJSI_isRooted};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
std::shared_ptr<TurboModule> RNSecurityPackSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms) {
|
|
32
|
-
if (moduleName == "SecurityPack") {
|
|
33
|
-
return std::make_shared<NativeSecurityPackSpecJSI>(params);
|
|
34
|
-
}
|
|
35
|
-
return nullptr;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
} // namespace facebook::react
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateModuleJniH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include <ReactCommon/JavaTurboModule.h>
|
|
14
|
-
#include <ReactCommon/TurboModule.h>
|
|
15
|
-
#include <jsi/jsi.h>
|
|
16
|
-
|
|
17
|
-
namespace facebook::react {
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* JNI C++ class for module 'NativeSecurityPack'
|
|
21
|
-
*/
|
|
22
|
-
class JSI_EXPORT NativeSecurityPackSpecJSI : public JavaTurboModule {
|
|
23
|
-
public:
|
|
24
|
-
NativeSecurityPackSpecJSI(const JavaTurboModule::InitParams ¶ms);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
JSI_EXPORT
|
|
29
|
-
std::shared_ptr<TurboModule> RNSecurityPackSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams ¶ms);
|
|
30
|
-
|
|
31
|
-
} // namespace facebook::react
|
package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/ComponentDescriptors.cpp
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateComponentDescriptorCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "ComponentDescriptors.h"
|
|
12
|
-
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
13
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
void RNSecurityPackSpec_registerComponentDescriptorsFromCodegen(
|
|
18
|
-
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
} // namespace facebook::react
|
package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/ComponentDescriptors.h
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include "ShadowNodes.h"
|
|
14
|
-
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
16
|
-
|
|
17
|
-
namespace facebook::react {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
void RNSecurityPackSpec_registerComponentDescriptorsFromCodegen(
|
|
22
|
-
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
|
|
23
|
-
|
|
24
|
-
} // namespace facebook::react
|
package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/EventEmitters.cpp
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "EventEmitters.h"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
namespace facebook::react {
|
|
15
|
-
|
|
16
|
-
} // namespace facebook::react
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
} // namespace facebook::react
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GeneratePropsCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "Props.h"
|
|
12
|
-
#include <react/renderer/core/PropsParserContext.h>
|
|
13
|
-
#include <react/renderer/core/propsConversions.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} // namespace facebook::react
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GeneratePropsH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
namespace facebook::react {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} // namespace facebook::react
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#include "RNSecurityPackSpecJSI.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
static jsi::Value __hostFunction_NativeSecurityPackCxxSpecJSI_getSignatures(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
-
return static_cast<NativeSecurityPackCxxSpecJSI *>(&turboModule)->getSignatures(
|
|
16
|
-
rt
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
static jsi::Value __hostFunction_NativeSecurityPackCxxSpecJSI_isRooted(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
20
|
-
return static_cast<NativeSecurityPackCxxSpecJSI *>(&turboModule)->isRooted(
|
|
21
|
-
rt
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
NativeSecurityPackCxxSpecJSI::NativeSecurityPackCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
26
|
-
: TurboModule("SecurityPack", jsInvoker) {
|
|
27
|
-
methodMap_["getSignatures"] = MethodMetadata {0, __hostFunction_NativeSecurityPackCxxSpecJSI_getSignatures};
|
|
28
|
-
methodMap_["isRooted"] = MethodMetadata {0, __hostFunction_NativeSecurityPackCxxSpecJSI_isRooted};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} // namespace facebook::react
|
package/android/generated/jni/react/renderer/components/RNSecurityPackSpec/RNSecurityPackSpecJSI.h
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleH.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <ReactCommon/TurboModule.h>
|
|
13
|
-
#include <react/bridging/Bridging.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class JSI_EXPORT NativeSecurityPackCxxSpecJSI : public TurboModule {
|
|
19
|
-
protected:
|
|
20
|
-
NativeSecurityPackCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
-
|
|
22
|
-
public:
|
|
23
|
-
virtual jsi::Value getSignatures(jsi::Runtime &rt) = 0;
|
|
24
|
-
virtual jsi::Value isRooted(jsi::Runtime &rt) = 0;
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
template <typename T>
|
|
29
|
-
class JSI_EXPORT NativeSecurityPackCxxSpec : public TurboModule {
|
|
30
|
-
public:
|
|
31
|
-
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
32
|
-
return delegate_.get(rt, propName);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
static constexpr std::string_view kModuleName = "SecurityPack";
|
|
36
|
-
|
|
37
|
-
protected:
|
|
38
|
-
NativeSecurityPackCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
39
|
-
: TurboModule(std::string{NativeSecurityPackCxxSpec::kModuleName}, jsInvoker),
|
|
40
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
private:
|
|
44
|
-
class Delegate : public NativeSecurityPackCxxSpecJSI {
|
|
45
|
-
public:
|
|
46
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
47
|
-
NativeSecurityPackCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
jsi::Value getSignatures(jsi::Runtime &rt) override {
|
|
52
|
-
static_assert(
|
|
53
|
-
bridging::getParameterCount(&T::getSignatures) == 1,
|
|
54
|
-
"Expected getSignatures(...) to have 1 parameters");
|
|
55
|
-
|
|
56
|
-
return bridging::callFromJs<jsi::Value>(
|
|
57
|
-
rt, &T::getSignatures, jsInvoker_, instance_);
|
|
58
|
-
}
|
|
59
|
-
jsi::Value isRooted(jsi::Runtime &rt) override {
|
|
60
|
-
static_assert(
|
|
61
|
-
bridging::getParameterCount(&T::isRooted) == 1,
|
|
62
|
-
"Expected isRooted(...) to have 1 parameters");
|
|
63
|
-
|
|
64
|
-
return bridging::callFromJs<jsi::Value>(
|
|
65
|
-
rt, &T::isRooted, jsInvoker_, instance_);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
private:
|
|
69
|
-
friend class NativeSecurityPackCxxSpec;
|
|
70
|
-
T *instance_;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
Delegate delegate_;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
} // namespace facebook::react
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateShadowNodeCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "ShadowNodes.h"
|
|
12
|
-
|
|
13
|
-
namespace facebook::react {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} // namespace facebook::react
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateShadowNodeH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include "EventEmitters.h"
|
|
14
|
-
#include "Props.h"
|
|
15
|
-
#include "States.h"
|
|
16
|
-
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
|
-
#include <jsi/jsi.h>
|
|
18
|
-
|
|
19
|
-
namespace facebook::react {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} // namespace facebook::react
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateStateCpp.js
|
|
9
|
-
*/
|
|
10
|
-
#include "States.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} // namespace facebook::react
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateStateH.js
|
|
8
|
-
*/
|
|
9
|
-
#pragma once
|
|
10
|
-
|
|
11
|
-
#ifdef ANDROID
|
|
12
|
-
#include <folly/dynamic.h>
|
|
13
|
-
#endif
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} // namespace facebook::react
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateComponentDescriptorCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "ComponentDescriptors.h"
|
|
12
|
-
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
13
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
void RNSecurityPackSpec_registerComponentDescriptorsFromCodegen(
|
|
18
|
-
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
} // namespace facebook::react
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include "ShadowNodes.h"
|
|
14
|
-
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
-
#include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
|
|
16
|
-
|
|
17
|
-
namespace facebook::react {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
void RNSecurityPackSpec_registerComponentDescriptorsFromCodegen(
|
|
22
|
-
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
|
|
23
|
-
|
|
24
|
-
} // namespace facebook::react
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "EventEmitters.h"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
namespace facebook::react {
|
|
15
|
-
|
|
16
|
-
} // namespace facebook::react
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
} // namespace facebook::react
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GeneratePropsCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "Props.h"
|
|
12
|
-
#include <react/renderer/core/PropsParserContext.h>
|
|
13
|
-
#include <react/renderer/core/propsConversions.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} // namespace facebook::react
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GeneratePropsH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
namespace facebook::react {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} // namespace facebook::react
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateComponentHObjCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#import <Foundation/Foundation.h>
|
|
11
|
-
#import <React/RCTDefines.h>
|
|
12
|
-
#import <React/RCTLog.h>
|
|
13
|
-
|
|
14
|
-
NS_ASSUME_NONNULL_BEGIN
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
NS_ASSUME_NONNULL_END
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
-
*
|
|
9
|
-
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
-
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
-
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
#import "RNSecurityPackSpec.h"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
namespace facebook::react {
|
|
18
|
-
|
|
19
|
-
static facebook::jsi::Value __hostFunction_NativeSecurityPackSpecJSI_getSignatures(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
20
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "getSignatures", @selector(getSignatures:reject:), args, count);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
static facebook::jsi::Value __hostFunction_NativeSecurityPackSpecJSI_isRooted(facebook::jsi::Runtime& rt, TurboModule &turboModule, const facebook::jsi::Value* args, size_t count) {
|
|
24
|
-
return static_cast<ObjCTurboModule&>(turboModule).invokeObjCMethod(rt, PromiseKind, "isRooted", @selector(isRooted:reject:), args, count);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
NativeSecurityPackSpecJSI::NativeSecurityPackSpecJSI(const ObjCTurboModule::InitParams ¶ms)
|
|
28
|
-
: ObjCTurboModule(params) {
|
|
29
|
-
|
|
30
|
-
methodMap_["getSignatures"] = MethodMetadata {0, __hostFunction_NativeSecurityPackSpecJSI_getSignatures};
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
methodMap_["isRooted"] = MethodMetadata {0, __hostFunction_NativeSecurityPackSpecJSI_isRooted};
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
} // namespace facebook::react
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleObjCpp
|
|
8
|
-
*
|
|
9
|
-
* We create an umbrella header (and corresponding implementation) here since
|
|
10
|
-
* Cxx compilation in BUCK has a limitation: source-code producing genrule()s
|
|
11
|
-
* must have a single output. More files => more genrule()s => slower builds.
|
|
12
|
-
*/
|
|
13
|
-
|
|
14
|
-
#ifndef __cplusplus
|
|
15
|
-
#error This file must be compiled as Obj-C++. If you are importing it, you must change your file extension to .mm.
|
|
16
|
-
#endif
|
|
17
|
-
|
|
18
|
-
// Avoid multiple includes of RNSecurityPackSpec symbols
|
|
19
|
-
#ifndef RNSecurityPackSpec_H
|
|
20
|
-
#define RNSecurityPackSpec_H
|
|
21
|
-
|
|
22
|
-
#import <Foundation/Foundation.h>
|
|
23
|
-
#import <RCTRequired/RCTRequired.h>
|
|
24
|
-
#import <RCTTypeSafety/RCTConvertHelpers.h>
|
|
25
|
-
#import <RCTTypeSafety/RCTTypedModuleConstants.h>
|
|
26
|
-
#import <React/RCTBridgeModule.h>
|
|
27
|
-
#import <React/RCTCxxConvert.h>
|
|
28
|
-
#import <React/RCTManagedPointer.h>
|
|
29
|
-
#import <ReactCommon/RCTTurboModule.h>
|
|
30
|
-
#import <optional>
|
|
31
|
-
#import <vector>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
@protocol NativeSecurityPackSpec <RCTBridgeModule, RCTTurboModule>
|
|
35
|
-
|
|
36
|
-
- (void)getSignatures:(RCTPromiseResolveBlock)resolve
|
|
37
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
38
|
-
- (void)isRooted:(RCTPromiseResolveBlock)resolve
|
|
39
|
-
reject:(RCTPromiseRejectBlock)reject;
|
|
40
|
-
|
|
41
|
-
@end
|
|
42
|
-
namespace facebook::react {
|
|
43
|
-
/**
|
|
44
|
-
* ObjC++ class for module 'NativeSecurityPack'
|
|
45
|
-
*/
|
|
46
|
-
class JSI_EXPORT NativeSecurityPackSpecJSI : public ObjCTurboModule {
|
|
47
|
-
public:
|
|
48
|
-
NativeSecurityPackSpecJSI(const ObjCTurboModule::InitParams ¶ms);
|
|
49
|
-
};
|
|
50
|
-
} // namespace facebook::react
|
|
51
|
-
|
|
52
|
-
#endif // RNSecurityPackSpec_H
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateShadowNodeCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include "ShadowNodes.h"
|
|
12
|
-
|
|
13
|
-
namespace facebook::react {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} // namespace facebook::react
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateShadowNodeH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include "EventEmitters.h"
|
|
14
|
-
#include "Props.h"
|
|
15
|
-
#include "States.h"
|
|
16
|
-
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
|
-
#include <jsi/jsi.h>
|
|
18
|
-
|
|
19
|
-
namespace facebook::react {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
} // namespace facebook::react
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateStateCpp.js
|
|
9
|
-
*/
|
|
10
|
-
#include "States.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} // namespace facebook::react
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateStateH.js
|
|
8
|
-
*/
|
|
9
|
-
#pragma once
|
|
10
|
-
|
|
11
|
-
#ifdef ANDROID
|
|
12
|
-
#include <folly/dynamic.h>
|
|
13
|
-
#endif
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} // namespace facebook::react
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleCpp.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#include "RNSecurityPackSpecJSI.h"
|
|
11
|
-
|
|
12
|
-
namespace facebook::react {
|
|
13
|
-
|
|
14
|
-
static jsi::Value __hostFunction_NativeSecurityPackCxxSpecJSI_getSignatures(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
15
|
-
return static_cast<NativeSecurityPackCxxSpecJSI *>(&turboModule)->getSignatures(
|
|
16
|
-
rt
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
static jsi::Value __hostFunction_NativeSecurityPackCxxSpecJSI_isRooted(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
20
|
-
return static_cast<NativeSecurityPackCxxSpecJSI *>(&turboModule)->isRooted(
|
|
21
|
-
rt
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
NativeSecurityPackCxxSpecJSI::NativeSecurityPackCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
|
26
|
-
: TurboModule("SecurityPack", jsInvoker) {
|
|
27
|
-
methodMap_["getSignatures"] = MethodMetadata {0, __hostFunction_NativeSecurityPackCxxSpecJSI_getSignatures};
|
|
28
|
-
methodMap_["isRooted"] = MethodMetadata {0, __hostFunction_NativeSecurityPackCxxSpecJSI_isRooted};
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
} // namespace facebook::react
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
-
*
|
|
4
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
-
* once the code is regenerated.
|
|
6
|
-
*
|
|
7
|
-
* @generated by codegen project: GenerateModuleH.js
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <ReactCommon/TurboModule.h>
|
|
13
|
-
#include <react/bridging/Bridging.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook::react {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class JSI_EXPORT NativeSecurityPackCxxSpecJSI : public TurboModule {
|
|
19
|
-
protected:
|
|
20
|
-
NativeSecurityPackCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker);
|
|
21
|
-
|
|
22
|
-
public:
|
|
23
|
-
virtual jsi::Value getSignatures(jsi::Runtime &rt) = 0;
|
|
24
|
-
virtual jsi::Value isRooted(jsi::Runtime &rt) = 0;
|
|
25
|
-
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
template <typename T>
|
|
29
|
-
class JSI_EXPORT NativeSecurityPackCxxSpec : public TurboModule {
|
|
30
|
-
public:
|
|
31
|
-
jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &propName) override {
|
|
32
|
-
return delegate_.get(rt, propName);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
static constexpr std::string_view kModuleName = "SecurityPack";
|
|
36
|
-
|
|
37
|
-
protected:
|
|
38
|
-
NativeSecurityPackCxxSpec(std::shared_ptr<CallInvoker> jsInvoker)
|
|
39
|
-
: TurboModule(std::string{NativeSecurityPackCxxSpec::kModuleName}, jsInvoker),
|
|
40
|
-
delegate_(reinterpret_cast<T*>(this), jsInvoker) {}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
private:
|
|
44
|
-
class Delegate : public NativeSecurityPackCxxSpecJSI {
|
|
45
|
-
public:
|
|
46
|
-
Delegate(T *instance, std::shared_ptr<CallInvoker> jsInvoker) :
|
|
47
|
-
NativeSecurityPackCxxSpecJSI(std::move(jsInvoker)), instance_(instance) {
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
jsi::Value getSignatures(jsi::Runtime &rt) override {
|
|
52
|
-
static_assert(
|
|
53
|
-
bridging::getParameterCount(&T::getSignatures) == 1,
|
|
54
|
-
"Expected getSignatures(...) to have 1 parameters");
|
|
55
|
-
|
|
56
|
-
return bridging::callFromJs<jsi::Value>(
|
|
57
|
-
rt, &T::getSignatures, jsInvoker_, instance_);
|
|
58
|
-
}
|
|
59
|
-
jsi::Value isRooted(jsi::Runtime &rt) override {
|
|
60
|
-
static_assert(
|
|
61
|
-
bridging::getParameterCount(&T::isRooted) == 1,
|
|
62
|
-
"Expected isRooted(...) to have 1 parameters");
|
|
63
|
-
|
|
64
|
-
return bridging::callFromJs<jsi::Value>(
|
|
65
|
-
rt, &T::isRooted, jsInvoker_, instance_);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
private:
|
|
69
|
-
friend class NativeSecurityPackCxxSpec;
|
|
70
|
-
T *instance_;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
Delegate delegate_;
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
} // namespace facebook::react
|