Files
flipper/iOS/FlipperKit/CppBridge/SonarCppBridgingResponder.mm
Pritesh Nandgaonkar 79b2cf712d Rename SonarResponder to FlipperResponder
Summary: Rename SonarResponder to FlipperResponder

Reviewed By: passy

Differential Revision: D9939713

fbshipit-source-id: 6792ec6529907ee98a070af9e26064bb5fcc07ef
2018-09-19 16:43:42 -07:00

36 lines
915 B
Plaintext

/*
* 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 "SonarCppBridgingResponder.h"
#import <FBCxxUtils/FBCxxFollyDynamicConvert.h>
@implementation SonarCppBridgingResponder {
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