a0804d8ae0fbb73b9fe5a4f3ec0f75e788b69737
[platform/upstream/connectedhomeip.git] / src / app / zap-templates / templates / app / CHIPClientCallbacks.zapt
1 {{> header}}
2
3 #pragma once
4
5 #include <inttypes.h>
6
7 // Global Response Callbacks
8 typedef void (*DefaultSuccessCallback)(void * context);
9 typedef void (*DefaultFailureCallback)(void * context, uint8_t status);
10 typedef void (*BooleanAttributeCallback)(void * context, bool value);
11 typedef void (*Int8uAttributeCallback)(void * context, uint8_t value);
12 typedef void (*Int8sAttributeCallback)(void * context, int8_t value);
13 typedef void (*Int16uAttributeCallback)(void * context, uint16_t value);
14 typedef void (*Int16sAttributeCallback)(void * context, int16_t value);
15 typedef void (*Int32uAttributeCallback)(void * context, uint32_t value);
16 typedef void (*Int32sAttributeCallback)(void * context, int32_t value);
17 typedef void (*Int64uAttributeCallback)(void * context, uint64_t value);
18 typedef void (*Int64sAttributeCallback)(void * context, int64_t value);
19 typedef void (*ReadReportingConfigurationReportedCallback)(void* context, uint16_t minInterval, uint16_t maxInterval);
20 typedef void (*ReadReportingConfigurationReceivedCallback)(void* context, uint16_t timeout);
21
22 // Cluster Specific Response Callbacks
23 {{#all_user_clusters}}
24 {{#if (isClient side) }}
25 {{#if (user_cluster_has_enabled_command name side)}}
26 {{#all_user_cluster_commands}}
27 {{#if (isStrEqual clusterName parent.name)}}
28 {{#if (isCommandAvailable parent.side incoming outgoing commandSource name)}}
29 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}});
30 {{/if}}
31 {{/if}}
32 {{/all_user_cluster_commands}}
33 {{/if}}
34 {{/if}}
35 {{/all_user_clusters}}