Rename iOS SonarConnection to FlipperConnection
Summary: Rename iOS SonarConnection to FlipperConnection Reviewed By: jknoxville Differential Revision: D9916509 fbshipit-source-id: 7253ab37f5ab28dc8063fb6b3765afd1c2aee645
This commit is contained in:
committed by
Facebook Github Bot
parent
f970e60edd
commit
fdc4f7a5c8
@@ -10,7 +10,7 @@
|
||||
#import "SonarKitLayoutPlugin.h"
|
||||
|
||||
#import <SonarKit/FlipperClient.h>
|
||||
#import <SonarKit/SonarConnection.h>
|
||||
#import <SonarKit/FlipperConnection.h>
|
||||
#import <SonarKit/SonarResponder.h>
|
||||
#import <SonarKit/SKMacros.h>
|
||||
#import "SKDescriptorMapper.h"
|
||||
@@ -33,7 +33,7 @@
|
||||
id<NSObject> _rootNode;
|
||||
id<SKTapListener> _tapListener;
|
||||
|
||||
id<SonarConnection> _connection;
|
||||
id<FlipperConnection> _connection;
|
||||
|
||||
NSMutableSet *_registeredDelegates;
|
||||
}
|
||||
@@ -70,7 +70,7 @@
|
||||
return @"Inspector";
|
||||
}
|
||||
|
||||
- (void)didConnect:(id<SonarConnection>)connection {
|
||||
- (void)didConnect:(id<FlipperConnection>)connection {
|
||||
_connection = connection;
|
||||
|
||||
[SKInvalidation enableInvalidations];
|
||||
@@ -147,7 +147,7 @@
|
||||
- (void)onCallSetData:(NSString *)objectId
|
||||
withPath:(NSArray<NSString *> *)path
|
||||
toValue:(id<NSObject>)value
|
||||
withConnection:(id<SonarConnection>)connection {
|
||||
withConnection:(id<FlipperConnection>)connection {
|
||||
id node = [_trackedObjects objectForKey: objectId];
|
||||
if (node == nil) {
|
||||
SKLog(@"node is nil, trying to setData: \
|
||||
@@ -215,7 +215,7 @@
|
||||
_lastHighlightedNode = objectId;
|
||||
}
|
||||
|
||||
- (void)onCallSetSearchActive:(BOOL)active withConnection:(id<SonarConnection>)connection {
|
||||
- (void)onCallSetSearchActive:(BOOL)active withConnection:(id<FlipperConnection>)connection {
|
||||
if (active) {
|
||||
[_tapListener mountWithFrame: [[UIScreen mainScreen] bounds]];
|
||||
__block id<NSObject> rootNode = _rootNode;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#import <vector>
|
||||
|
||||
#import "SKBufferingPlugin.h"
|
||||
#import <SonarKit/SonarConnection.h>
|
||||
#import <SonarKit/FlipperConnection.h>
|
||||
#import "SKDispatchQueue.h"
|
||||
#import "SKBufferingPlugin+CPPInitialization.h"
|
||||
|
||||
@@ -20,7 +20,7 @@ static const NSUInteger bufferSize = 500;
|
||||
|
||||
@property(assign, nonatomic) std::vector<CachedEvent> ringBuffer;
|
||||
@property(assign, nonatomic) std::shared_ptr<facebook::flipper::DispatchQueue> connectionAccessQueue;
|
||||
@property(strong, nonatomic) id<SonarConnection> connection;
|
||||
@property(strong, nonatomic) id<FlipperConnection> connection;
|
||||
|
||||
@end
|
||||
|
||||
@@ -29,7 +29,7 @@ static const NSUInteger bufferSize = 500;
|
||||
// std::vector<CachedEvent> _ringBuffer;
|
||||
// std::shared_ptr<facebook::flipper::DispatchQueue> _connectionAccessQueue;
|
||||
//
|
||||
// id<SonarConnection> _connection;
|
||||
// id<FlipperConnection> _connection;
|
||||
// }
|
||||
|
||||
- (instancetype)initWithQueue:(dispatch_queue_t)queue {
|
||||
@@ -45,7 +45,7 @@ static const NSUInteger bufferSize = 500;
|
||||
return @"Network";
|
||||
}
|
||||
|
||||
- (void)didConnect:(id<SonarConnection>)connection {
|
||||
- (void)didConnect:(id<FlipperConnection>)connection {
|
||||
_connectionAccessQueue->async(^{
|
||||
self->_connection = connection;
|
||||
[self sendBufferedEvents];
|
||||
|
||||
@@ -91,7 +91,7 @@ SPEC CHECKSUMS:
|
||||
PeerTalk: 77481b0a8136f226b90ccf828d6061f70139ffde
|
||||
RSocket: 4fdb7e562db30a2d4fceddefdc601749ffc9ebe2
|
||||
Sonar: cfbef2d6119e92563d51bf3cdd9ae34f4eda068b
|
||||
SonarKit: 34ede518cc5ebc9678acd0b09403674cab04a991
|
||||
SonarKit: fe6e84d73807d07900d47020170290674d931de7
|
||||
Yoga: aaae8abea68951f60bee05f6277d3eed90bb91bb
|
||||
YogaKit: d447a9bb808718e6f58e52a2255a8050081a3ead
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ Pod::Spec.new do |spec|
|
||||
'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKResponseInfo.h',
|
||||
'iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin.h',
|
||||
'iOS/FBDefines/FBMacros.h',
|
||||
'iOS/SonarKit/**/{FlipperStateUpdateListener,FlipperClient,FlipperPlugin,SonarConnection,SonarResponder,SKMacros}.h'
|
||||
'iOS/SonarKit/**/{FlipperStateUpdateListener,FlipperClient,FlipperPlugin,FlipperConnection,SonarResponder,SKMacros}.h'
|
||||
header_search_paths = "\"$(PODS_ROOT)/SonarKit/iOS/SonarKit\" \"$(PODS_ROOT)\"/Headers/Private/SonarKit/** \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/PeerTalkSonar\""
|
||||
ss.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
|
||||
"DEFINES_MODULE" => "YES",
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
*
|
||||
*/
|
||||
#import <Sonar/SonarConnection.h>
|
||||
#import <SonarKit/SonarConnection.h>
|
||||
#import <SonarKit/FlipperConnection.h>
|
||||
|
||||
/**
|
||||
SonarCppBridgingConnection is a simple ObjC wrapper around SonarConnection
|
||||
that forwards messages to the underlying C++ connection. This class allows
|
||||
pure Objective-C plugins to send messages to the underlying connection.
|
||||
*/
|
||||
@interface SonarCppBridgingConnection : NSObject <SonarConnection>
|
||||
@interface SonarCppBridgingConnection : NSObject <FlipperConnection>
|
||||
- (instancetype)initWithCppConnection:(std::shared_ptr<facebook::flipper::SonarConnection>)conn;
|
||||
@end
|
||||
|
||||
@@ -15,7 +15,7 @@ typedef void (^SonarReceiver)(NSDictionary*, id<SonarResponder>);
|
||||
/**
|
||||
Represents a connection between the Desktop and mobile plugins with corresponding identifiers.
|
||||
*/
|
||||
@protocol SonarConnection
|
||||
@protocol FlipperConnection
|
||||
|
||||
/**
|
||||
Invoke a method on the Sonar desktop plugin with with a matching identifier.
|
||||
@@ -13,7 +13,7 @@ SK_EXTERN_C_BEGIN
|
||||
void SonarPerformBlockOnMainThread(void(^block)());
|
||||
SK_EXTERN_C_END
|
||||
|
||||
@protocol SonarConnection;
|
||||
@protocol FlipperConnection;
|
||||
|
||||
@protocol FlipperPlugin
|
||||
|
||||
@@ -28,7 +28,7 @@ Called when a connection has been established between this plugin and the corres
|
||||
the Sonar desktop app. The provided connection can be used to register method receivers as well
|
||||
as send messages back to the desktop app.
|
||||
*/
|
||||
- (void)didConnect:(id<SonarConnection>)connection;
|
||||
- (void)didConnect:(id<FlipperConnection>)connection;
|
||||
|
||||
/**
|
||||
Called when a plugin has been disconnected and the SonarConnection provided in didConnect is no
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
#import <SonarKit/FlipperPlugin.h>
|
||||
|
||||
@protocol SonarConnection;
|
||||
@protocol FlipperConnection;
|
||||
|
||||
typedef void (^ConnectBlock)(id<SonarConnection>);
|
||||
typedef void (^ConnectBlock)(id<FlipperConnection>);
|
||||
typedef void (^DisconnectBlock)();
|
||||
|
||||
@interface BlockBasedSonarPlugin : NSObject<FlipperPlugin>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
return _identifier;
|
||||
}
|
||||
|
||||
- (void)didConnect:(id<SonarConnection>)connection
|
||||
- (void)didConnect:(id<FlipperConnection>)connection
|
||||
{
|
||||
if (_connect) {
|
||||
_connect(connection);
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import <SonarKit/SonarConnection.h>
|
||||
#import <SonarKit/FlipperConnection.h>
|
||||
|
||||
@interface SonarConnectionMock : NSObject<SonarConnection>
|
||||
@interface SonarConnectionMock : NSObject<FlipperConnection>
|
||||
|
||||
@property (nonatomic, assign, getter=isConnected) BOOL connected;
|
||||
@property (nonatomic, readonly) NSDictionary<NSString *, SonarReceiver> *receivers;
|
||||
|
||||
@@ -19,7 +19,7 @@ using facebook::flipper::SonarCppWrapperPlugin;
|
||||
|
||||
@implementation DummyPlugin
|
||||
- (NSString *)identifier { return @"Dummy"; }
|
||||
- (void)didConnect:(id<SonarConnection>)connection {}
|
||||
- (void)didConnect:(id<FlipperConnection>)connection {}
|
||||
- (void)didDisconnect {}
|
||||
@end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user