9c9644fb00fb7a789ec25320e3a33b7c7be2f346
[platform/upstream/connectedhomeip.git] / examples / lock-app / lock-common / gen / CHIPClustersObjc.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 #ifndef CHIP_CLUSTERS_H
21 #define CHIP_CLUSTERS_H
22
23 #import <Foundation/Foundation.h>
24
25 @class CHIPDevice;
26
27 typedef void (^ResponseHandler)(NSError * _Nullable error, NSDictionary * _Nullable values);
28
29 NS_ASSUME_NONNULL_BEGIN
30
31 /**
32  * CHIPCluster
33  *    This is the base class for clusters.
34  */
35 @interface CHIPCluster : NSObject
36
37 - (nullable instancetype)initWithDevice:(CHIPDevice *)device
38                                endpoint:(uint8_t)endpoint
39                                   queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER;
40 - (instancetype)init NS_UNAVAILABLE;
41 + (instancetype)new NS_UNAVAILABLE;
42
43 @end
44
45 /**
46  * Cluster On/off
47  *
48  */
49 @interface CHIPOnOff : CHIPCluster
50
51 - (void)off:(ResponseHandler)completionHandler;
52 - (void)on:(ResponseHandler)completionHandler;
53 - (void)toggle:(ResponseHandler)completionHandler;
54
55 - (void)readAttributeOnOff:(ResponseHandler)completionHandler;
56 - (void)configureAttributeOnOff:(uint16_t)minInterval
57                     maxInterval:(uint16_t)maxInterval
58               completionHandler:(ResponseHandler)completionHandler;
59 - (void)reportAttributeOnOff:(ResponseHandler)reportHandler;
60 - (void)readAttributeClusterRevision:(ResponseHandler)completionHandler;
61
62 @end
63
64 NS_ASSUME_NONNULL_END
65
66 #endif /* CHIP_CLUSTERS_H */