Rename SonarCppBridgingResponder

Summary: Renames SonarCppBridgingResponder

Reviewed By: passy

Differential Revision: D10028084

fbshipit-source-id: d45b50a659710fb6e535241780a335a124582a47
This commit is contained in:
Pritesh Nandgaonkar
2018-09-25 13:27:32 -07:00
committed by Facebook Github Bot
parent ccf47e75fd
commit e6aeb24fcc
4 changed files with 6 additions and 31 deletions

View 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