move `att-storage.h` to src/app/util and make it known to GN (#32435)
* Move att-storage to be placed in util
* Restyle
* remove att storage from gn linter
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 4acbfb3..dd00719 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -92,7 +92,6 @@
--known-failure controller/ExamplePersistentStorage.h \
--known-failure app/AttributeAccessInterface.h \
--known-failure app/AttributeAccessToken.h \
- --known-failure app/att-storage.h \
--known-failure app/CommandHandler.h \
--known-failure app/CommandHandlerInterface.h \
--known-failure app/CommandSenderLegacyCallback.h \
diff --git a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp
index 8be44e5..41a53d4 100644
--- a/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp
+++ b/examples/air-quality-sensor-app/linux/AirQualitySensorAppAttrUpdateDelegate.cpp
@@ -19,11 +19,11 @@
#include "AirQualitySensorAppAttrUpdateDelegate.h"
#include <app-common/zap-generated/attributes/Accessors.h>
-#include <app/att-storage.h>
#include <app/clusters/general-diagnostics-server/general-diagnostics-server.h>
#include <app/clusters/software-diagnostics-server/software-diagnostics-server.h>
#include <app/clusters/switch-server/switch-server.h>
#include <app/server/Server.h>
+#include <app/util/att-storage.h>
#include <platform/PlatformManager.h>
#include <air-quality-sensor-manager.h>
diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp
index b2fe3a9..d1bab36 100644
--- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp
+++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp
@@ -19,12 +19,12 @@
#include "AllClustersCommandDelegate.h"
#include <app-common/zap-generated/attributes/Accessors.h>
-#include <app/att-storage.h>
#include <app/clusters/general-diagnostics-server/general-diagnostics-server.h>
#include <app/clusters/smoke-co-alarm-server/smoke-co-alarm-server.h>
#include <app/clusters/software-diagnostics-server/software-diagnostics-server.h>
#include <app/clusters/switch-server/switch-server.h>
#include <app/server/Server.h>
+#include <app/util/att-storage.h>
#include <platform/PlatformManager.h>
#include <air-quality-instance.h>
diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp
index 775f4a1..8760bcb 100644
--- a/examples/all-clusters-app/linux/main-common.cpp
+++ b/examples/all-clusters-app/linux/main-common.cpp
@@ -40,7 +40,6 @@
#include <Options.h>
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app/CommandHandler.h>
-#include <app/att-storage.h>
#include <app/clusters/diagnostic-logs-server/diagnostic-logs-server.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/clusters/laundry-dryer-controls-server/laundry-dryer-controls-server.h>
@@ -50,6 +49,7 @@
#include <app/clusters/valve-configuration-and-control-server/valve-configuration-and-control-server.h>
#include <app/server/Server.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <lib/support/CHIPMem.h>
#include <new>
diff --git a/examples/all-clusters-minimal-app/linux/main-common.cpp b/examples/all-clusters-minimal-app/linux/main-common.cpp
index a6fd0a9..d9f0a51 100644
--- a/examples/all-clusters-minimal-app/linux/main-common.cpp
+++ b/examples/all-clusters-minimal-app/linux/main-common.cpp
@@ -19,10 +19,10 @@
#include "include/tv-callbacks.h"
#include <app-common/zap-generated/attributes/Accessors.h>
#include <app/CommandHandler.h>
-#include <app/att-storage.h>
#include <app/clusters/identify-server/identify-server.h>
#include <app/server/Server.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <lib/support/CHIPMem.h>
#include <new>
#include <platform/PlatformManager.h>
diff --git a/examples/chef/esp32/main/main.cpp b/examples/chef/esp32/main/main.cpp
index 9a4ade7..3744cac 100644
--- a/examples/chef/esp32/main/main.cpp
+++ b/examples/chef/esp32/main/main.cpp
@@ -40,9 +40,9 @@
#include <app-common/zap-generated/callback.h>
#include <app-common/zap-generated/cluster-objects.h>
-#include <app/att-storage.h>
#include <app/server/Dnssd.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <setup_payload/QRCodeSetupPayloadGenerator.h>
#include "Display.h"
diff --git a/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp
index 3af2ffa..3d750b9 100644
--- a/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp
+++ b/examples/lighting-app/infineon/cyw30739/src/LightingManager.cpp
@@ -19,8 +19,8 @@
#include "LightingManager.h"
#include <app-common/zap-generated/attributes/Accessors.h>
-#include <app/att-storage.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <stdio.h>
using namespace chip;
diff --git a/examples/lighting-app/linux/LightingAppCommandDelegate.cpp b/examples/lighting-app/linux/LightingAppCommandDelegate.cpp
index e6ac7b3..6194693 100644
--- a/examples/lighting-app/linux/LightingAppCommandDelegate.cpp
+++ b/examples/lighting-app/linux/LightingAppCommandDelegate.cpp
@@ -19,11 +19,11 @@
#include "LightingAppCommandDelegate.h"
#include <app-common/zap-generated/attributes/Accessors.h>
-#include <app/att-storage.h>
#include <app/clusters/general-diagnostics-server/general-diagnostics-server.h>
#include <app/clusters/software-diagnostics-server/software-diagnostics-server.h>
#include <app/clusters/switch-server/switch-server.h>
#include <app/server/Server.h>
+#include <app/util/att-storage.h>
#include <platform/PlatformManager.h>
using namespace chip;
diff --git a/src/app/AttributePathExpandIterator.cpp b/src/app/AttributePathExpandIterator.cpp
index 784499a..00a6955 100644
--- a/src/app/AttributePathExpandIterator.cpp
+++ b/src/app/AttributePathExpandIterator.cpp
@@ -22,7 +22,7 @@
#include <app/ConcreteAttributePath.h>
#include <app/EventManagement.h>
#include <app/GlobalAttributes.h>
-#include <app/att-storage.h>
+#include <app/util/att-storage.h>
#include <lib/core/CHIPCore.h>
#include <lib/core/TLVDebug.h>
#include <lib/support/CodeUtils.h>
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 5e90824..cba03ef 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
@@ -20,9 +20,9 @@
#include <app/AttributeAccessInterface.h>
#include <app/CommandHandler.h>
#include <app/MessageDef/StatusIB.h>
-#include <app/att-storage.h>
#include <app/server/Server.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <credentials/GroupDataProvider.h>
#include <lib/support/CodeUtils.h>
diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp
index 91c47c0..6434edf 100644
--- a/src/app/clusters/groups-server/groups-server.cpp
+++ b/src/app/clusters/groups-server/groups-server.cpp
@@ -21,9 +21,9 @@
#include <app-common/zap-generated/cluster-objects.h>
#include <app-common/zap-generated/ids/Clusters.h>
#include <app/CommandHandler.h>
-#include <app/att-storage.h>
#include <app/reporting/reporting.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <app/util/config.h>
#include <credentials/GroupDataProvider.h>
#include <inttypes.h>
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 f8d9947..105d198 100644
--- a/src/app/clusters/mode-select-server/mode-select-server.cpp
+++ b/src/app/clusters/mode-select-server/mode-select-server.cpp
@@ -22,9 +22,9 @@
#include <app/AttributeAccessInterface.h>
#include <app/CommandHandler.h>
#include <app/ConcreteCommandPath.h>
-#include <app/att-storage.h>
#include <app/clusters/mode-select-server/supported-modes-manager.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <app/util/config.h>
#include <app/util/odd-sized-integers.h>
diff --git a/src/app/dynamic_server/DynamicDispatcher.cpp b/src/app/dynamic_server/DynamicDispatcher.cpp
index 16edebd..ca396c1 100644
--- a/src/app/dynamic_server/DynamicDispatcher.cpp
+++ b/src/app/dynamic_server/DynamicDispatcher.cpp
@@ -30,8 +30,8 @@
#include <app/MessageDef/AttributeReportIBs.h>
#include <app/MessageDef/StatusIB.h>
#include <app/WriteHandler.h>
-#include <app/att-storage.h>
#include <app/data-model/Decode.h>
+#include <app/util/att-storage.h>
#include <app/util/endpoint-config-api.h>
#include <lib/core/CHIPError.h>
#include <lib/core/DataModelTypes.h>
diff --git a/src/app/util/BUILD.gn b/src/app/util/BUILD.gn
index 7e4488b..b1ebd36 100644
--- a/src/app/util/BUILD.gn
+++ b/src/app/util/BUILD.gn
@@ -17,6 +17,7 @@
source_set("types") {
sources = [
+ "att-storage.h",
"attribute-metadata.cpp",
"attribute-metadata.h",
"basic-types.h",
diff --git a/src/app/att-storage.h b/src/app/util/att-storage.h
similarity index 100%
rename from src/app/att-storage.h
rename to src/app/util/att-storage.h
diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h
index 7a1ab30..4365366 100644
--- a/src/app/util/attribute-storage.h
+++ b/src/app/util/attribute-storage.h
@@ -25,7 +25,7 @@
#include <app/util/endpoint-config-api.h>
#include <lib/support/CodeUtils.h>
-#include <app/att-storage.h>
+#include <app/util/att-storage.h>
#include <zap-generated/endpoint_config.h>
#include <protocols/interaction_model/StatusCode.h>
diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp
index d35be58..f8c8cca 100644
--- a/src/app/util/ember-compatibility-functions.cpp
+++ b/src/app/util/ember-compatibility-functions.cpp
@@ -28,10 +28,10 @@
#include <app/GlobalAttributes.h>
#include <app/InteractionModelEngine.h>
#include <app/RequiredPrivilege.h>
-#include <app/att-storage.h>
#include <app/reporting/Engine.h>
#include <app/reporting/reporting.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <app/util/attribute-storage-null-handling.h>
#include <app/util/attribute-storage.h>
#include <app/util/attribute-table.h>
diff --git a/src/app/util/mock/MockNodeConfig.cpp b/src/app/util/mock/MockNodeConfig.cpp
index b640be4..3b9fa24 100644
--- a/src/app/util/mock/MockNodeConfig.cpp
+++ b/src/app/util/mock/MockNodeConfig.cpp
@@ -18,8 +18,8 @@
#include <app/util/mock/MockNodeConfig.h>
-#include <app/att-storage.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <lib/support/CodeUtils.h>
#include <utility>
diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp
index ab3bff2..cf36ddc 100644
--- a/src/app/util/mock/attribute-storage.cpp
+++ b/src/app/util/mock/attribute-storage.cpp
@@ -33,8 +33,8 @@
#include <app/MessageDef/AttributeDataIB.h>
#include <app/MessageDef/AttributeReportIB.h>
#include <app/MessageDef/AttributeStatusIB.h>
-#include <app/att-storage.h>
#include <app/util/af.h>
+#include <app/util/att-storage.h>
#include <app/util/mock/Constants.h>
#include <app/util/mock/MockNodeConfig.h>
diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRIMDispatch.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRIMDispatch.mm
index ce84774..1e2b7dc 100644
--- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRIMDispatch.mm
+++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRIMDispatch.mm
@@ -18,7 +18,7 @@
#include <app-common/zap-generated/cluster-objects.h>
#include <app/CommandHandler.h>
#include <app/ConcreteCommandPath.h>
-#include <app/att-storage.h>
+#include <app/util/att-storage.h>
#include <app/util/af-types.h>
#include <app/util/privilege-storage.h>
diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm
index c755323..1d7b466 100644
--- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm
+++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRServerEndpoint.mm
@@ -30,8 +30,8 @@
// TODO: These af-types.h and att-storage.h and attribute-storage.h and
// endpoint-config-api.h and probably CodeUtils.h bits are a hack that should
// eventually go away.
-#include <app/att-storage.h>
#include <app/util/af-types.h>
+#include <app/util/att-storage.h>
#include <app/util/attribute-storage.h>
#include <app/util/endpoint-config-api.h>
#include <lib/support/CodeUtils.h>