Apply Upstream code (2021-03-15)
[platform/upstream/connectedhomeip.git] / src / darwin / Framework / CHIP / gen / CHIPClientCallbacks.h
1 /*
2  *
3  *    Copyright (c) 2021 Project CHIP Authors
4  *
5  *    Licensed under the Apache License, Version 2.0 (the "License");
6  *    you may not use this file except in compliance with the License.
7  *    You may obtain a copy of the License at
8  *
9  *        http://www.apache.org/licenses/LICENSE-2.0
10  *
11  *    Unless required by applicable law or agreed to in writing, software
12  *    distributed under the License is distributed on an "AS IS" BASIS,
13  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  *    See the License for the specific language governing permissions and
15  *    limitations under the License.
16  */
17
18 // THIS FILE IS GENERATED BY ZAP
19
20 #pragma once
21
22 #include <inttypes.h>
23 #include <lib/support/Span.h>
24
25 // Global Response Callbacks
26 typedef void (*DefaultSuccessCallback)(void * context);
27 typedef void (*DefaultFailureCallback)(void * context, uint8_t status);
28 typedef void (*BooleanAttributeCallback)(void * context, bool value);
29 typedef void (*Int8uAttributeCallback)(void * context, uint8_t value);
30 typedef void (*Int8sAttributeCallback)(void * context, int8_t value);
31 typedef void (*Int16uAttributeCallback)(void * context, uint16_t value);
32 typedef void (*Int16sAttributeCallback)(void * context, int16_t value);
33 typedef void (*Int32uAttributeCallback)(void * context, uint32_t value);
34 typedef void (*Int32sAttributeCallback)(void * context, int32_t value);
35 typedef void (*Int64uAttributeCallback)(void * context, uint64_t value);
36 typedef void (*Int64sAttributeCallback)(void * context, int64_t value);
37 typedef void (*StringAttributeCallback)(void * context, const chip::ByteSpan value);
38 typedef void (*ReadReportingConfigurationReportedCallback)(void * context, uint16_t minInterval, uint16_t maxInterval);
39 typedef void (*ReadReportingConfigurationReceivedCallback)(void * context, uint16_t timeout);
40
41 // Cluster Specific Response Callbacks
42 typedef void (*ContentLaunchClusterLaunchContentResponseCallback)(void * context, uint8_t contentLaunchStatus);
43 typedef void (*ContentLaunchClusterLaunchURLResponseCallback)(void * context, uint8_t contentLaunchStatus);
44 typedef void (*DoorLockClusterClearAllPinsResponseCallback)(void * context);
45 typedef void (*DoorLockClusterClearAllRfidsResponseCallback)(void * context);
46 typedef void (*DoorLockClusterClearHolidayScheduleResponseCallback)(void * context);
47 typedef void (*DoorLockClusterClearPinResponseCallback)(void * context);
48 typedef void (*DoorLockClusterClearRfidResponseCallback)(void * context);
49 typedef void (*DoorLockClusterClearWeekdayScheduleResponseCallback)(void * context);
50 typedef void (*DoorLockClusterClearYeardayScheduleResponseCallback)(void * context);
51 typedef void (*DoorLockClusterGetHolidayScheduleResponseCallback)(void * context, uint8_t scheduleId, uint32_t localStartTime,
52                                                                   uint32_t localEndTime, uint8_t operatingModeDuringHoliday);
53 typedef void (*DoorLockClusterGetLogRecordResponseCallback)(void * context, uint16_t logEntryId, uint32_t timestamp,
54                                                             uint8_t eventType, uint8_t source, uint8_t eventIdOrAlarmCode,
55                                                             uint16_t userId, uint8_t * pin);
56 typedef void (*DoorLockClusterGetPinResponseCallback)(void * context, uint16_t userId, uint8_t userStatus, uint8_t userType,
57                                                       uint8_t * pin);
58 typedef void (*DoorLockClusterGetRfidResponseCallback)(void * context, uint16_t userId, uint8_t userStatus, uint8_t userType,
59                                                        uint8_t * rfid);
60 typedef void (*DoorLockClusterGetUserTypeResponseCallback)(void * context, uint16_t userId, uint8_t userType);
61 typedef void (*DoorLockClusterGetWeekdayScheduleResponseCallback)(void * context, uint8_t scheduleId, uint16_t userId,
62                                                                   uint8_t daysMask, uint8_t startHour, uint8_t startMinute,
63                                                                   uint8_t endHour, uint8_t endMinute);
64 typedef void (*DoorLockClusterGetYeardayScheduleResponseCallback)(void * context, uint8_t scheduleId, uint16_t userId,
65                                                                   uint32_t localStartTime, uint32_t localEndTime);
66 typedef void (*DoorLockClusterLockDoorResponseCallback)(void * context);
67 typedef void (*DoorLockClusterSetHolidayScheduleResponseCallback)(void * context);
68 typedef void (*DoorLockClusterSetPinResponseCallback)(void * context);
69 typedef void (*DoorLockClusterSetRfidResponseCallback)(void * context);
70 typedef void (*DoorLockClusterSetUserTypeResponseCallback)(void * context);
71 typedef void (*DoorLockClusterSetWeekdayScheduleResponseCallback)(void * context);
72 typedef void (*DoorLockClusterSetYeardayScheduleResponseCallback)(void * context);
73 typedef void (*DoorLockClusterUnlockDoorResponseCallback)(void * context);
74 typedef void (*DoorLockClusterUnlockWithTimeoutResponseCallback)(void * context);
75 typedef void (*GeneralCommissioningClusterArmFailSafeResponseCallback)(void * context, uint8_t errorCode, uint8_t * debugText);
76 typedef void (*GeneralCommissioningClusterCommissioningCompleteResponseCallback)(void * context, uint8_t errorCode,
77                                                                                  uint8_t * debugText);
78 typedef void (*GeneralCommissioningClusterSetFabricResponseCallback)(void * context, uint8_t errorCode, uint8_t * debugText);
79 typedef void (*GroupsClusterAddGroupResponseCallback)(void * context, uint16_t groupId);
80 typedef void (*GroupsClusterGetGroupMembershipResponseCallback)(void * context, uint8_t capacity, uint8_t groupCount,
81                                                                 /* TYPE WARNING: array array defaults to */ uint8_t * groupList);
82 typedef void (*GroupsClusterRemoveGroupResponseCallback)(void * context, uint16_t groupId);
83 typedef void (*GroupsClusterViewGroupResponseCallback)(void * context, uint16_t groupId, uint8_t * groupName);
84 typedef void (*IdentifyClusterIdentifyQueryResponseCallback)(void * context, uint16_t timeout);
85 typedef void (*MediaPlaybackClusterPlaybackCallback)(void * context);
86 typedef void (*ScenesClusterAddSceneResponseCallback)(void * context, uint16_t groupId, uint8_t sceneId);
87 typedef void (*ScenesClusterGetSceneMembershipResponseCallback)(void * context, uint8_t capacity, uint16_t groupId,
88                                                                 uint8_t sceneCount,
89                                                                 /* TYPE WARNING: array array defaults to */ uint8_t * sceneList);
90 typedef void (*ScenesClusterRemoveAllScenesResponseCallback)(void * context, uint16_t groupId);
91 typedef void (*ScenesClusterRemoveSceneResponseCallback)(void * context, uint16_t groupId, uint8_t sceneId);
92 typedef void (*ScenesClusterStoreSceneResponseCallback)(void * context, uint16_t groupId, uint8_t sceneId);
93 typedef void (*ScenesClusterViewSceneResponseCallback)(void * context, uint16_t groupId, uint8_t sceneId, uint16_t transitionTime,
94                                                        uint8_t * sceneName,
95                                                        /* TYPE WARNING: array array defaults to */ uint8_t * extensionFieldSets);