Rename iOS SonarClient to FlipperClient
Summary: Renamed `SonarClient` to `FlipperClient` Reviewed By: passy Differential Revision: D9861749 fbshipit-source-id: 3374e4297e49ac198a235babc92deb9d2dddc268
This commit is contained in:
committed by
Facebook Github Bot
parent
9d9fa17134
commit
a488e34514
@@ -15,10 +15,10 @@
|
||||
Represents a connection between the Sonar desktop och client side. Manages the lifecycle of attached
|
||||
plugin instances.
|
||||
*/
|
||||
@interface SonarClient : NSObject
|
||||
@interface FlipperClient : NSObject
|
||||
|
||||
/**
|
||||
The shared singleton SonarClient instance. It is an error to call this on non-debug builds to avoid leaking data.
|
||||
The shared singleton FlipperClient instance. It is an error to call this on non-debug builds to avoid leaking data.
|
||||
*/
|
||||
+ (instancetype)sharedClient;
|
||||
|
||||
@@ -62,7 +62,7 @@ Subscribe a ViewController to state update change notifications
|
||||
*/
|
||||
- (void)subscribeForUpdates:(id<FlipperStateUpdateListener>)controller;
|
||||
|
||||
// initializers are disabled. You must use `+[SonarClient sharedClient]` instance.
|
||||
// initializers are disabled. You must use `+[FlipperClient sharedClient]` instance.
|
||||
- (instancetype)init NS_UNAVAILABLE;
|
||||
+ (instancetype)new NS_UNAVAILABLE;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
#if FB_SONARKIT_ENABLED
|
||||
|
||||
#import "SonarClient.h"
|
||||
#import "FlipperClient.h"
|
||||
#import "SonarCppWrapperPlugin.h"
|
||||
#import <Sonar/SonarClient.h>
|
||||
#include <folly/io/async/EventBase.h>
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
using WrapperPlugin = facebook::flipper::SonarCppWrapperPlugin;
|
||||
|
||||
@implementation SonarClient {
|
||||
@implementation FlipperClient {
|
||||
facebook::flipper::SonarClient *_cppClient;
|
||||
folly::ScopedEventBaseThread sonarThread;
|
||||
folly::ScopedEventBaseThread connectionThread;
|
||||
@@ -33,7 +33,7 @@ using WrapperPlugin = facebook::flipper::SonarCppWrapperPlugin;
|
||||
|
||||
+ (instancetype)sharedClient
|
||||
{
|
||||
static SonarClient *sharedClient = nil;
|
||||
static FlipperClient *sharedClient = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
sharedClient = [[self alloc] init];
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifdef FB_SONARKIT_ENABLED
|
||||
|
||||
#import "FlipperDiagnosticsViewController.h"
|
||||
#import "SonarClient.h"
|
||||
#import "FlipperClient.h"
|
||||
|
||||
#define STATE_VIEW_HEIGHT 300
|
||||
|
||||
@@ -45,7 +45,7 @@ static NSString *const kSKCellIdentifier = @"FlipperDiagnosticStateTableStableCe
|
||||
self.stateTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, STATE_VIEW_HEIGHT)];
|
||||
[self.stateTable registerClass:[UITableViewCell class] forCellReuseIdentifier:kSKCellIdentifier];
|
||||
self.stateTable.rowHeight = 14;
|
||||
self.tableDataSource = [[StateTableDataSource alloc] initWithElements:[[SonarClient sharedClient] getStateElements]];
|
||||
self.tableDataSource = [[StateTableDataSource alloc] initWithElements:[[FlipperClient sharedClient] getStateElements]];
|
||||
self.stateTable.dataSource = self.tableDataSource;
|
||||
|
||||
[self updateLogView];
|
||||
@@ -64,12 +64,12 @@ static NSString *const kSKCellIdentifier = @"FlipperDiagnosticStateTableStableCe
|
||||
}
|
||||
|
||||
- (void)updateStateTable {
|
||||
self.tableDataSource.elements = [[SonarClient sharedClient] getStateElements];
|
||||
self.tableDataSource.elements = [[FlipperClient sharedClient] getStateElements];
|
||||
[self.stateTable reloadData];
|
||||
}
|
||||
|
||||
- (void)updateLogView {
|
||||
NSString *state = [[SonarClient sharedClient] getState];
|
||||
NSString *state = [[FlipperClient sharedClient] getState];
|
||||
self.logLabel.text = state;
|
||||
[self.logLabel sizeToFit];
|
||||
self.scrollView.contentSize = self.logLabel.frame.size;
|
||||
@@ -82,7 +82,7 @@ static NSString *const kSKCellIdentifier = @"FlipperDiagnosticStateTableStableCe
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
id<FlipperStateUpdateListener> weakSelf = self;
|
||||
[[SonarClient sharedClient] subscribeForUpdates:weakSelf];
|
||||
[[FlipperClient sharedClient] subscribeForUpdates:weakSelf];
|
||||
}
|
||||
|
||||
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
|
||||
|
||||
Reference in New Issue
Block a user