mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 09:35:48 +00:00
6221053179
Reviewed By: mhorowitz Differential Revision: D4860135 fbshipit-source-id: ce963010883e6b9cc8e34f7ff01b4018cd195eba
34 lines
1.0 KiB
Objective-C
34 lines
1.0 KiB
Objective-C
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This source code is licensed under the BSD-style license found in the
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
*/
|
|
|
|
#import <React/RCTModuleData.h>
|
|
#import <cxxreact/NativeModule.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
class RCTNativeModule : public NativeModule {
|
|
public:
|
|
RCTNativeModule(RCTBridge *bridge, RCTModuleData *moduleData);
|
|
|
|
std::string getName() override;
|
|
std::vector<MethodDescriptor> getMethods() override;
|
|
folly::dynamic getConstants() override;
|
|
void invoke(unsigned int methodId, folly::dynamic &¶ms, int callId) override;
|
|
MethodCallResult callSerializableNativeHook(unsigned int reactMethodId, folly::dynamic &¶ms) override;
|
|
|
|
private:
|
|
__weak RCTBridge *m_bridge;
|
|
RCTModuleData *m_moduleData;
|
|
MethodCallResult invokeInner(unsigned int methodId, const folly::dynamic &¶ms);
|
|
};
|
|
|
|
}
|
|
}
|