diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 576e2dab268229..4fbaab2a46a675 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -96,7 +96,6 @@ jobs: --known-failure app/app-platform/ContentAppPlatform.h \ --known-failure controller/ExamplePersistentStorage.cpp \ --known-failure controller/ExamplePersistentStorage.h \ - --known-failure app/AttributeAccessInterface.h \ --known-failure app/AttributeAccessToken.h \ --known-failure app/CommandHandler.h \ --known-failure app/CommandHandlerInterface.h \ @@ -107,11 +106,11 @@ jobs: --known-failure app/reporting/tests/MockReportScheduler.cpp \ --known-failure app/reporting/tests/MockReportScheduler.h \ --known-failure app/util/attribute-storage.cpp \ - --known-failure app/util/attribute-storage.h \ --known-failure app/util/attribute-storage-detail.h \ + --known-failure app/util/attribute-storage.h \ --known-failure app/util/attribute-table.cpp \ - --known-failure app/util/attribute-table.h \ --known-failure app/util/attribute-table-detail.h \ + --known-failure app/util/attribute-table.h \ --known-failure app/util/binding-table.cpp \ --known-failure app/util/binding-table.h \ --known-failure app/util/config.h \ @@ -123,6 +122,7 @@ jobs: --known-failure app/util/generic-callbacks.h \ --known-failure app/util/generic-callback-stubs.cpp \ --known-failure app/util/im-client-callbacks.h \ + --known-failure app/util/IMClusterCommandHandler.h \ --known-failure app/util/util.cpp \ --known-failure app/util/util.h \ --known-failure app/WriteHandler.h \ diff --git a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp index 13c0205a4e3ca1..41171d760d0048 100644 --- a/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp index 9a9fcccd73f4f2..9309b597db434f 100644 --- a/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/asr/src/bridged-actions-stub.cpp b/examples/bridge-app/asr/src/bridged-actions-stub.cpp index b63fee3fd300a7..9e26bae9803fa1 100755 --- a/examples/bridge-app/asr/src/bridged-actions-stub.cpp +++ b/examples/bridge-app/asr/src/bridged-actions-stub.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/esp32/main/DeviceCallbacks.cpp b/examples/bridge-app/esp32/main/DeviceCallbacks.cpp index b54c8b4ebb3934..13ced6a2e1c7c6 100644 --- a/examples/bridge-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/bridge-app/esp32/main/DeviceCallbacks.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/linux/bridged-actions-stub.cpp b/examples/bridge-app/linux/bridged-actions-stub.cpp index 6127df0206a4d0..00f6913b8012c5 100644 --- a/examples/bridge-app/linux/bridged-actions-stub.cpp +++ b/examples/bridge-app/linux/bridged-actions-stub.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index 3016ece7a2e768..3643f5ea1eb02a 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/examples/bridge-app/telink/src/DeviceCallbacks.cpp b/examples/bridge-app/telink/src/DeviceCallbacks.cpp index 6742953d7ec2d2..b0657e586fabc2 100644 --- a/examples/bridge-app/telink/src/DeviceCallbacks.cpp +++ b/examples/bridge-app/telink/src/DeviceCallbacks.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/chef/common/chef-fan-control-manager.cpp b/examples/chef/common/chef-fan-control-manager.cpp index 998491d4a61aeb..899892501bf4f1 100644 --- a/examples/chef/common/chef-fan-control-manager.cpp +++ b/examples/chef/common/chef-fan-control-manager.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/examples/placeholder/linux/InteractiveServer.cpp b/examples/placeholder/linux/InteractiveServer.cpp index e9ca422d016f42..10d82ba5a902bc 100644 --- a/examples/placeholder/linux/InteractiveServer.cpp +++ b/examples/placeholder/linux/InteractiveServer.cpp @@ -19,11 +19,13 @@ #include "InteractiveServer.h" #include +#include #include #include #include #include +#include using namespace chip::DeviceLayer; diff --git a/examples/placeholder/linux/src/bridged-actions-stub.cpp b/examples/placeholder/linux/src/bridged-actions-stub.cpp index 5df0ba11f74011..ea6e824738a857 100644 --- a/examples/placeholder/linux/src/bridged-actions-stub.cpp +++ b/examples/placeholder/linux/src/bridged-actions-stub.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/AttributeAccessInterfaceRegistry.cpp b/src/app/AttributeAccessInterfaceRegistry.cpp new file mode 100644 index 00000000000000..b2c885fc4b2e2b --- /dev/null +++ b/src/app/AttributeAccessInterfaceRegistry.cpp @@ -0,0 +1,126 @@ +/** + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include + +#include + +using namespace chip::app; + +namespace { + +AttributeAccessInterface * gAttributeAccessOverrides = nullptr; +AttributeAccessInterfaceCache gAttributeAccessInterfaceCache; + +// shouldUnregister returns true if the given AttributeAccessInterface should be +// unregistered. +template +void UnregisterMatchingAttributeAccessInterfaces(F shouldUnregister) +{ + AttributeAccessInterface * prev = nullptr; + AttributeAccessInterface * cur = gAttributeAccessOverrides; + while (cur) + { + AttributeAccessInterface * next = cur->GetNext(); + if (shouldUnregister(cur)) + { + // Remove it from the list + if (prev) + { + prev->SetNext(next); + } + else + { + gAttributeAccessOverrides = next; + } + + cur->SetNext(nullptr); + + // Do not change prev in this case. + } + else + { + prev = cur; + } + cur = next; + } +} + +} // namespace + +void unregisterAttributeAccessOverride(AttributeAccessInterface * attrOverride) +{ + gAttributeAccessInterfaceCache.Invalidate(); + UnregisterMatchingAttributeAccessInterfaces([attrOverride](AttributeAccessInterface * entry) { return entry == attrOverride; }); +} + +void unregisterAllAttributeAccessOverridesForEndpoint(EmberAfDefinedEndpoint * definedEndpoint) +{ + UnregisterMatchingAttributeAccessInterfaces( + [endpoint = definedEndpoint->endpoint](AttributeAccessInterface * entry) { return entry->MatchesEndpoint(endpoint); }); +} + +bool registerAttributeAccessOverride(AttributeAccessInterface * attrOverride) +{ + gAttributeAccessInterfaceCache.Invalidate(); + for (auto * cur = gAttributeAccessOverrides; cur; cur = cur->GetNext()) + { + if (cur->Matches(*attrOverride)) + { + ChipLogError(InteractionModel, "Duplicate attribute override registration failed"); + return false; + } + } + attrOverride->SetNext(gAttributeAccessOverrides); + gAttributeAccessOverrides = attrOverride; + return true; +} + +namespace chip { +namespace app { + +app::AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId, ClusterId clusterId) +{ + using CacheResult = AttributeAccessInterfaceCache::CacheResult; + + AttributeAccessInterface * cached = nullptr; + CacheResult result = gAttributeAccessInterfaceCache.Get(endpointId, clusterId, &cached); + switch (result) + { + case CacheResult::kDefinitelyUnused: + return nullptr; + case CacheResult::kDefinitelyUsed: + return cached; + case CacheResult::kCacheMiss: + default: + // Did not cache yet, search set of AAI registered, and cache if found. + for (app::AttributeAccessInterface * cur = gAttributeAccessOverrides; cur; cur = cur->GetNext()) + { + if (cur->Matches(endpointId, clusterId)) + { + gAttributeAccessInterfaceCache.MarkUsed(endpointId, clusterId, cur); + return cur; + } + } + + // Did not find AAI registered: mark as definitely not using. + gAttributeAccessInterfaceCache.MarkUnused(endpointId, clusterId); + } + + return nullptr; +} + +} // namespace app +} // namespace chip diff --git a/src/app/AttributeAccessInterfaceRegistry.h b/src/app/AttributeAccessInterfaceRegistry.h new file mode 100644 index 00000000000000..f8452214cbf5f9 --- /dev/null +++ b/src/app/AttributeAccessInterfaceRegistry.h @@ -0,0 +1,54 @@ +/** + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include + +/** + * Register an attribute access override. It will remain registered until the + * endpoint it's registered for is disabled (or until shutdown if it's + * registered for all endpoints) or until it is explicitly unregistered. + * Registration will fail if there is an already-registered override for the + * same set of attributes. + * + * @return false if there is an existing override that the new one would + * conflict with. In this case the override is not registered. + * @return true if registration was successful. + */ +bool registerAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); + +/** + * Unregister an attribute access override (for example if the object + * implementing AttributeAccessInterface is being destroyed). + */ +void unregisterAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); + +/** + * Unregister all attribute access interfaces that match this given endpoint. + */ +void unregisterAllAttributeAccessOverridesForEndpoint(EmberAfDefinedEndpoint * definedEndpoint); + +namespace chip { +namespace app { + +/** + * Get the registered attribute access override. nullptr when attribute access override is not found. + */ +AttributeAccessInterface * GetAttributeAccessOverride(EndpointId aEndpointId, ClusterId aClusterId); + +} // namespace app +} // namespace chip diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 76bd115a851a21..f368f068445d39 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -275,14 +275,32 @@ source_set("events") { ] } +static_library("attribute-access") { + sources = [ + "AttributeAccessInterface.cpp", + "AttributeAccessInterface.h", + "AttributeAccessInterfaceCache.h", + "AttributeAccessInterfaceRegistry.cpp", + "AttributeAccessInterfaceRegistry.h", + ] + + deps = [ + ":paths", + "${chip_root}/src/access:types", + "${chip_root}/src/app/MessageDef", + "${chip_root}/src/app/data-model", + "${chip_root}/src/app/util:af-types", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/support", + ] +} + # Note to developpers, instead of continuously adding files in the app librabry, it is recommand to create smaller source_sets that app can depend on. # This way, we can have a better understanding of dependencies and other componenets can depend on the different source_sets without needing to depend on the entire app library. static_library("app") { output_name = "libCHIPDataModel" sources = [ - "AttributeAccessInterface.cpp", - "AttributeAccessInterfaceCache.h", "AttributePathExpandIterator.cpp", "AttributePathExpandIterator.h", "AttributePersistenceProvider.h", @@ -315,15 +333,11 @@ static_library("app") { # "CommandHandler._h" # "ReadHandler._h", # "WriteHandler._h" - - # TODO: the following items cannot be included due to platform includes not being - # able to depend on src/app - # Name with _ so that linter does not recognize it - # "_AttributeAccessInterface._h", ] public_deps = [ ":app_config", + ":attribute-access", ":constants", ":global-attributes", ":interaction-model", diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index d0b020caf96315..64c06f92354f48 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -31,6 +31,7 @@ #include "access/SubjectDescriptor.h" #include #include +#include #include #include #include diff --git a/src/app/InteractionModelEngine.h b/src/app/InteractionModelEngine.h index 935bca002b0dd1..baf02c6af73d1c 100644 --- a/src/app/InteractionModelEngine.h +++ b/src/app/InteractionModelEngine.h @@ -712,15 +712,5 @@ class InteractionModelEngine : public Messaging::UnsolicitedMessageHandler, uint32_t mMagic = 0; }; -void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip::TLV::TLVReader & aReader, - CommandHandler * apCommandObj); - -/** - * Get the registered attribute access override. nullptr when attribute access override is not found. - * - * TODO(#16806): This function and registerAttributeAccessOverride can be member functions of InteractionModelEngine. - */ -AttributeAccessInterface * GetAttributeAccessOverride(EndpointId aEndpointId, ClusterId aClusterId); - } // namespace app } // namespace chip diff --git a/src/app/WriteHandler.cpp b/src/app/WriteHandler.cpp index 911c2f594095cd..f7f3ee1c8ae7ae 100644 --- a/src/app/WriteHandler.cpp +++ b/src/app/WriteHandler.cpp @@ -18,6 +18,7 @@ #include "messaging/ExchangeContext.h" #include +#include #include #include #include diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index 20fb879186a21c..316825bc91848c 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/account-login-server/account-login-server.cpp b/src/app/clusters/account-login-server/account-login-server.cpp index a41f8897e86a9a..95d94fe9b995a5 100644 --- a/src/app/clusters/account-login-server/account-login-server.cpp +++ b/src/app/clusters/account-login-server/account-login-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp index 1bfa13b6eb91bb..83a0b04281b1ad 100644 --- a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp +++ b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/air-quality-server/air-quality-server.cpp b/src/app/clusters/air-quality-server/air-quality-server.cpp index f9ff17bc4fe53f..811c4722c94fec 100644 --- a/src/app/clusters/air-quality-server/air-quality-server.cpp +++ b/src/app/clusters/air-quality-server/air-quality-server.cpp @@ -18,6 +18,7 @@ #include "app-common/zap-generated/ids/Clusters.h" #include +#include #include #include #include diff --git a/src/app/clusters/application-basic-server/application-basic-server.cpp b/src/app/clusters/application-basic-server/application-basic-server.cpp index 20daa3aff23363..3841b81873660b 100644 --- a/src/app/clusters/application-basic-server/application-basic-server.cpp +++ b/src/app/clusters/application-basic-server/application-basic-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/application-launcher-server/application-launcher-server.cpp b/src/app/clusters/application-launcher-server/application-launcher-server.cpp index 2cc461a80c752b..ed6265e47c485b 100644 --- a/src/app/clusters/application-launcher-server/application-launcher-server.cpp +++ b/src/app/clusters/application-launcher-server/application-launcher-server.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/audio-output-server/audio-output-server.cpp b/src/app/clusters/audio-output-server/audio-output-server.cpp index 297d1ea9d8d8b3..19d34b0ebb5718 100644 --- a/src/app/clusters/audio-output-server/audio-output-server.cpp +++ b/src/app/clusters/audio-output-server/audio-output-server.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/basic-information/basic-information.cpp b/src/app/clusters/basic-information/basic-information.cpp index 91eef9d9dae899..b550026b5f1cd7 100644 --- a/src/app/clusters/basic-information/basic-information.cpp +++ b/src/app/clusters/basic-information/basic-information.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/bindings/bindings.cpp b/src/app/clusters/bindings/bindings.cpp index f11ce51da2aa90..63b085d7ee6de4 100644 --- a/src/app/clusters/bindings/bindings.cpp +++ b/src/app/clusters/bindings/bindings.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp b/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp index bd9a2554094272..3eb3b1216a38c7 100644 --- a/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp +++ b/src/app/clusters/boolean-state-configuration-server/boolean-state-configuration-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/channel-server/channel-server.cpp b/src/app/clusters/channel-server/channel-server.cpp index 13743d875cfb42..01a1af2d3710de 100644 --- a/src/app/clusters/channel-server/channel-server.cpp +++ b/src/app/clusters/channel-server/channel-server.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h b/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h index 984eefee065fd2..c903b21c2306fd 100644 --- a/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h +++ b/src/app/clusters/concentration-measurement-server/concentration-measurement-server.h @@ -20,6 +20,7 @@ #include "concentration-measurement-cluster-objects.h" #include +#include #include #include #include diff --git a/src/app/clusters/content-launch-server/content-launch-server.cpp b/src/app/clusters/content-launch-server/content-launch-server.cpp index ed2f5fa7627bac..2e4fb7435c0be9 100644 --- a/src/app/clusters/content-launch-server/content-launch-server.cpp +++ b/src/app/clusters/content-launch-server/content-launch-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/descriptor/descriptor.cpp b/src/app/clusters/descriptor/descriptor.cpp index d3badfb36ac5db..514051226fdcf5 100644 --- a/src/app/clusters/descriptor/descriptor.cpp +++ b/src/app/clusters/descriptor/descriptor.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp index 7836e91295412f..da1fd23d151987 100644 --- a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp @@ -17,6 +17,7 @@ #include "device-energy-management-server.h" #include +#include #include #include #include diff --git a/src/app/clusters/door-lock-server/door-lock-server.cpp b/src/app/clusters/door-lock-server/door-lock-server.cpp index 66676a2f72e4b8..742afee28480f3 100644 --- a/src/app/clusters/door-lock-server/door-lock-server.cpp +++ b/src/app/clusters/door-lock-server/door-lock-server.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp b/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp index e8ee2387c7ab60..4f527882c7284d 100644 --- a/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp +++ b/src/app/clusters/electrical-energy-measurement-server/electrical-energy-measurement-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/electrical-power-measurement-server/electrical-power-measurement-server.cpp b/src/app/clusters/electrical-power-measurement-server/electrical-power-measurement-server.cpp index 5f124a3128df05..0ac1ec956f1dab 100644 --- a/src/app/clusters/electrical-power-measurement-server/electrical-power-measurement-server.cpp +++ b/src/app/clusters/electrical-power-measurement-server/electrical-power-measurement-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/energy-evse-server/energy-evse-server.cpp b/src/app/clusters/energy-evse-server/energy-evse-server.cpp index b3cbbf334a2e4c..2e2f6867e094c1 100644 --- a/src/app/clusters/energy-evse-server/energy-evse-server.cpp +++ b/src/app/clusters/energy-evse-server/energy-evse-server.cpp @@ -17,6 +17,7 @@ #include "energy-evse-server.h" #include +#include #include #include #include diff --git a/src/app/clusters/energy-preference-server/energy-preference-server.cpp b/src/app/clusters/energy-preference-server/energy-preference-server.cpp index c3c645f3108982..789ab4ce0e7299 100644 --- a/src/app/clusters/energy-preference-server/energy-preference-server.cpp +++ b/src/app/clusters/energy-preference-server/energy-preference-server.cpp @@ -17,6 +17,7 @@ #include "energy-preference-server.h" +#include #include // Needed for registerAttributeAccessOverride #include diff --git a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp index 8db33174f07429..7bd7043d7c7e51 100644 --- a/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp +++ b/src/app/clusters/ethernet-network-diagnostics-server/ethernet-network-diagnostics-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/fixed-label-server/fixed-label-server.cpp b/src/app/clusters/fixed-label-server/fixed-label-server.cpp index 22cca831167352..bd952f148647fc 100644 --- a/src/app/clusters/fixed-label-server/fixed-label-server.cpp +++ b/src/app/clusters/fixed-label-server/fixed-label-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp index d32ddc0ee90a5c..776441ffc9ae75 100644 --- a/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp +++ b/src/app/clusters/general-commissioning-server/general-commissioning-server.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp index 0bd3fe0af9332f..fa3d9da3177d53 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp index 5efc037014a704..c3cf09eb283f63 100644 --- a/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp +++ b/src/app/clusters/group-key-mgmt-server/group-key-mgmt-server.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/icd-management-server/icd-management-server.cpp b/src/app/clusters/icd-management-server/icd-management-server.cpp index 51ec9b9239f929..f6ab59d9f2efb0 100644 --- a/src/app/clusters/icd-management-server/icd-management-server.cpp +++ b/src/app/clusters/icd-management-server/icd-management-server.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/keypad-input-server/keypad-input-server.cpp b/src/app/clusters/keypad-input-server/keypad-input-server.cpp index b07c1fac8123ea..a9903b754591a4 100644 --- a/src/app/clusters/keypad-input-server/keypad-input-server.cpp +++ b/src/app/clusters/keypad-input-server/keypad-input-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp index c29f61b5a21f55..9870c858eca766 100644 --- a/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp +++ b/src/app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include diff --git a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp index d648216db55699..6f0f84fae808bc 100644 --- a/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp +++ b/src/app/clusters/laundry-washer-controls-server/laundry-washer-controls-server.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include diff --git a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp index 5f059e73b9a1d3..1b26542df3ed55 100644 --- a/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp +++ b/src/app/clusters/localization-configuration-server/localization-configuration-server.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/media-input-server/media-input-server.cpp b/src/app/clusters/media-input-server/media-input-server.cpp index 3fe13985b1ff06..267f4e987a1da1 100644 --- a/src/app/clusters/media-input-server/media-input-server.cpp +++ b/src/app/clusters/media-input-server/media-input-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/media-playback-server/media-playback-server.cpp b/src/app/clusters/media-playback-server/media-playback-server.cpp index 9140cf58044456..b13a46d0101dd7 100644 --- a/src/app/clusters/media-playback-server/media-playback-server.cpp +++ b/src/app/clusters/media-playback-server/media-playback-server.cpp @@ -27,6 +27,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/messages-server/messages-server.cpp b/src/app/clusters/messages-server/messages-server.cpp index 66594ae732a522..0c03c95572dc74 100644 --- a/src/app/clusters/messages-server/messages-server.cpp +++ b/src/app/clusters/messages-server/messages-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp index cae604c625f0cb..4a736cecd01ac6 100644 --- a/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp +++ b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/src/app/clusters/mode-base-server/mode-base-server.cpp b/src/app/clusters/mode-base-server/mode-base-server.cpp index 76bd195376e9b0..bb6aac6837c0bf 100644 --- a/src/app/clusters/mode-base-server/mode-base-server.cpp +++ b/src/app/clusters/mode-base-server/mode-base-server.cpp @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/src/app/clusters/mode-select-server/mode-select-server.cpp b/src/app/clusters/mode-select-server/mode-select-server.cpp index f162a26cf4e5df..dceb72767bfb14 100644 --- a/src/app/clusters/mode-select-server/mode-select-server.cpp +++ b/src/app/clusters/mode-select-server/mode-select-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index 3ad47b6cee7540..41741c70d266a4 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -22,6 +22,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp index d05f0995022d7e..12fe1c43de0baf 100644 --- a/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp +++ b/src/app/clusters/operational-credentials-server/operational-credentials-server.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/operational-state-server/operational-state-server.cpp b/src/app/clusters/operational-state-server/operational-state-server.cpp index 896cc0ca3856b6..50b4cd0178a8af 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.cpp +++ b/src/app/clusters/operational-state-server/operational-state-server.cpp @@ -22,6 +22,7 @@ #include "operational-state-server.h" #include #include +#include #include #include #include diff --git a/src/app/clusters/ota-requestor/ota-requestor-server.cpp b/src/app/clusters/ota-requestor/ota-requestor-server.cpp index 8f5d1326aaf70a..b95a6d9ba24742 100644 --- a/src/app/clusters/ota-requestor/ota-requestor-server.cpp +++ b/src/app/clusters/ota-requestor/ota-requestor-server.cpp @@ -21,6 +21,7 @@ */ #include +#include #include #include #include diff --git a/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp b/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp index 7e9804286f07ef..a8a9d4e80e8189 100644 --- a/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp +++ b/src/app/clusters/power-source-configuration-server/power-source-configuration-server.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/power-source-server/power-source-server.cpp b/src/app/clusters/power-source-server/power-source-server.cpp index a545ea91d3f4ef..43ca1827515731 100644 --- a/src/app/clusters/power-source-server/power-source-server.cpp +++ b/src/app/clusters/power-source-server/power-source-server.cpp @@ -23,6 +23,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/power-topology-server/power-topology-server.cpp b/src/app/clusters/power-topology-server/power-topology-server.cpp index 3aff74760343bc..0b7072ce8eb51b 100644 --- a/src/app/clusters/power-topology-server/power-topology-server.cpp +++ b/src/app/clusters/power-topology-server/power-topology-server.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp index 95480ddfcc23aa..25a0be188ad7af 100644 --- a/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp +++ b/src/app/clusters/resource-monitoring-server/resource-monitoring-server.cpp @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/src/app/clusters/sample-mei-server/sample-mei-server.cpp b/src/app/clusters/sample-mei-server/sample-mei-server.cpp index 56d026e48a1efa..afeca910b455fe 100644 --- a/src/app/clusters/sample-mei-server/sample-mei-server.cpp +++ b/src/app/clusters/sample-mei-server/sample-mei-server.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/scenes-server/scenes-server.cpp b/src/app/clusters/scenes-server/scenes-server.cpp index a57f00392dded8..860e29236fa868 100644 --- a/src/app/clusters/scenes-server/scenes-server.cpp +++ b/src/app/clusters/scenes-server/scenes-server.cpp @@ -19,6 +19,7 @@ #include "scenes-server.h" #include #include +#include #include #include #include diff --git a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp index b6071587292167..2c0d76f79b649b 100644 --- a/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp +++ b/src/app/clusters/software-diagnostics-server/software-diagnostics-server.cpp @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/target-navigator-server/target-navigator-server.cpp b/src/app/clusters/target-navigator-server/target-navigator-server.cpp index a6c4d3911ca70c..42c852b81c8c5a 100644 --- a/src/app/clusters/target-navigator-server/target-navigator-server.cpp +++ b/src/app/clusters/target-navigator-server/target-navigator-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/temperature-control-server/temperature-control-server.cpp b/src/app/clusters/temperature-control-server/temperature-control-server.cpp index 9194c168fb236a..85035c642d4092 100644 --- a/src/app/clusters/temperature-control-server/temperature-control-server.cpp +++ b/src/app/clusters/temperature-control-server/temperature-control-server.cpp @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/test-cluster-server/test-cluster-server.cpp b/src/app/clusters/test-cluster-server/test-cluster-server.cpp index 8d23cd3075db54..0d805347f792f9 100644 --- a/src/app/clusters/test-cluster-server/test-cluster-server.cpp +++ b/src/app/clusters/test-cluster-server/test-cluster-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 91d9b33da69ca5..214594667b9eb8 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -15,6 +15,7 @@ * limitations under the License. */ +#include #include #include diff --git a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp index b21f9015af8b28..59115c0971cffb 100644 --- a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp +++ b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp index ff38290c21f8d4..7e61e340f1fab1 100644 --- a/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp +++ b/src/app/clusters/time-format-localization-server/time-format-localization-server.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp index 3578e2be6eb8eb..d03d7842911d51 100644 --- a/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp +++ b/src/app/clusters/time-synchronization-server/time-synchronization-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/user-label-server/user-label-server.cpp b/src/app/clusters/user-label-server/user-label-server.cpp index 49a557b778baa2..5131ed44aaca2b 100644 --- a/src/app/clusters/user-label-server/user-label-server.cpp +++ b/src/app/clusters/user-label-server/user-label-server.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp b/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp index 120cd2b3dd8416..82dd45464cfde4 100644 --- a/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp +++ b/src/app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp index ec989bbc588372..3141094d1fa3c7 100644 --- a/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp +++ b/src/app/clusters/wake-on-lan-server/wake-on-lan-server.cpp @@ -26,6 +26,7 @@ #include #include +#include #include #include #include diff --git a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp index 0657e37f23b860..d24bc02227b272 100644 --- a/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp +++ b/src/app/clusters/wifi-network-diagnostics-server/wifi-network-diagnostics-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/app/dynamic_server/DynamicDispatcher.cpp b/src/app/dynamic_server/DynamicDispatcher.cpp index c54e7d87b96a0c..5f9476aa6fd40a 100644 --- a/src/app/dynamic_server/DynamicDispatcher.cpp +++ b/src/app/dynamic_server/DynamicDispatcher.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -189,13 +188,6 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, return aWriteHandler->AddStatus(aPath, status); } -// No attribute access overrides on iOS and Android for now. -// TODO (#16806): This function can be moved to InteractionModelEngine. -AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId, ClusterId clusterId) -{ - return nullptr; -} - void DispatchSingleClusterCommand(const ConcreteCommandPath & aPath, TLV::TLVReader & aReader, CommandHandler * aCommandObj) { // This command passed ServerClusterCommandExists so we know it's one of our diff --git a/src/app/icd/server/ICDManager.cpp b/src/app/icd/server/ICDManager.cpp index 479fb9a240bc30..5f93946fa8eebf 100644 --- a/src/app/icd/server/ICDManager.cpp +++ b/src/app/icd/server/ICDManager.cpp @@ -26,7 +26,6 @@ #include #include #include -#include namespace { enum class ICDTestEventTriggerEvent : uint64_t diff --git a/src/app/icd/server/ICDManager.h b/src/app/icd/server/ICDManager.h index 43a5386d4d7844..69dfdbf6a88863 100644 --- a/src/app/icd/server/ICDManager.h +++ b/src/app/icd/server/ICDManager.h @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/src/app/util/IMClusterCommandHandler.h b/src/app/util/IMClusterCommandHandler.h new file mode 100644 index 00000000000000..95d1aef85917f4 --- /dev/null +++ b/src/app/util/IMClusterCommandHandler.h @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include +#include + +namespace chip { +namespace app { + +/** + * Dispatch is generally implemented in code-generated code in ember within + * IMClusterCommandHandler.cpp + * + * aCommandPath - the path that is invoked + * aReader - the input TLV data for this command + * apCommandObj - how to send back the reply + */ +void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, chip::TLV::TLVReader & aReader, + CommandHandler * apCommandObj); + +} // namespace app +} // namespace chip diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index ffffdfb129de13..c608854c346fba 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -24,7 +24,6 @@ */ #include // For bool -#include // For NULL. #include // For various uint*_t types #include diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 8848c63d07a427..d154b95cf9ab9e 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -19,7 +19,7 @@ #include -#include +#include #include #include #include @@ -140,43 +140,6 @@ constexpr const EmberAfDeviceType fixedDeviceTypeList[] = FIXED_DEVI DataVersion fixedEndpointDataVersions[ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT]; #endif // FIXED_ENDPOINT_COUNT > 0 -AttributeAccessInterface * gAttributeAccessOverrides = nullptr; -AttributeAccessInterfaceCache gAttributeAccessInterfaceCache; - -// shouldUnregister returns true if the given AttributeAccessInterface should be -// unregistered. -template -void UnregisterMatchingAttributeAccessInterfaces(F shouldUnregister) -{ - AttributeAccessInterface * prev = nullptr; - AttributeAccessInterface * cur = gAttributeAccessOverrides; - while (cur) - { - AttributeAccessInterface * next = cur->GetNext(); - if (shouldUnregister(cur)) - { - // Remove it from the list - if (prev) - { - prev->SetNext(next); - } - else - { - gAttributeAccessOverrides = next; - } - - cur->SetNext(nullptr); - - // Do not change prev in this case. - } - else - { - prev = cur; - } - cur = next; - } -} - bool emberAfIsThisDataTypeAListType(EmberAfAttributeType dataType) { return dataType == ZCL_ARRAY_ATTRIBUTE_TYPE; @@ -462,10 +425,7 @@ static void shutdownEndpoint(EmberAfDefinedEndpoint * definedEndpoint) // endpoint. chip::app::InteractionModelEngine::GetInstance()->UnregisterCommandHandlers(definedEndpoint->endpoint); - // Clear out any attribute access overrides registered for this - // endpoint. - UnregisterMatchingAttributeAccessInterfaces( - [endpoint = definedEndpoint->endpoint](AttributeAccessInterface * entry) { return entry->MatchesEndpoint(endpoint); }); + unregisterAllAttributeAccessOverridesForEndpoint(definedEndpoint); } // Calls the init functions. @@ -1382,62 +1342,9 @@ EmberAfGenericClusterFunction emberAfFindClusterFunction(const EmberAfCluster * return cluster->functions[functionIndex]; } -bool registerAttributeAccessOverride(AttributeAccessInterface * attrOverride) -{ - gAttributeAccessInterfaceCache.Invalidate(); - for (auto * cur = gAttributeAccessOverrides; cur; cur = cur->GetNext()) - { - if (cur->Matches(*attrOverride)) - { - ChipLogError(Zcl, "Duplicate attribute override registration failed"); - return false; - } - } - attrOverride->SetNext(gAttributeAccessOverrides); - gAttributeAccessOverrides = attrOverride; - return true; -} - -void unregisterAttributeAccessOverride(AttributeAccessInterface * attrOverride) -{ - gAttributeAccessInterfaceCache.Invalidate(); - UnregisterMatchingAttributeAccessInterfaces([attrOverride](AttributeAccessInterface * entry) { return entry == attrOverride; }); -} - namespace chip { namespace app { -app::AttributeAccessInterface * GetAttributeAccessOverride(EndpointId endpointId, ClusterId clusterId) -{ - using CacheResult = AttributeAccessInterfaceCache::CacheResult; - - AttributeAccessInterface * cached = nullptr; - CacheResult result = gAttributeAccessInterfaceCache.Get(endpointId, clusterId, &cached); - switch (result) - { - case CacheResult::kDefinitelyUnused: - return nullptr; - case CacheResult::kDefinitelyUsed: - return cached; - case CacheResult::kCacheMiss: - default: - // Did not cache yet, search set of AAI registered, and cache if found. - for (app::AttributeAccessInterface * cur = gAttributeAccessOverrides; cur; cur = cur->GetNext()) - { - if (cur->Matches(endpointId, clusterId)) - { - gAttributeAccessInterfaceCache.MarkUsed(endpointId, clusterId, cur); - return cur; - } - } - - // Did not find AAI registered: mark as definitely not using. - gAttributeAccessInterfaceCache.MarkUnused(endpointId, clusterId); - } - - return nullptr; -} - CHIP_ERROR SetParentEndpointForEndpoint(EndpointId childEndpoint, EndpointId parentEndpoint) { uint16_t childIndex = emberAfIndexFromEndpoint(childEndpoint); diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 013be43f20334b..b25f106d4fcecd 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -183,25 +183,6 @@ chip::DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPa */ uint16_t emberAfFixedEndpointCount(); -/** - * Register an attribute access override. It will remain registered until the - * endpoint it's registered for is disabled (or until shutdown if it's - * registered for all endpoints) or until it is explicitly unregistered. - * Registration will fail if there is an already-registered override for the - * same set of attributes. - * - * @return false if there is an existing override that the new one would - * conflict with. In this case the override is not registered. - * @return true if registration was successful. - */ -bool registerAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); - -/** - * Unregister an attribute access override (for example if the object - * implementing AttributeAccessInterface is being destroyed). - */ -void unregisterAttributeAccessOverride(chip::app::AttributeAccessInterface * attrOverride); - /** * Get the semantic tags of the endpoint. * Fills in the provided SemanticTagStruct with tag at index `index` if there is one, diff --git a/src/app/util/ember-compatibility-functions.h b/src/app/util/ember-compatibility-functions.h index a0888ac7f90498..1a81e543967482 100644 --- a/src/app/util/ember-compatibility-functions.h +++ b/src/app/util/ember-compatibility-functions.h @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 716460026591ee..cc1e19230dc33e 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -267,11 +267,6 @@ DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPath & a namespace chip { namespace app { -AttributeAccessInterface * GetAttributeAccessOverride(EndpointId aEndpointId, ClusterId aClusterId) -{ - return nullptr; -} - EndpointId EnabledEndpointsWithServerCluster::operator*() const { return emberAfEndpointFromIndex(mEndpointIndex); diff --git a/src/controller/tests/TestEventChunking.cpp b/src/controller/tests/TestEventChunking.cpp index 74bee0f9aab0e4..0555e3ef94560b 100644 --- a/src/controller/tests/TestEventChunking.cpp +++ b/src/controller/tests/TestEventChunking.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/controller/tests/TestReadChunking.cpp b/src/controller/tests/TestReadChunking.cpp index 1a1f9c77d1af57..1095e0f26ebf61 100644 --- a/src/controller/tests/TestReadChunking.cpp +++ b/src/controller/tests/TestReadChunking.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/controller/tests/TestWriteChunking.cpp b/src/controller/tests/TestWriteChunking.cpp index d0555b8d2440af..2190195887ad41 100644 --- a/src/controller/tests/TestWriteChunking.cpp +++ b/src/controller/tests/TestWriteChunking.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm index 7439c0ff6a453a..0716b5f013898e 100644 --- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm +++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerCluster.mm @@ -35,7 +35,8 @@ #include #include -// TODO: These attribute-*.h bits are a hack that should eventually go away. +// TODO: These attribute-*.h and AttributeAccessInterfaceRegistry.h bits are a hack that should eventually go away. +#include #include #include diff --git a/src/include/platform/ConnectivityManager.h b/src/include/platform/ConnectivityManager.h index 30002484c33a3d..90bab2a5ba5e76 100644 --- a/src/include/platform/ConnectivityManager.h +++ b/src/include/platform/ConnectivityManager.h @@ -24,7 +24,6 @@ #pragma once #include -#include #include #include #include diff --git a/src/include/platform/ThreadStackManager.h b/src/include/platform/ThreadStackManager.h index 540fb773e57c2c..a28aea640ba46e 100644 --- a/src/include/platform/ThreadStackManager.h +++ b/src/include/platform/ThreadStackManager.h @@ -25,7 +25,6 @@ #include -#include #include #include #include diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h b/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h index 865feb9b55845b..b8901cda078f50 100755 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_NoThread.h @@ -24,7 +24,6 @@ #pragma once #include -#include namespace chip { namespace DeviceLayer { diff --git a/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h b/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h index f20412fda3aa3e..cf9a4a490d0f26 100755 --- a/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h +++ b/src/include/platform/internal/GenericConnectivityManagerImpl_Thread.h @@ -24,7 +24,6 @@ #pragma once -#include #include #include #include diff --git a/src/platform/ASR/ConnectivityManagerImpl.cpp b/src/platform/ASR/ConnectivityManagerImpl.cpp index fb023b7b3c3a0b..2a8734ec0010e2 100644 --- a/src/platform/ASR/ConnectivityManagerImpl.cpp +++ b/src/platform/ASR/ConnectivityManagerImpl.cpp @@ -52,7 +52,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; #ifdef __cplusplus extern "C" { #endif diff --git a/src/platform/Ameba/ConnectivityManagerImpl.cpp b/src/platform/Ameba/ConnectivityManagerImpl.cpp index c72113db12bebd..6324989bbf4d68 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.cpp +++ b/src/platform/Ameba/ConnectivityManagerImpl.cpp @@ -55,7 +55,6 @@ using namespace ::chip; using namespace ::chip::Inet; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/Beken/ConnectivityManagerImpl.cpp b/src/platform/Beken/ConnectivityManagerImpl.cpp index 3065b1fec3f99d..6adb1f8dae593c 100644 --- a/src/platform/Beken/ConnectivityManagerImpl.cpp +++ b/src/platform/Beken/ConnectivityManagerImpl.cpp @@ -55,7 +55,6 @@ using namespace ::chip; using namespace ::chip::Inet; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/Darwin/ConnectivityManagerImpl.cpp b/src/platform/Darwin/ConnectivityManagerImpl.cpp index e0a7711e18bbfb..a6518138bfc5e9 100644 --- a/src/platform/Darwin/ConnectivityManagerImpl.cpp +++ b/src/platform/Darwin/ConnectivityManagerImpl.cpp @@ -21,8 +21,6 @@ #include #include -#include - #include #include #include @@ -51,7 +49,6 @@ #endif // TARGET_OS_OSX using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/ESP32/BLEManagerImpl.h b/src/platform/ESP32/BLEManagerImpl.h index 5cb1421750786a..fc946c9aae3359 100644 --- a/src/platform/ESP32/BLEManagerImpl.h +++ b/src/platform/ESP32/BLEManagerImpl.h @@ -30,6 +30,8 @@ #include "sdkconfig.h" +#include + #if CONFIG_BT_BLUEDROID_ENABLED #include "esp_bt.h" diff --git a/src/platform/ESP32/ConnectivityManagerImpl.cpp b/src/platform/ESP32/ConnectivityManagerImpl.cpp index 783ef4b99678be..85146257ebe985 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl.cpp @@ -47,7 +47,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::app::Clusters::GeneralDiagnostics; namespace chip { diff --git a/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp b/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp index b36c4b8cb273d2..eacf3c41526e5e 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_Ethernet.cpp @@ -43,7 +43,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using chip::DeviceLayer::Internal::ESP32Utils; namespace chip { namespace DeviceLayer { diff --git a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp index 5fefcb5490f059..3810862a0f57b6 100644 --- a/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp +++ b/src/platform/ESP32/ConnectivityManagerImpl_WiFi.cpp @@ -46,7 +46,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using chip::DeviceLayer::Internal::ESP32Utils; namespace chip { diff --git a/src/platform/ESP32/KeyValueStoreManagerImpl.cpp b/src/platform/ESP32/KeyValueStoreManagerImpl.cpp index 5cd113e3e65c63..6617bb2cb11bf0 100644 --- a/src/platform/ESP32/KeyValueStoreManagerImpl.cpp +++ b/src/platform/ESP32/KeyValueStoreManagerImpl.cpp @@ -24,12 +24,12 @@ #include #include -#include #include #include "nvs.h" #include "nvs_flash.h" #include +#include #include #include diff --git a/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp index 9ac41f5d211cbb..b78f6fe757286b 100644 --- a/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp +++ b/src/platform/Infineon/PSOC6/ConnectivityManagerImpl.cpp @@ -55,7 +55,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; namespace chip { namespace DeviceLayer { diff --git a/src/platform/Linux/ConnectivityManagerImpl.cpp b/src/platform/Linux/ConnectivityManagerImpl.cpp index 7e7d2a1786b29e..f7edd474e2d7ea 100644 --- a/src/platform/Linux/ConnectivityManagerImpl.cpp +++ b/src/platform/Linux/ConnectivityManagerImpl.cpp @@ -67,7 +67,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Internal; diff --git a/src/platform/Linux/ThreadStackManagerImpl.cpp b/src/platform/Linux/ThreadStackManagerImpl.cpp index 846b2db4867154..40bd31ecaeee44 100644 --- a/src/platform/Linux/ThreadStackManagerImpl.cpp +++ b/src/platform/Linux/ThreadStackManagerImpl.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/platform/Linux/ThreadStackManagerImpl.h b/src/platform/Linux/ThreadStackManagerImpl.h index 374108dad176d1..e9c1a825d35a91 100755 --- a/src/platform/Linux/ThreadStackManagerImpl.h +++ b/src/platform/Linux/ThreadStackManagerImpl.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include diff --git a/src/platform/Tizen/ConnectivityManagerImpl.h b/src/platform/Tizen/ConnectivityManagerImpl.h index a22eb71eb7deb2..4d982acac2bf97 100644 --- a/src/platform/Tizen/ConnectivityManagerImpl.h +++ b/src/platform/Tizen/ConnectivityManagerImpl.h @@ -28,6 +28,8 @@ #include #include +#include + #include "platform/internal/GenericConnectivityManagerImpl.h" #include "platform/internal/GenericConnectivityManagerImpl_UDP.h" #if INET_CONFIG_ENABLE_TCP_ENDPOINT diff --git a/src/platform/Tizen/DiagnosticDataProviderImpl.h b/src/platform/Tizen/DiagnosticDataProviderImpl.h index 80dd3ae7b09a2e..c234e23bc885c7 100644 --- a/src/platform/Tizen/DiagnosticDataProviderImpl.h +++ b/src/platform/Tizen/DiagnosticDataProviderImpl.h @@ -24,6 +24,8 @@ #include +#include + namespace chip { namespace DeviceLayer { diff --git a/src/platform/Tizen/ThreadStackManagerImpl.cpp b/src/platform/Tizen/ThreadStackManagerImpl.cpp index f92676b4d44114..950b6ec300292c 100644 --- a/src/platform/Tizen/ThreadStackManagerImpl.cpp +++ b/src/platform/Tizen/ThreadStackManagerImpl.cpp @@ -39,7 +39,6 @@ #include #include -#include #include #include #include diff --git a/src/platform/Tizen/ThreadStackManagerImpl.h b/src/platform/Tizen/ThreadStackManagerImpl.h index e4b256cfc42d2f..3c0206cfd525fe 100644 --- a/src/platform/Tizen/ThreadStackManagerImpl.h +++ b/src/platform/Tizen/ThreadStackManagerImpl.h @@ -28,7 +28,6 @@ #include -#include #include #include #include diff --git a/src/platform/Zephyr/ConnectivityManagerImpl.cpp b/src/platform/Zephyr/ConnectivityManagerImpl.cpp index c5029f37a67862..17cdf46370f2d2 100644 --- a/src/platform/Zephyr/ConnectivityManagerImpl.cpp +++ b/src/platform/Zephyr/ConnectivityManagerImpl.cpp @@ -38,7 +38,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp b/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp index 3fefcf709e1b9b..5bef79bb22fdc5 100644 --- a/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp +++ b/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp @@ -29,7 +29,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; namespace chip { namespace DeviceLayer { diff --git a/src/platform/android/ConnectivityManagerImpl.cpp b/src/platform/android/ConnectivityManagerImpl.cpp index 390cb5ebb751f9..81fc070880ef33 100644 --- a/src/platform/android/ConnectivityManagerImpl.cpp +++ b/src/platform/android/ConnectivityManagerImpl.cpp @@ -46,7 +46,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/bouffalolab/common/BLEManagerImpl.h b/src/platform/bouffalolab/common/BLEManagerImpl.h index d5d571ef7949cd..a0c69fe242372b 100644 --- a/src/platform/bouffalolab/common/BLEManagerImpl.h +++ b/src/platform/bouffalolab/common/BLEManagerImpl.h @@ -14,11 +14,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - #pragma once +#include + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include + #include #include #include diff --git a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp index 5679674bc973fb..c6babf25e5f74c 100644 --- a/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp +++ b/src/platform/bouffalolab/common/ConnectivityManagerImpl.cpp @@ -53,7 +53,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/cc13xx_26xx/ConnectivityManagerImpl.cpp b/src/platform/cc13xx_26xx/ConnectivityManagerImpl.cpp index 186f7d82cf590b..c8b3b35d26c42f 100644 --- a/src/platform/cc13xx_26xx/ConnectivityManagerImpl.cpp +++ b/src/platform/cc13xx_26xx/ConnectivityManagerImpl.cpp @@ -49,7 +49,6 @@ #include using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/cc32xx/ConnectivityManagerImpl.cpp b/src/platform/cc32xx/ConnectivityManagerImpl.cpp index c42bfb426a55e0..fe629c4f880ae8 100644 --- a/src/platform/cc32xx/ConnectivityManagerImpl.cpp +++ b/src/platform/cc32xx/ConnectivityManagerImpl.cpp @@ -62,7 +62,6 @@ extern void SlNetConnEventHandler(uint32_t ifID, SlNetConnStatus_e netStatus, vo using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; extern "C" void cc32xxLog(const char * aFormat, ...); static struct netif * m_pNetIf = NULL; diff --git a/src/platform/mbed/BLEManagerImpl.h b/src/platform/mbed/BLEManagerImpl.h index e642b1276493f0..6dfb1d56e2097b 100644 --- a/src/platform/mbed/BLEManagerImpl.h +++ b/src/platform/mbed/BLEManagerImpl.h @@ -23,8 +23,12 @@ #pragma once +#include + #if CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE +#include + namespace chip { namespace DeviceLayer { namespace Internal { diff --git a/src/platform/mt793x/ConnectivityManagerImpl.cpp b/src/platform/mt793x/ConnectivityManagerImpl.cpp index e656a98e0e60bd..c3353c858f585f 100644 --- a/src/platform/mt793x/ConnectivityManagerImpl.cpp +++ b/src/platform/mt793x/ConnectivityManagerImpl.cpp @@ -49,7 +49,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp b/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp index 5e2aa54ac8b809..991223b58ea966 100644 --- a/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp +++ b/src/platform/mt793x/ConnectivityManagerImpl_WIFI.cpp @@ -41,7 +41,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp index b3bdede0f2f852..92b3532dae56f3 100644 --- a/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp +++ b/src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp @@ -29,7 +29,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; namespace chip { namespace DeviceLayer { diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.cpp b/src/platform/nxp/common/ConnectivityManagerImpl.cpp index 2d514dd9f12d81..2753451c5308ff 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/common/ConnectivityManagerImpl.cpp @@ -67,7 +67,6 @@ extern "C" { using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::DeviceLayer::DeviceEventType; diff --git a/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp index 3182a874fbf41c..31489178875259 100644 --- a/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/ConnectivityManagerImpl.cpp @@ -48,7 +48,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/nxp/k32w/k32w1/ConnectivityManagerImpl.cpp b/src/platform/nxp/k32w/k32w1/ConnectivityManagerImpl.cpp index 3182a874fbf41c..31489178875259 100644 --- a/src/platform/nxp/k32w/k32w1/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/k32w/k32w1/ConnectivityManagerImpl.cpp @@ -48,7 +48,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp b/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp index 93f1b18ab7c18c..5520eaa5c03a81 100644 --- a/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/mw320/ConnectivityManagerImpl.cpp @@ -57,7 +57,6 @@ static struct wlan_network sta_network; using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::app::Clusters::GeneralDiagnostics; using namespace ::chip::app::Clusters::WiFiNetworkDiagnostics; diff --git a/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp b/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp index 888e5748ad6b10..f927df2ac17480 100644 --- a/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp @@ -38,7 +38,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/qpg/ConnectivityManagerImpl.cpp b/src/platform/qpg/ConnectivityManagerImpl.cpp index 0a3f507a999532..50601c29721809 100644 --- a/src/platform/qpg/ConnectivityManagerImpl.cpp +++ b/src/platform/qpg/ConnectivityManagerImpl.cpp @@ -37,7 +37,6 @@ #include using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp b/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp index 214b0974668fbb..1eb7b01bfc83c9 100644 --- a/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp +++ b/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp @@ -45,7 +45,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/silabs/efr32/ConnectivityManagerImpl.cpp b/src/platform/silabs/efr32/ConnectivityManagerImpl.cpp index c38a5e5bb1e268..e5d3b319389a4e 100644 --- a/src/platform/silabs/efr32/ConnectivityManagerImpl.cpp +++ b/src/platform/silabs/efr32/ConnectivityManagerImpl.cpp @@ -40,7 +40,6 @@ using namespace ::chip; using namespace ::chip::Inet; using namespace ::chip::System; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/stm32/ConnectivityManagerImpl.cpp b/src/platform/stm32/ConnectivityManagerImpl.cpp index 0a3f507a999532..50601c29721809 100644 --- a/src/platform/stm32/ConnectivityManagerImpl.cpp +++ b/src/platform/stm32/ConnectivityManagerImpl.cpp @@ -37,7 +37,6 @@ #include using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/telink/ConnectivityManagerImpl.cpp b/src/platform/telink/ConnectivityManagerImpl.cpp index 130a5634f5d2d1..601bac3f22fe71 100644 --- a/src/platform/telink/ConnectivityManagerImpl.cpp +++ b/src/platform/telink/ConnectivityManagerImpl.cpp @@ -38,7 +38,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer::Internal; namespace chip { diff --git a/src/platform/webos/ConnectivityManagerImpl.cpp b/src/platform/webos/ConnectivityManagerImpl.cpp index e78e5aba192e68..e8640e11b1c747 100644 --- a/src/platform/webos/ConnectivityManagerImpl.cpp +++ b/src/platform/webos/ConnectivityManagerImpl.cpp @@ -65,7 +65,6 @@ #endif using namespace ::chip; -using namespace ::chip::TLV; using namespace ::chip::DeviceLayer; using namespace ::chip::DeviceLayer::Internal; using namespace ::chip::app::Clusters::GeneralDiagnostics; diff --git a/src/platform/webos/ThreadStackManagerImpl.cpp b/src/platform/webos/ThreadStackManagerImpl.cpp index fdb49ce2d5558d..cb538fa34ec618 100644 --- a/src/platform/webos/ThreadStackManagerImpl.cpp +++ b/src/platform/webos/ThreadStackManagerImpl.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/src/platform/webos/ThreadStackManagerImpl.h b/src/platform/webos/ThreadStackManagerImpl.h index 59b1a8e9646249..b102e16ab568f7 100644 --- a/src/platform/webos/ThreadStackManagerImpl.h +++ b/src/platform/webos/ThreadStackManagerImpl.h @@ -20,7 +20,6 @@ #include #include -#include #include #include #include