3 * Copyright (c) 2020 Project CHIP Authors
4 * Copyright (c) 2016-2017 Nest Labs, Inc.
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 * This file defines List builder in CHIP interaction model
26 #ifndef _CHIP_INTERACTION_MODEL_MESSAGE_DEF_LIST_BUILDER_H
27 #define _CHIP_INTERACTION_MODEL_MESSAGE_DEF_LIST_BUILDER_H
31 #include <core/CHIPCore.h>
32 #include <core/CHIPTLV.h>
33 #include <support/CodeUtils.h>
34 #include <support/logging/CHIPLogging.h>
35 #include <util/basic-types.h>
39 class ListBuilder : public chip::app::Builder
46 * Init the TLV array container with an particular context tag.
47 * Required to implement arrays of arrays, and to test ListBuilder.
49 * @param[in] apWriter Pointer to the TLVWriter that is encoding the message.
50 * @param[in] aContextTagToUse A contextTag to use.
52 * @return CHIP_ERROR codes returned by chip::TLV objects.
55 CHIP_ERROR Init(chip::TLV::TLVWriter * const apWriter, const uint8_t aContextTagToUse);
57 * Init the TLV array container with an anonymous tag.
58 * Required to implement arrays of arrays, and to test ListBuilder.
60 * @param[in] apWriter Pointer to the TLVWriter that is encoding the message.
62 * @return CHIP_ERROR codes returned by chip::TLV objects.
64 CHIP_ERROR Init(chip::TLV::TLVWriter * const apWriter);
70 #endif // _CHIP_INTERACTION_MODEL_MESSAGE_DEF_LIST_BUILDER_H