Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / src / app / zap-templates / templates / app / CHIPClientCallbacks.zapt
1 {{> header}}
2
3 {{#if (chip_has_client_clusters)}}
4 #pragma once
5
6 #include <inttypes.h>
7 #include <lib/support/Span.h>
8
9 // Global Response Callbacks
10 typedef void (*DefaultSuccessCallback)(void * context);
11 typedef void (*DefaultFailureCallback)(void * context, uint8_t status);
12 typedef void (*BooleanAttributeCallback)(void * context, bool value);
13 typedef void (*Int8uAttributeCallback)(void * context, uint8_t value);
14 typedef void (*Int8sAttributeCallback)(void * context, int8_t value);
15 typedef void (*Int16uAttributeCallback)(void * context, uint16_t value);
16 typedef void (*Int16sAttributeCallback)(void * context, int16_t value);
17 typedef void (*Int32uAttributeCallback)(void * context, uint32_t value);
18 typedef void (*Int32sAttributeCallback)(void * context, int32_t value);
19 typedef void (*Int64uAttributeCallback)(void * context, uint64_t value);
20 typedef void (*Int64sAttributeCallback)(void * context, int64_t value);
21 typedef void (*StringAttributeCallback)(void * context, const chip::ByteSpan value);
22 typedef void (*ReadReportingConfigurationReportedCallback)(void* context, uint16_t minInterval, uint16_t maxInterval);
23 typedef void (*ReadReportingConfigurationReceivedCallback)(void* context, uint16_t timeout);
24
25 // Cluster Specific Response Callbacks
26 {{#chip_client_clusters}}
27 {{#if (user_cluster_has_enabled_command name side)}}
28 {{#all_user_cluster_commands}}
29 {{#if (isStrEqual clusterName parent.name)}}
30 {{#if (isCommandAvailable parent.side incoming outgoing commandSource name)}}
31 typedef void (*{{asCamelCased parent.name false}}Cluster{{asCamelCased name false}}Callback)(void * context{{#zcl_command_arguments}}{{#unless (isStrEqual label "status")}}, {{asUnderlyingZclType type}} {{asSymbol label}}{{/unless}}{{/zcl_command_arguments}});
32 {{/if}}
33 {{/if}}
34 {{/all_user_cluster_commands}}
35 {{/if}}
36 {{/chip_client_clusters}}
37 {{/if}}