blob: 342d396b3a7b4f8340047033f1f46951003c62af [file] [log] [blame]
{{> header}}
{{#if (chip_has_client_clusters)}}
// Prevent multiple inclusion
#pragma once
#include <app-common/zap-generated/ids/Clusters.h>
#include <app-common/zap-generated/ids/Commands.h>
#include <controller/CHIPCluster.h>
#include <lib/core/CHIPCallback.h>
#include <lib/support/Span.h>
namespace chip {
namespace Controller {
{{#chip_client_clusters}}
class DLL_EXPORT {{asUpperCamelCase name}}Cluster : public ClusterBase
{
public:
{{asUpperCamelCase name}}Cluster() : ClusterBase(app::Clusters::{{asUpperCamelCase name}}::Id) {}
~{{asUpperCamelCase name}}Cluster() {}
{{#chip_cluster_commands}}
{{#first}}
// Cluster Commands
{{/first}}
CHIP_ERROR {{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{chipType}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}});
{{/chip_cluster_commands}}
// Cluster Attributes
{{#chip_server_cluster_attributes}}
{{#unless (isStrEqual chipCallback.name "Unsupported")}}
{{#if isReportableAttribute}}
{{#unless isList}}
CHIP_ERROR SubscribeAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval);
CHIP_ERROR ReportAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onReportCallback);
{{/unless}}
{{/if}}
{{/unless}}
{{/chip_server_cluster_attributes}}
{{#chip_cluster_commands}}
{{#first}}
private:
{{/first}}
{{/chip_cluster_commands}}
};
{{/chip_client_clusters}}
} // namespace Controller
} // namespace chip
{{/if}}