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