Line data Source code
1 : /*
2 : * Copyright (c) 2025 Project CHIP Authors
3 : * All rights reserved.
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 : #include <app/data-model-provider/ProviderMetadataTree.h>
19 :
20 : #include <app/data-model-provider/MetadataList.h>
21 :
22 : namespace chip {
23 : namespace app {
24 : namespace DataModel {
25 :
26 2923 : ReadOnlyBuffer<EndpointEntry> ProviderMetadataTree::EndpointsIgnoreError()
27 : {
28 :
29 2923 : ListBuilder<EndpointEntry> builder;
30 2923 : (void) Endpoints(builder);
31 2923 : return builder.TakeBuffer();
32 2923 : }
33 :
34 8437 : ReadOnlyBuffer<ServerClusterEntry> ProviderMetadataTree::ServerClustersIgnoreError(EndpointId endpointId)
35 : {
36 :
37 8437 : ListBuilder<ServerClusterEntry> builder;
38 8437 : (void) ServerClusters(endpointId, builder);
39 8437 : return builder.TakeBuffer();
40 8437 : }
41 :
42 12913 : ReadOnlyBuffer<AttributeEntry> ProviderMetadataTree::AttributesIgnoreError(const ConcreteClusterPath & path)
43 : {
44 12913 : ListBuilder<AttributeEntry> builder;
45 12913 : (void) Attributes(path, builder);
46 12913 : return builder.TakeBuffer();
47 12913 : }
48 :
49 : } // namespace DataModel
50 : } // namespace app
51 : } // namespace chip
|