From 583dff36199da5ac68ef9daa681c9a47c537ee90 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Mon, 28 Oct 2024 23:49:48 -0700 Subject: [PATCH] Rename CommissionerControl to CommissionerControlDelegate --- examples/fabric-bridge-app/linux/BUILD.gn | 2 +- ...trol.cpp => CommissionerControlDelegate.cpp} | 2 +- ...rControl.h => CommissionerControlDelegate.h} | 0 examples/fabric-bridge-app/linux/main.cpp | 17 ++++++++--------- 4 files changed, 10 insertions(+), 11 deletions(-) rename examples/fabric-bridge-app/linux/{CommissionerControl.cpp => CommissionerControlDelegate.cpp} (99%) rename examples/fabric-bridge-app/linux/include/{CommissionerControl.h => CommissionerControlDelegate.h} (100%) diff --git a/examples/fabric-bridge-app/linux/BUILD.gn b/examples/fabric-bridge-app/linux/BUILD.gn index d0e92a408ee00e..aec152497ae1a2 100644 --- a/examples/fabric-bridge-app/linux/BUILD.gn +++ b/examples/fabric-bridge-app/linux/BUILD.gn @@ -33,7 +33,7 @@ if (bridge_enable_pw_rpc) { executable("fabric-bridge-app") { sources = [ "${chip_root}/examples/fabric-bridge-app/fabric-bridge-common/include/CHIPProjectAppConfig.h", - "CommissionerControl.cpp", + "CommissionerControlDelegate.cpp", "main.cpp", ] diff --git a/examples/fabric-bridge-app/linux/CommissionerControl.cpp b/examples/fabric-bridge-app/linux/CommissionerControlDelegate.cpp similarity index 99% rename from examples/fabric-bridge-app/linux/CommissionerControl.cpp rename to examples/fabric-bridge-app/linux/CommissionerControlDelegate.cpp index 138e1129b82273..8a5c5af3db0566 100644 --- a/examples/fabric-bridge-app/linux/CommissionerControl.cpp +++ b/examples/fabric-bridge-app/linux/CommissionerControlDelegate.cpp @@ -16,7 +16,7 @@ * limitations under the License. */ -#include "CommissionerControl.h" +#include "CommissionerControlDelegate.h" #include "RpcClient.h" #include diff --git a/examples/fabric-bridge-app/linux/include/CommissionerControl.h b/examples/fabric-bridge-app/linux/include/CommissionerControlDelegate.h similarity index 100% rename from examples/fabric-bridge-app/linux/include/CommissionerControl.h rename to examples/fabric-bridge-app/linux/include/CommissionerControlDelegate.h diff --git a/examples/fabric-bridge-app/linux/main.cpp b/examples/fabric-bridge-app/linux/main.cpp index a101fd3d32a91a..574053424f7895 100644 --- a/examples/fabric-bridge-app/linux/main.cpp +++ b/examples/fabric-bridge-app/linux/main.cpp @@ -23,7 +23,7 @@ #include "BridgedDeviceBasicInformationImpl.h" #include "BridgedDeviceManager.h" #include "CommissionableInit.h" -#include "CommissionerControl.h" +#include "CommissionerControlDelegate.h" #include #include @@ -35,6 +35,12 @@ #include "RpcServer.h" #endif +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::AdministratorCommissioning; +using namespace chip::app::Clusters::BridgedDeviceBasicInformation; + // This is declared here and not in a header because zap/embr assumes all clusters // are defined in a static endpoint in the .zap file. From there, the codegen will // automatically use PluginApplicationCallbacksHeader.jinja to declare and call @@ -43,12 +49,6 @@ // need to declare and call it ourselves where the application is initialized. void MatterEcosystemInformationPluginServerInitCallback(); -using namespace chip; -using namespace chip::app; -using namespace chip::app::Clusters; -using namespace chip::app::Clusters::AdministratorCommissioning; -using namespace chip::app::Clusters::BridgedDeviceBasicInformation; - namespace { #if defined(PW_RPC_FABRIC_BRIDGE_SERVICE) && PW_RPC_FABRIC_BRIDGE_SERVICE @@ -58,8 +58,6 @@ constexpr uint16_t kRetryIntervalS = 3; uint16_t gFabricAdminServerPort = 33001; uint16_t gLocalServerPort = 33002; -BridgedDeviceBasicInformationImpl gBridgedDeviceBasicInformationAttributes; - constexpr uint16_t kOptionFabricAdminServerPortNumber = 0xFF01; constexpr uint16_t kOptionLocalServerPortNumber = 0xFF02; @@ -239,6 +237,7 @@ void BridgedDeviceInformationCommandHandler::InvokeCommand(HandlerContext & hand } BridgedAdministratorCommissioning gBridgedAdministratorCommissioning; +BridgedDeviceBasicInformationImpl gBridgedDeviceBasicInformationAttributes; AdministratorCommissioningCommandHandler gAdministratorCommissioningCommandHandler; BridgedDeviceInformationCommandHandler gBridgedDeviceInformationCommandHandler;