From a480be90a2f91b1c851140e4c19f99ccab0ddeb4 Mon Sep 17 00:00:00 2001 From: John Knox Date: Tue, 18 Sep 2018 07:16:54 -0700 Subject: [PATCH] Rename facebook::sonar namespace Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/271 Reviewed By: passy Differential Revision: D9861393 Pulled By: jknoxville fbshipit-source-id: d65f751c35028748915023f33f273d6ec45863c8 --- android/src/main/cpp/sonar.cpp | 2 +- docs/testing.md | 4 +-- .../SKBufferingPlugin+CPPInitialization.h | 4 +-- .../SKBufferingPlugin.mm | 10 +++---- .../SonarKitNetworkPlugin/SKDispatchQueue.h | 2 +- .../SonarKitNetworkPlugin+CPPInitialization.h | 2 +- .../SonarKitNetworkPlugin.mm | 2 +- iOS/Sample/Podfile.lock | 30 +++++++++---------- .../CppBridge/SonarCppBridgingConnection.h | 2 +- .../CppBridge/SonarCppBridgingConnection.mm | 6 ++-- .../CppBridge/SonarCppBridgingResponder.h | 2 +- .../CppBridge/SonarCppBridgingResponder.mm | 4 +-- .../CppBridge/SonarCppWrapperPlugin.h | 8 ++--- iOS/SonarKit/SonarClient.mm | 18 +++++------ iOS/SonarKitTestUtils/SonarClient+Testing.h | 2 +- iOS/SonarKitTests/SonarCppBridgingTests.mm | 2 +- xplat/Sonar/ConnectionContextStore.cpp | 2 +- xplat/Sonar/ConnectionContextStore.h | 4 +-- xplat/Sonar/Log.cpp | 4 +-- xplat/Sonar/Log.h | 4 +-- xplat/Sonar/SonarClient.cpp | 4 +-- xplat/Sonar/SonarClient.h | 4 +-- xplat/Sonar/SonarConnection.h | 4 +-- xplat/Sonar/SonarConnectionImpl.h | 4 +-- xplat/Sonar/SonarInitConfig.h | 4 +-- xplat/Sonar/SonarPlugin.h | 4 +-- xplat/Sonar/SonarResponder.h | 4 +-- xplat/Sonar/SonarResponderImpl.h | 4 +-- xplat/Sonar/SonarState.cpp | 2 +- xplat/Sonar/SonarState.h | 6 ++-- xplat/Sonar/SonarWebSocket.h | 4 +-- xplat/Sonar/SonarWebSocketImpl.cpp | 4 +-- xplat/Sonar/SonarWebSocketImpl.h | 4 +-- .../SonarTestLib/ConnectionContextStoreMock.h | 2 +- xplat/SonarTestLib/SonarConnectionMock.h | 4 +-- xplat/SonarTestLib/SonarPluginMock.h | 4 +-- xplat/SonarTestLib/SonarResponderMock.h | 4 +-- xplat/SonarTestLib/SonarWebSocketMock.h | 4 +-- xplat/SonarTests/SonarClientTests.cpp | 4 +-- .../SonarWebSocketImplTerminationTests.cpp | 4 +-- 40 files changed, 96 insertions(+), 96 deletions(-) diff --git a/android/src/main/cpp/sonar.cpp b/android/src/main/cpp/sonar.cpp index 6b3020bd8..d1acd2496 100644 --- a/android/src/main/cpp/sonar.cpp +++ b/android/src/main/cpp/sonar.cpp @@ -26,7 +26,7 @@ #include using namespace facebook; -using namespace facebook::sonar; +using namespace facebook::flipper; namespace { diff --git a/docs/testing.md b/docs/testing.md index cc82f147a..5d519273f 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -61,7 +61,7 @@ Start by creating your first test file in this directory `MySonarPluginTests.cpp #include namespace facebook { -namespace sonar { +namespace flipper { namespace test { TEST(MySonarPluginTests, testDummy) { @@ -69,7 +69,7 @@ TEST(MySonarPluginTests, testDummy) { } } // namespace test -} // namespace sonar +} // namespace flipper } // namespace facebook ``` diff --git a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKBufferingPlugin+CPPInitialization.h b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKBufferingPlugin+CPPInitialization.h index 7d2a4e89e..a5f02d87c 100644 --- a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKBufferingPlugin+CPPInitialization.h +++ b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKBufferingPlugin+CPPInitialization.h @@ -21,8 +21,8 @@ struct CachedEvent { @interface SKBufferingPlugin(CPPInitialization) -- (instancetype)initWithVectorEventSize:(NSUInteger)size connectionAccessQueue:(std::shared_ptr)connectionAccessQueue; -- (instancetype)initWithDispatchQueue:(std::shared_ptr)queue; +- (instancetype)initWithVectorEventSize:(NSUInteger)size connectionAccessQueue:(std::shared_ptr)connectionAccessQueue; +- (instancetype)initWithDispatchQueue:(std::shared_ptr)queue; @end diff --git a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKBufferingPlugin.mm b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKBufferingPlugin.mm index 96248ad24..00dfbb350 100644 --- a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKBufferingPlugin.mm +++ b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKBufferingPlugin.mm @@ -19,7 +19,7 @@ static const NSUInteger bufferSize = 500; @interface SKBufferingPlugin() @property(assign, nonatomic) std::vector ringBuffer; -@property(assign, nonatomic) std::shared_ptr connectionAccessQueue; +@property(assign, nonatomic) std::shared_ptr connectionAccessQueue; @property(strong, nonatomic) id connection; @end @@ -27,7 +27,7 @@ static const NSUInteger bufferSize = 500; @implementation SKBufferingPlugin // { // std::vector _ringBuffer; -// std::shared_ptr _connectionAccessQueue; +// std::shared_ptr _connectionAccessQueue; // // id _connection; // } @@ -35,7 +35,7 @@ static const NSUInteger bufferSize = 500; - (instancetype)initWithQueue:(dispatch_queue_t)queue { if (self = [super init]) { _ringBuffer.reserve(bufferSize); - _connectionAccessQueue = std::make_shared(queue); + _connectionAccessQueue = std::make_shared(queue); } return self; } @@ -87,14 +87,14 @@ static const NSUInteger bufferSize = 500; @implementation SKBufferingPlugin(CPPInitialization) -- (instancetype)initWithVectorEventSize:(NSUInteger)size connectionAccessQueue:(std::shared_ptr)connectionAccessQueue { +- (instancetype)initWithVectorEventSize:(NSUInteger)size connectionAccessQueue:(std::shared_ptr)connectionAccessQueue { if (self = [super init]) { _ringBuffer.reserve(size); _connectionAccessQueue = connectionAccessQueue; } return self; } -- (instancetype)initWithDispatchQueue:(std::shared_ptr)queue { +- (instancetype)initWithDispatchQueue:(std::shared_ptr)queue { return [self initWithVectorEventSize:bufferSize connectionAccessQueue:queue]; diff --git a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKDispatchQueue.h b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKDispatchQueue.h index b0ef80561..6113c29a1 100644 --- a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKDispatchQueue.h +++ b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SKDispatchQueue.h @@ -12,7 +12,7 @@ #import namespace facebook { - namespace sonar { + namespace flipper { class DispatchQueue { public: diff --git a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin+CPPInitialization.h b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin+CPPInitialization.h index 00f422f60..df5cc43af 100644 --- a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin+CPPInitialization.h +++ b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin+CPPInitialization.h @@ -13,6 +13,6 @@ #import @interface SonarKitNetworkPlugin(CPPInitialization) -- (instancetype)initWithNetworkAdapter:(id)adapter dispatchQueue:(std::shared_ptr)queue; +- (instancetype)initWithNetworkAdapter:(id)adapter dispatchQueue:(std::shared_ptr)queue; @end #endif diff --git a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin.mm b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin.mm index 486ddffcc..d24fecb5e 100644 --- a/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin.mm +++ b/iOS/Plugins/SonarKitNetworkPlugin/SonarKitNetworkPlugin/SonarKitNetworkPlugin.mm @@ -106,7 +106,7 @@ @implementation SonarKitNetworkPlugin (CPPInitialization) -- (instancetype)initWithNetworkAdapter:(id)adapter dispatchQueue:(std::shared_ptr)queue { +- (instancetype)initWithNetworkAdapter:(id)adapter dispatchQueue:(std::shared_ptr)queue { if (self = [super initWithDispatchQueue:queue]) { adapter.delegate = self; _adapter = adapter; diff --git a/iOS/Sample/Podfile.lock b/iOS/Sample/Podfile.lock index f47be400e..5c5d884fe 100644 --- a/iOS/Sample/Podfile.lock +++ b/iOS/Sample/Podfile.lock @@ -16,36 +16,36 @@ PODS: - PeerTalk (0.0.2) - RSocket (0.10.0): - Folly - - Sonar (0.6.16): + - Sonar (0.7.0): - Folly (~> 1.1) - RSocket (~> 0.10) - - SonarKit (0.6.16): - - SonarKit/Core (= 0.6.16) - - SonarKit/Core (0.6.16): + - SonarKit (0.7.0): + - SonarKit/Core (= 0.7.0) + - SonarKit/Core (0.7.0): - CocoaAsyncSocket (~> 7.6) - Folly (~> 1.1) - OpenSSL-Static (= 1.0.2.c1) - PeerTalk (~> 0.0.2) - - Sonar (~> 0.6.16) + - Sonar (~> 0.7.0) - SonarKit/CppBridge - SonarKit/FBCxxUtils - SonarKit/FBDefines - - SonarKit/CppBridge (0.6.16) - - SonarKit/FBCxxUtils (0.6.16) - - SonarKit/FBDefines (0.6.16) - - SonarKit/SKIOSNetworkPlugin (0.6.16): + - SonarKit/CppBridge (0.7.0) + - SonarKit/FBCxxUtils (0.7.0) + - SonarKit/FBDefines (0.7.0) + - SonarKit/SKIOSNetworkPlugin (0.7.0): - SonarKit/Core - SonarKit/SonarKitNetworkPlugin - - SonarKit/SonarKitLayoutComponentKitSupport (0.6.16): + - SonarKit/SonarKitLayoutComponentKitSupport (0.7.0): - ComponentKit - SonarKit/Core - SonarKit/SonarKitLayoutPlugin - Yoga (~> 1.9) - - SonarKit/SonarKitLayoutPlugin (0.6.16): + - SonarKit/SonarKitLayoutPlugin (0.7.0): - SonarKit/Core - Yoga (~> 1.9) - YogaKit (~> 1.8) - - SonarKit/SonarKitNetworkPlugin (0.6.16): + - SonarKit/SonarKitNetworkPlugin (0.7.0): - SonarKit/Core - Yoga (1.9.0) - YogaKit (1.9.0): @@ -90,11 +90,11 @@ SPEC CHECKSUMS: OpenSSL-Static: bd17e34564a8591ad76b740318683a6caa19a13e PeerTalk: 77481b0a8136f226b90ccf828d6061f70139ffde RSocket: 4fdb7e562db30a2d4fceddefdc601749ffc9ebe2 - Sonar: 74d1e3a853f1453511108ac1b3e7469a2b2ade92 - SonarKit: 99c7f51f670c6203c225f509ca5b6f85c6ce734a + Sonar: 3ce26a113ca4cf69e0d784c22ca605708ee657ee + SonarKit: 924c28d0c1d5ef830d79cd71c934b3710daeb767 Yoga: aaae8abea68951f60bee05f6277d3eed90bb91bb YogaKit: d447a9bb808718e6f58e52a2255a8050081a3ead PODFILE CHECKSUM: b1786f878ef1a53893b6a0f9d79d4987b72bc916 -COCOAPODS: 1.5.2 +COCOAPODS: 1.5.3 diff --git a/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.h b/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.h index bafbee945..1afd764a2 100644 --- a/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.h +++ b/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.h @@ -14,5 +14,5 @@ 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 -- (instancetype)initWithCppConnection:(std::shared_ptr)conn; +- (instancetype)initWithCppConnection:(std::shared_ptr)conn; @end diff --git a/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.mm b/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.mm index 9a9c05d73..fd3162fea 100644 --- a/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.mm +++ b/iOS/SonarKit/CppBridge/SonarCppBridgingConnection.mm @@ -13,10 +13,10 @@ @implementation SonarCppBridgingConnection { - std::shared_ptr conn_; + std::shared_ptr conn_; } -- (instancetype)initWithCppConnection:(std::shared_ptr)conn +- (instancetype)initWithCppConnection:(std::shared_ptr)conn { if (self = [super init]) { conn_ = conn; @@ -34,7 +34,7 @@ - (void)receive:(NSString *)method withBlock:(SonarReceiver)receiver { const auto lambda = [receiver](const folly::dynamic &message, - std::unique_ptr responder) { + std::unique_ptr responder) { @autoreleasepool { SonarCppBridgingResponder *const objCResponder = [[SonarCppBridgingResponder alloc] initWithCppResponder:std::move(responder)]; diff --git a/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.h b/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.h index a9f9e6948..66637bcb1 100644 --- a/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.h +++ b/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.h @@ -14,5 +14,5 @@ that forwards messages to the underlying C++ responder. This class allows pure Objective-C plugins to send messages to the underlying responder. */ @interface SonarCppBridgingResponder : NSObject -- (instancetype)initWithCppResponder:(std::unique_ptr)responder; +- (instancetype)initWithCppResponder:(std::unique_ptr)responder; @end diff --git a/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.mm b/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.mm index 654b22116..051cf0a43 100644 --- a/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.mm +++ b/iOS/SonarKit/CppBridge/SonarCppBridgingResponder.mm @@ -10,10 +10,10 @@ #import @implementation SonarCppBridgingResponder { - std::unique_ptr responder_; + std::unique_ptr responder_; } -- (instancetype)initWithCppResponder:(std::unique_ptr)responder +- (instancetype)initWithCppResponder:(std::unique_ptr)responder { if (!responder) { return nil; diff --git a/iOS/SonarKit/CppBridge/SonarCppWrapperPlugin.h b/iOS/SonarKit/CppBridge/SonarCppWrapperPlugin.h index 41984c68e..e8f8cde91 100644 --- a/iOS/SonarKit/CppBridge/SonarCppWrapperPlugin.h +++ b/iOS/SonarKit/CppBridge/SonarCppWrapperPlugin.h @@ -14,7 +14,7 @@ #import namespace facebook { -namespace sonar { +namespace flipper { using ObjCPlugin = NSObject *; @@ -23,14 +23,14 @@ SonarCppWrapperPlugin is a simple C++ wrapper around Objective-C Sonar plugins that can be passed to SonarClient. This class allows developers to write pure Objective-C plugins if they want. */ -class SonarCppWrapperPlugin final : public facebook::sonar::SonarPlugin { +class SonarCppWrapperPlugin final : public facebook::flipper::SonarPlugin { public: // Under ARC copying objCPlugin *does* increment its retain count SonarCppWrapperPlugin(ObjCPlugin objCPlugin) : _objCPlugin(objCPlugin) {} std::string identifier() const override { return [[_objCPlugin identifier] UTF8String]; } - void didConnect(std::shared_ptr conn) override + void didConnect(std::shared_ptr conn) override { SonarCppBridgingConnection *const bridgingConn = [[SonarCppBridgingConnection alloc] initWithCppConnection:conn]; [_objCPlugin didConnect:bridgingConn]; @@ -44,5 +44,5 @@ private: ObjCPlugin _objCPlugin; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/iOS/SonarKit/SonarClient.mm b/iOS/SonarKit/SonarClient.mm index e3de52ff0..0c6710dcb 100644 --- a/iOS/SonarKit/SonarClient.mm +++ b/iOS/SonarKit/SonarClient.mm @@ -20,10 +20,10 @@ //#import "SKPortForwardingServer.h" #endif -using WrapperPlugin = facebook::sonar::SonarCppWrapperPlugin; +using WrapperPlugin = facebook::flipper::SonarCppWrapperPlugin; @implementation SonarClient { - facebook::sonar::SonarClient *_cppClient; + facebook::flipper::SonarClient *_cppClient; folly::ScopedEventBaseThread sonarThread; folly::ScopedEventBaseThread connectionThread; #if !TARGET_OS_SIMULATOR @@ -61,7 +61,7 @@ using WrapperPlugin = facebook::sonar::SonarCppWrapperPlugin; deviceName = [NSString stringWithFormat:@"%@ %@", [[UIDevice currentDevice] model], @"Simulator"]; #endif - facebook::sonar::SonarClient::init({ + facebook::flipper::SonarClient::init({ { "localhost", "iOS", @@ -74,7 +74,7 @@ using WrapperPlugin = facebook::sonar::SonarCppWrapperPlugin; sonarThread.getEventBase(), connectionThread.getEventBase() }); - _cppClient = facebook::sonar::SonarClient::instance(); + _cppClient = facebook::flipper::SonarClient::instance(); } return self; } @@ -129,19 +129,19 @@ using WrapperPlugin = facebook::sonar::SonarCppWrapperPlugin; - (NSArray *)getStateElements { NSMutableArray*> *const array = [NSMutableArray array]; - for (facebook::sonar::StateElement element: _cppClient->getStateElements()) { - facebook::sonar::State state = element.state_; + for (facebook::flipper::StateElement element: _cppClient->getStateElements()) { + facebook::flipper::State state = element.state_; NSString *stateString; switch (state) { - case facebook::sonar::in_progress: + case facebook::flipper::in_progress: stateString = @"⏳ "; break; - case facebook::sonar::success: + case facebook::flipper::success: stateString = @"✅ "; break; - case facebook::sonar::failed: + case facebook::flipper::failed: stateString = @"❌ "; break; diff --git a/iOS/SonarKitTestUtils/SonarClient+Testing.h b/iOS/SonarKitTestUtils/SonarClient+Testing.h index b2314e880..2b032f785 100644 --- a/iOS/SonarKitTestUtils/SonarClient+Testing.h +++ b/iOS/SonarKitTestUtils/SonarClient+Testing.h @@ -16,6 +16,6 @@ @interface SonarClient (Testing) -- (instancetype)initWithCppClient:(facebook::sonar::SonarClient *)cppClient; +- (instancetype)initWithCppClient:(facebook::flipper::SonarClient *)cppClient; @end diff --git a/iOS/SonarKitTests/SonarCppBridgingTests.mm b/iOS/SonarKitTests/SonarCppBridgingTests.mm index 60f621975..02052878d 100644 --- a/iOS/SonarKitTests/SonarCppBridgingTests.mm +++ b/iOS/SonarKitTests/SonarCppBridgingTests.mm @@ -12,7 +12,7 @@ #import #import -using facebook::sonar::SonarCppWrapperPlugin; +using facebook::flipper::SonarCppWrapperPlugin; @interface DummyPlugin : NSObject @end diff --git a/xplat/Sonar/ConnectionContextStore.cpp b/xplat/Sonar/ConnectionContextStore.cpp index d99812807..376890d3a 100644 --- a/xplat/Sonar/ConnectionContextStore.cpp +++ b/xplat/Sonar/ConnectionContextStore.cpp @@ -6,7 +6,7 @@ #include "CertificateUtils.h" #include "Log.h" -using namespace facebook::sonar; +using namespace facebook::flipper; static constexpr auto CSR_FILE_NAME = "app.csr"; static constexpr auto FLIPPER_CA_FILE_NAME = "flipperCA.crt"; diff --git a/xplat/Sonar/ConnectionContextStore.h b/xplat/Sonar/ConnectionContextStore.h index 9235153a1..bc8d22bc6 100644 --- a/xplat/Sonar/ConnectionContextStore.h +++ b/xplat/Sonar/ConnectionContextStore.h @@ -8,7 +8,7 @@ using namespace folly; namespace facebook { -namespace sonar { +namespace flipper { class ConnectionContextStore { @@ -29,5 +29,5 @@ private: }; -} // namespace sonar +} // namespace flipper } //namespace facebook diff --git a/xplat/Sonar/Log.cpp b/xplat/Sonar/Log.cpp index 44b0f7513..b1ac1112f 100644 --- a/xplat/Sonar/Log.cpp +++ b/xplat/Sonar/Log.cpp @@ -5,7 +5,7 @@ #endif namespace facebook { -namespace sonar { +namespace flipper { void log(const std::string& message) { #ifdef __ANDROID__ @@ -16,5 +16,5 @@ namespace sonar { } -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/Log.h b/xplat/Sonar/Log.h index 9a20b54bc..ae8432f38 100644 --- a/xplat/Sonar/Log.h +++ b/xplat/Sonar/Log.h @@ -3,9 +3,9 @@ #include namespace facebook { -namespace sonar { +namespace flipper { void log(const std::string& message); -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarClient.cpp b/xplat/Sonar/SonarClient.cpp index 16f5393b4..463bc7c75 100644 --- a/xplat/Sonar/SonarClient.cpp +++ b/xplat/Sonar/SonarClient.cpp @@ -19,7 +19,7 @@ #if FB_SONARKIT_ENABLED namespace facebook { -namespace sonar { +namespace flipper { static SonarClient* kInstance; @@ -214,7 +214,7 @@ std::vector SonarClient::getStateElements() { return sonarState_->getStateElements(); } -} // namespace sonar +} // namespace flipper } // namespace facebook #endif diff --git a/xplat/Sonar/SonarClient.h b/xplat/Sonar/SonarClient.h index 0556bc4a6..0af14c28f 100644 --- a/xplat/Sonar/SonarClient.h +++ b/xplat/Sonar/SonarClient.h @@ -19,7 +19,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { class SonarClient : public SonarWebSocket::Callbacks { public: @@ -100,5 +100,5 @@ class SonarClient : public SonarWebSocket::Callbacks { void disconnect(std::shared_ptr plugin); }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarConnection.h b/xplat/Sonar/SonarConnection.h index 5d5cfa51c..941efc0f1 100644 --- a/xplat/Sonar/SonarConnection.h +++ b/xplat/Sonar/SonarConnection.h @@ -14,7 +14,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { /** Represents a connection between the Desktop and mobile plugins @@ -50,5 +50,5 @@ class SonarConnection { const SonarReceiver& receiver) = 0; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarConnectionImpl.h b/xplat/Sonar/SonarConnectionImpl.h index 0f8786325..2905d7545 100644 --- a/xplat/Sonar/SonarConnectionImpl.h +++ b/xplat/Sonar/SonarConnectionImpl.h @@ -14,7 +14,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { class SonarConnectionImpl : public SonarConnection { public: @@ -57,5 +57,5 @@ class SonarConnectionImpl : public SonarConnection { std::map receivers_; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarInitConfig.h b/xplat/Sonar/SonarInitConfig.h index c594bd44b..82ddbd30d 100644 --- a/xplat/Sonar/SonarInitConfig.h +++ b/xplat/Sonar/SonarInitConfig.h @@ -12,7 +12,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { struct DeviceData { std::string host; @@ -41,5 +41,5 @@ struct SonarInitConfig { folly::EventBase* connectionWorker; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarPlugin.h b/xplat/Sonar/SonarPlugin.h index c7084e388..ef2e23a0e 100644 --- a/xplat/Sonar/SonarPlugin.h +++ b/xplat/Sonar/SonarPlugin.h @@ -11,7 +11,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { class SonarPlugin { public: @@ -38,5 +38,5 @@ class SonarPlugin { virtual void didDisconnect() = 0; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarResponder.h b/xplat/Sonar/SonarResponder.h index 9d71716d6..d81eae485 100644 --- a/xplat/Sonar/SonarResponder.h +++ b/xplat/Sonar/SonarResponder.h @@ -11,7 +11,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { /** * SonarResponder is used to asynchronously respond to messages @@ -32,5 +32,5 @@ class SonarResponder { virtual void error(const folly::dynamic& response) const = 0; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarResponderImpl.h b/xplat/Sonar/SonarResponderImpl.h index 069f990b3..8668cd915 100644 --- a/xplat/Sonar/SonarResponderImpl.h +++ b/xplat/Sonar/SonarResponderImpl.h @@ -13,7 +13,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { class SonarResponderImpl : public SonarResponder { public: @@ -37,5 +37,5 @@ class SonarResponderImpl : public SonarResponder { int64_t responseID_; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarState.cpp b/xplat/Sonar/SonarState.cpp index 9df342634..080b67e82 100644 --- a/xplat/Sonar/SonarState.cpp +++ b/xplat/Sonar/SonarState.cpp @@ -10,7 +10,7 @@ #include "SonarStep.h" #include -using namespace facebook::sonar; +using namespace facebook::flipper; /* Class responsible for collecting state updates and combining them into a * view of the current state of the sonar client. */ diff --git a/xplat/Sonar/SonarState.h b/xplat/Sonar/SonarState.h index ecdb2f7df..0b46ea2d6 100644 --- a/xplat/Sonar/SonarState.h +++ b/xplat/Sonar/SonarState.h @@ -17,7 +17,7 @@ class SonarStep; class SonarStateUpdateListener; namespace facebook { -namespace sonar { +namespace flipper { enum State { success, in_progress, failed }; @@ -38,7 +38,7 @@ class SonarState { SonarState(); void setUpdateListener(std::shared_ptr); std::string getState(); - std::vector getStateElements(); + std::vector getStateElements(); /* To record a state update, call start() with the name of the step to get a SonarStep object. Call complete on this to register it successful, @@ -54,5 +54,5 @@ class SonarState { std::shared_ptr mListener = nullptr; std::string log; std::vector insertOrder; - std::map stateMap; + std::map stateMap; }; diff --git a/xplat/Sonar/SonarWebSocket.h b/xplat/Sonar/SonarWebSocket.h index 355b94da4..40481196c 100644 --- a/xplat/Sonar/SonarWebSocket.h +++ b/xplat/Sonar/SonarWebSocket.h @@ -11,7 +11,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { class SonarWebSocket { public: @@ -59,5 +59,5 @@ class SonarWebSocket::Callbacks { virtual void onMessageReceived(const folly::dynamic& message) = 0; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarWebSocketImpl.cpp b/xplat/Sonar/SonarWebSocketImpl.cpp index 0cc6d5433..c16b01895 100644 --- a/xplat/Sonar/SonarWebSocketImpl.cpp +++ b/xplat/Sonar/SonarWebSocketImpl.cpp @@ -30,7 +30,7 @@ static constexpr int securePort = 8088; static constexpr int insecurePort = 8089; namespace facebook { -namespace sonar { +namespace flipper { class ConnectionEvents : public rsocket::RSocketConnectionEvents { private: @@ -301,5 +301,5 @@ bool SonarWebSocketImpl::isRunningInOwnThread() { return sonarEventBase_->isInEventBaseThread(); } -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/Sonar/SonarWebSocketImpl.h b/xplat/Sonar/SonarWebSocketImpl.h index 75991bbf9..a070fa609 100644 --- a/xplat/Sonar/SonarWebSocketImpl.h +++ b/xplat/Sonar/SonarWebSocketImpl.h @@ -17,7 +17,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { class ConnectionEvents; class ConnectionContextStore; @@ -67,5 +67,5 @@ class SonarWebSocketImpl : public SonarWebSocket { std::string getDeviceId(); }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/SonarTestLib/ConnectionContextStoreMock.h b/xplat/SonarTestLib/ConnectionContextStoreMock.h index 5befa0129..721f4d2f5 100644 --- a/xplat/SonarTestLib/ConnectionContextStoreMock.h +++ b/xplat/SonarTestLib/ConnectionContextStoreMock.h @@ -1,7 +1,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { namespace test { class ConnectionContextStoreMock : public ConnectionContextStore { diff --git a/xplat/SonarTestLib/SonarConnectionMock.h b/xplat/SonarTestLib/SonarConnectionMock.h index 815512b57..a08b05584 100644 --- a/xplat/SonarTestLib/SonarConnectionMock.h +++ b/xplat/SonarTestLib/SonarConnectionMock.h @@ -13,7 +13,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { class SonarConnectionMock : public SonarConnection { public: @@ -33,5 +33,5 @@ class SonarConnectionMock : public SonarConnection { std::map receivers_; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/SonarTestLib/SonarPluginMock.h b/xplat/SonarTestLib/SonarPluginMock.h index 83bada094..bd9edbb86 100644 --- a/xplat/SonarTestLib/SonarPluginMock.h +++ b/xplat/SonarTestLib/SonarPluginMock.h @@ -11,7 +11,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { namespace test { class SonarPluginMock : public SonarPlugin { @@ -58,5 +58,5 @@ class SonarPluginMock : public SonarPlugin { }; } // namespace test -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/SonarTestLib/SonarResponderMock.h b/xplat/SonarTestLib/SonarResponderMock.h index e423e9fa3..f00ae72b4 100644 --- a/xplat/SonarTestLib/SonarResponderMock.h +++ b/xplat/SonarTestLib/SonarResponderMock.h @@ -13,7 +13,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { class SonarResponderMock : public SonarResponder { public: @@ -39,5 +39,5 @@ class SonarResponderMock : public SonarResponder { std::vector* errors_; }; -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/SonarTestLib/SonarWebSocketMock.h b/xplat/SonarTestLib/SonarWebSocketMock.h index b8f0a6bcc..19a0774b7 100644 --- a/xplat/SonarTestLib/SonarWebSocketMock.h +++ b/xplat/SonarTestLib/SonarWebSocketMock.h @@ -11,7 +11,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { namespace test { class SonarWebSocketMock : public SonarWebSocket { @@ -51,5 +51,5 @@ class SonarWebSocketMock : public SonarWebSocket { }; } // namespace test -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/SonarTests/SonarClientTests.cpp b/xplat/SonarTests/SonarClientTests.cpp index 0d32d1fa0..9384d2ca3 100644 --- a/xplat/SonarTests/SonarClientTests.cpp +++ b/xplat/SonarTests/SonarClientTests.cpp @@ -14,7 +14,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { namespace test { using folly::dynamic; @@ -290,5 +290,5 @@ TEST(SonarClientTests, testExceptionUnknownApi) { } } // namespace test -} // namespace sonar +} // namespace flipper } // namespace facebook diff --git a/xplat/SonarTests/SonarWebSocketImplTerminationTests.cpp b/xplat/SonarTests/SonarWebSocketImplTerminationTests.cpp index 846b6f710..868e69ab7 100644 --- a/xplat/SonarTests/SonarWebSocketImplTerminationTests.cpp +++ b/xplat/SonarTests/SonarWebSocketImplTerminationTests.cpp @@ -12,7 +12,7 @@ #include namespace facebook { -namespace sonar { +namespace flipper { namespace test { using folly::EventBase; @@ -95,5 +95,5 @@ TEST_F(SonarWebSocketImplTerminationTest, testStartedEventBaseDoesntHang) { } } // namespace test -} // namespace sonar +} // namespace flipper } // namespace facebook