From 102347027e75c240f6d86e1af776c5afe70c9051 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 2 Dec 2021 02:01:44 -0500 Subject: [PATCH] Remove unused CHIPClustersInvoke-src.zapt template. (#12450) This was missed in https://github.com/project-chip/connectedhomeip/pull/11699 --- .../templates/app/CHIPClustersInvoke-src.zapt | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt diff --git a/src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt b/src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt deleted file mode 100644 index b8593cb5b920a9..00000000000000 --- a/src/app/zap-templates/templates/app/CHIPClustersInvoke-src.zapt +++ /dev/null @@ -1,45 +0,0 @@ -{{> header}} - -{{#if (chip_has_client_clusters)}} -#include "CHIPClusters.h" - -#include -#include - -namespace chip { - -using namespace app::Clusters; -using namespace System; -using namespace Encoding::LittleEndian; - -namespace Controller { - -{{#chip_client_clusters}} - -{{#chip_cluster_commands}} -{{#*inline "requestType"}}chip::app::Clusters::{{asUpperCamelCase parent.name}}::Commands::{{asUpperCamelCase name}}::Type{{/inline}} -template CHIP_ERROR ClusterBase::InvokeCommand<{{>requestType}}>(const {{>requestType}} &, void *, CommandResponseSuccessCallbackrequestType}}::ResponseType>, CommandResponseFailureCallback); -{{/chip_cluster_commands}} -{{/chip_client_clusters}} - -template -CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * context, - CommandResponseSuccessCallback successCb, CommandResponseFailureCallback failureCb) -{ - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, const typename RequestDataT::ResponseType & responseData) { - successCb(context, responseData); - }; - - auto onFailureCb = [context, failureCb](const app::StatusIB & aStatus, CHIP_ERROR aError) { - failureCb(context, app::ToEmberAfStatus(aStatus.mStatus)); - }; - - return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, - requestData, onSuccessCb, onFailureCb); -}; - -} // namespace Controller -} // namespace chip -{{/if}}