blob: 5ff3db169261be297894f1de094202541071aedf [file] [log] [blame]
Rohit Jadhav701fcb22023-07-19 14:18:26 +05301/*
2 *
3 * Copyright (c) 2023 Project CHIP Authors
4 * All rights reserved.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19#pragma once
20
21#include <app-common/zap-generated/cluster-objects.h>
Jean-Francois Penven67f2ae52024-02-13 23:12:29 -050022
Rohit Jadhav701fcb22023-07-19 14:18:26 +053023#include <protocols/interaction_model/StatusCode.h>
24
25namespace chip {
26namespace app {
27namespace Clusters {
28namespace TemperatureControl {
29
30/**
31 * Interface to help manage the supported temperature levels of the Temperature Control Cluster.
32 */
33class SupportedTemperatureLevelsIteratorDelegate
34{
35public:
36 virtual ~SupportedTemperatureLevelsIteratorDelegate() = default;
37
38 SupportedTemperatureLevelsIteratorDelegate() {}
39
40 void Reset(EndpointId endpoint)
41 {
42 mEndpoint = endpoint;
43 mIndex = 0;
44 }
45
46 // Returns total size of SupportedTemperatureLevels list.
47 virtual uint8_t Size() = 0;
48
49 virtual CHIP_ERROR Next(MutableCharSpan & item) = 0;
50
51protected:
52 EndpointId mEndpoint;
53 uint8_t mIndex;
54};
55
56SupportedTemperatureLevelsIteratorDelegate * GetInstance();
57
58void SetInstance(SupportedTemperatureLevelsIteratorDelegate * instance);
59
60} // namespace TemperatureControl
61} // namespace Clusters
62} // namespace app
63} // namespace chip