|
| 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 | +#include <app/server-cluster/testing/EmptyProvider.h> |
| 18 | + |
| 19 | +namespace chip { |
| 20 | +namespace Test { |
| 21 | + |
| 22 | +using Protocols::InteractionModel::Status; |
| 23 | +using namespace chip::app; |
| 24 | +using namespace chip::app::DataModel; |
| 25 | + |
| 26 | +CHIP_ERROR EmptyProvider::Shutdown() |
| 27 | +{ |
| 28 | + return CHIP_NO_ERROR; |
| 29 | +} |
| 30 | + |
| 31 | +CHIP_ERROR EmptyProvider::Endpoints(ListBuilder<app::DataModel::EndpointEntry> & builder) |
| 32 | +{ |
| 33 | + return CHIP_NO_ERROR; |
| 34 | +} |
| 35 | + |
| 36 | +CHIP_ERROR EmptyProvider::SemanticTags(EndpointId endpointId, ListBuilder<SemanticTag> & builder) |
| 37 | +{ |
| 38 | + return CHIP_IM_GLOBAL_STATUS(UnsupportedEndpoint); |
| 39 | +} |
| 40 | +CHIP_ERROR EmptyProvider::DeviceTypes(EndpointId endpointId, ListBuilder<app::DataModel::DeviceTypeEntry> & builder) |
| 41 | +{ |
| 42 | + return CHIP_IM_GLOBAL_STATUS(UnsupportedEndpoint); |
| 43 | +} |
| 44 | + |
| 45 | +CHIP_ERROR EmptyProvider::ClientClusters(EndpointId endpointId, ListBuilder<ClusterId> & builder) |
| 46 | +{ |
| 47 | + return CHIP_IM_GLOBAL_STATUS(UnsupportedEndpoint); |
| 48 | +} |
| 49 | +CHIP_ERROR EmptyProvider::ServerClusters(EndpointId endpointId, ListBuilder<app::DataModel::ServerClusterEntry> & builder) |
| 50 | +{ |
| 51 | + return CHIP_IM_GLOBAL_STATUS(UnsupportedEndpoint); |
| 52 | +} |
| 53 | + |
| 54 | +CHIP_ERROR EmptyProvider::Attributes(const app::ConcreteClusterPath & path, ListBuilder<app::DataModel::AttributeEntry> & builder) |
| 55 | +{ |
| 56 | + return CHIP_IM_GLOBAL_STATUS(UnsupportedEndpoint); |
| 57 | +} |
| 58 | + |
| 59 | +CHIP_ERROR EmptyProvider::GeneratedCommands(const app::ConcreteClusterPath & path, ListBuilder<CommandId> & builder) |
| 60 | +{ |
| 61 | + return CHIP_IM_GLOBAL_STATUS(UnsupportedEndpoint); |
| 62 | +} |
| 63 | + |
| 64 | +CHIP_ERROR EmptyProvider::AcceptedCommands(const app::ConcreteClusterPath & path, |
| 65 | + ListBuilder<app::DataModel::AcceptedCommandEntry> & builder) |
| 66 | +{ |
| 67 | + return CHIP_IM_GLOBAL_STATUS(UnsupportedEndpoint); |
| 68 | +} |
| 69 | + |
| 70 | +void EmptyProvider::Temporary_ReportAttributeChanged(const app::AttributePathParams & path) {} |
| 71 | + |
| 72 | +ActionReturnStatus EmptyProvider::ReadAttribute(const app::DataModel::ReadAttributeRequest & request, |
| 73 | + app::AttributeValueEncoder & encoder) |
| 74 | +{ |
| 75 | + return Status::UnsupportedEndpoint; |
| 76 | +} |
| 77 | + |
| 78 | +ActionReturnStatus EmptyProvider::WriteAttribute(const app::DataModel::WriteAttributeRequest & request, |
| 79 | + app::AttributeValueDecoder & decoder) |
| 80 | +{ |
| 81 | + return Status::UnsupportedEndpoint; |
| 82 | +} |
| 83 | +std::optional<ActionReturnStatus> EmptyProvider::InvokeCommand(const app::DataModel::InvokeRequest & request, |
| 84 | + chip::TLV::TLVReader & input_arguments, |
| 85 | + app::CommandHandler * handler) |
| 86 | +{ |
| 87 | + return Status::UnsupportedEndpoint; |
| 88 | +} |
| 89 | + |
| 90 | +} // namespace Test |
| 91 | +} // namespace chip |
0 commit comments