Rename SonarCppBridgingResponder
Summary: Renames SonarCppBridgingResponder Reviewed By: passy Differential Revision: D10028084 fbshipit-source-id: d45b50a659710fb6e535241780a335a124582a47
This commit is contained in:
committed by
Facebook Github Bot
parent
ccf47e75fd
commit
e6aeb24fcc
35
iOS/FlipperKit/CppBridge/FlipperCppBridgingResponder.mm
Normal file
35
iOS/FlipperKit/CppBridge/FlipperCppBridgingResponder.mm
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2018-present, Facebook, Inc.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the LICENSE
|
||||
* file in the root directory of this source tree.
|
||||
*
|
||||
*/
|
||||
#import "FlipperCppBridgingResponder.h"
|
||||
|
||||
#import <FBCxxUtils/FBCxxFollyDynamicConvert.h>
|
||||
|
||||
@implementation FlipperCppBridgingResponder {
|
||||
std::unique_ptr<facebook::flipper::FlipperResponder> responder_;
|
||||
}
|
||||
|
||||
- (instancetype)initWithCppResponder:(std::unique_ptr<facebook::flipper::FlipperResponder>)responder
|
||||
{
|
||||
if (!responder) {
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (self = [super init]) {
|
||||
responder_ = std::move(responder);
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - FlipperResponder
|
||||
|
||||
- (void)success:(NSDictionary *)response { responder_->success(facebook::cxxutils::convertIdToFollyDynamic(response, true)); }
|
||||
|
||||
- (void)error:(NSDictionary *)response { responder_->error(facebook::cxxutils::convertIdToFollyDynamic(response, true)); }
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user