Move isIdentifying out of util.cpp (#32407)
* Move emberAfIsDeficeIdentifying into the only used place for this.
This is to minimize dependencies on generated code.
* Restyle
diff --git a/src/app/clusters/groups-server/groups-server.cpp b/src/app/clusters/groups-server/groups-server.cpp
index 65bfbc1..91c47c0 100644
--- a/src/app/clusters/groups-server/groups-server.cpp
+++ b/src/app/clusters/groups-server/groups-server.cpp
@@ -40,6 +40,18 @@
using namespace chip::Credentials;
using Protocols::InteractionModel::Status;
+// Is the device identifying?
+static bool emberAfIsDeviceIdentifying(EndpointId endpoint)
+{
+#ifdef ZCL_USING_IDENTIFY_CLUSTER_SERVER
+ uint16_t identifyTime;
+ Status status = app::Clusters::Identify::Attributes::IdentifyTime::Get(endpoint, &identifyTime);
+ return (status == Status::Success && 0 < identifyTime);
+#else
+ return false;
+#endif
+}
+
/**
* @brief Checks if group-endpoint association exist for the given fabric
*/
diff --git a/src/app/util/af.h b/src/app/util/af.h
index 1d42872..78f7ada 100644
--- a/src/app/util/af.h
+++ b/src/app/util/af.h
@@ -196,21 +196,6 @@
/** @} END Attribute Storage */
-/** @name Device Control */
-// @{
-
-/**
- * @brief Function that checks if endpoint is identifying
- *
- * This function returns true if device at a given endpoint is
- * identifying.
- *
- * @param endpoint Zigbee endpoint number
- */
-bool emberAfIsDeviceIdentifying(chip::EndpointId endpoint);
-
-/** @} END Device Control */
-
/** @name Miscellaneous */
// @{
diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp
index aba9f3b..10084e6 100644
--- a/src/app/util/util.cpp
+++ b/src/app/util/util.cpp
@@ -32,26 +32,10 @@
// TODO: figure out a clear path for compile-time codegen
#include <app/PluginApplicationCallbacks.h>
-#ifdef MATTER_DM_PLUGIN_GROUPS_SERVER
-#include <app/clusters/groups-server/groups-server.h>
-#endif // MATTER_DM_PLUGIN_GROUPS_SERVER
-
using namespace chip;
using chip::Protocols::InteractionModel::Status;
-// Is the device identifying?
-bool emberAfIsDeviceIdentifying(EndpointId endpoint)
-{
-#ifdef ZCL_USING_IDENTIFY_CLUSTER_SERVER
- uint16_t identifyTime;
- Status status = app::Clusters::Identify::Attributes::IdentifyTime::Get(endpoint, &identifyTime);
- return (status == Status::Success && 0 < identifyTime);
-#else
- return false;
-#endif
-}
-
// Calculates difference. See EmberAfDifferenceType for the maximum data size
// that this function will support.
EmberAfDifferenceType emberAfGetDifference(uint8_t * pData, EmberAfDifferenceType value, uint8_t dataSize)