From 5ef4681ae51abed0d6e96112a4bfefa434a24d5c Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Mon, 16 Oct 2023 04:46:54 -0400 Subject: [PATCH] Stop using CHIPClusters in core code and chip-tool. (#29772) They are not really needed; we should really stop generating them. --- examples/chip-tool/commands/pairing/PairingCommand.h | 1 - src/app/app-platform/ContentAppPlatform.cpp | 4 ++-- src/app/clusters/ota-requestor/DefaultOTARequestor.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index 38b56b23e5d9bb..19d4a50471ed95 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -21,7 +21,6 @@ #include "../common/CHIPCommand.h" #include #include -#include #include #include diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index d162ec4bbab7ad..4162693b19508f 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -31,7 +32,6 @@ #include #include #include -#include #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED @@ -684,7 +684,7 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(Messaging::ExchangeManager & e ChipLogProgress(Controller, "Attempting to update Binding list"); BindingListType bindingList(bindings.data(), bindings.size()); - chip::Controller::BindingCluster cluster(exchangeMgr, sessionHandle, kTargetBindingClusterEndpointId); + Controller::ClusterBase cluster(exchangeMgr, sessionHandle, kTargetBindingClusterEndpointId); ReturnErrorOnFailure( cluster.WriteAttribute(bindingList, nullptr, successCb, failureCb)); diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp index fa56ab0fd571a9..5f02c4df3f3dd5 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestor.cpp @@ -22,12 +22,12 @@ #include #include +#include #include #include #include #include #include -#include #include "BDXDownloader.h" #include "DefaultOTARequestor.h" @@ -765,7 +765,7 @@ CHIP_ERROR DefaultOTARequestor::SendQueryImageRequest(Messaging::ExchangeManager } args.metadataForProvider = mMetadataForProvider; - Controller::OtaSoftwareUpdateProviderCluster cluster(exchangeMgr, sessionHandle, mProviderLocation.Value().endpoint); + Controller::ClusterBase cluster(exchangeMgr, sessionHandle, mProviderLocation.Value().endpoint); return cluster.InvokeCommand(args, this, OnQueryImageResponse, OnQueryImageFailure); } @@ -839,7 +839,7 @@ CHIP_ERROR DefaultOTARequestor::SendApplyUpdateRequest(Messaging::ExchangeManage args.updateToken = mUpdateToken; args.newVersion = mTargetVersion; - Controller::OtaSoftwareUpdateProviderCluster cluster(exchangeMgr, sessionHandle, mProviderLocation.Value().endpoint); + Controller::ClusterBase cluster(exchangeMgr, sessionHandle, mProviderLocation.Value().endpoint); return cluster.InvokeCommand(args, this, OnApplyUpdateResponse, OnApplyUpdateFailure); } @@ -854,7 +854,7 @@ CHIP_ERROR DefaultOTARequestor::SendNotifyUpdateAppliedRequest(Messaging::Exchan args.updateToken = mUpdateToken; args.softwareVersion = mCurrentVersion; - Controller::OtaSoftwareUpdateProviderCluster cluster(exchangeMgr, sessionHandle, mProviderLocation.Value().endpoint); + Controller::ClusterBase cluster(exchangeMgr, sessionHandle, mProviderLocation.Value().endpoint); // There is no response for a notify so consider this OTA complete. Clear the provider location and reset any states to indicate // so.