Skip to content

Commit 5f955f4

Browse files
[ICD] Move ICD server sources to the server directory (#31674)
* Move ICD server files to server directory * update all the icd paths * update examples paths * restyle * cmake icd path * fix src/app path * update comment path * fix icd_config to icd_server_config rename * Fix ESP builds * restyle
1 parent 1b87b4a commit 5f955f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+94
-94
lines changed

examples/all-clusters-app/esp32/main/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ set(SRC_DIRS_LIST
3636
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/shell_extension"
3737
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/mode-support"
3838
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
39-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd"
39+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd/server"
4040
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
4141
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
4242
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"

examples/light-switch-app/esp32/main/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
3131
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
3232
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
3333
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
34-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd"
34+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd/server"
3535
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server"
3636
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"
3737
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information"

examples/lit-icd-app/linux/BUILD.gn

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ executable("lit-icd-app") {
2121
deps = [
2222
"${chip_root}/examples/lit-icd-app/lit-icd-common",
2323
"${chip_root}/examples/platform/linux:app-main",
24-
"${chip_root}/src/app/icd:manager",
24+
"${chip_root}/src/app/icd/server:manager",
2525
"${chip_root}/src/lib",
2626
"${chip_root}/third_party/jsoncpp",
2727
]

examples/lock-app/esp32/main/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ idf_component_register(INCLUDE_DIRS
5050
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
5151
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
5252
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
53-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd"
53+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd/server"
5454
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server"
5555
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"
5656
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information"
@@ -163,7 +163,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
163163
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
164164
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
165165
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
166-
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd"
166+
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/icd/server"
167167
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server"
168168
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"
169169
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic-information"

examples/platform/silabs/BaseApplication.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
#include "SilabsDeviceDataProvider.h"
3838
#if CHIP_CONFIG_ENABLE_ICD_SERVER == 1
39-
#include <app/icd/ICDNotifier.h> // nogncheck
39+
#include <app/icd/server/ICDNotifier.h> // nogncheck
4040
#endif
4141
#include <app/server/OnboardingCodesUtil.h>
4242
#include <app/util/attribute-storage.h>

src/app/BUILD.gn

+5-5
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,8 @@ static_library("interaction-model") {
254254
":message-def",
255255
":paths",
256256
":subscription-manager",
257-
"${chip_root}/src/app/icd:icd_config",
258-
"${chip_root}/src/app/icd:observer",
257+
"${chip_root}/src/app/icd/server:icd-server-config",
258+
"${chip_root}/src/app/icd/server:observer",
259259
"${chip_root}/src/lib/address_resolve",
260260
"${chip_root}/src/lib/support",
261261
"${chip_root}/src/protocols/interaction_model",
@@ -333,7 +333,7 @@ static_library("app") {
333333
":interaction-model",
334334
":pre-encoded-value",
335335
":revision_info",
336-
"${chip_root}/src/app/icd:icd_config",
336+
"${chip_root}/src/app/icd/server:icd-server-config",
337337
"${chip_root}/src/lib/address_resolve",
338338
"${chip_root}/src/lib/support",
339339
"${chip_root}/src/messaging",
@@ -353,8 +353,8 @@ static_library("app") {
353353

354354
if (chip_enable_icd_server) {
355355
public_deps += [
356-
"${chip_root}/src/app/icd:manager",
357-
"${chip_root}/src/app/icd:notifier",
356+
"${chip_root}/src/app/icd/server:manager",
357+
"${chip_root}/src/app/icd/server:notifier",
358358
]
359359
}
360360

src/app/FailSafeContext.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
* Provides the implementation of the FailSafeContext object.
2121
*/
2222
#include "FailSafeContext.h"
23-
#include <app/icd/ICDConfig.h>
23+
#include <app/icd/server/ICDServerConfig.h>
2424
#if CHIP_CONFIG_ENABLE_ICD_SERVER
25-
#include <app/icd/ICDNotifier.h> // nogncheck
25+
#include <app/icd/server/ICDNotifier.h> // nogncheck
2626
#endif
2727
#include <lib/support/SafeInt.h>
2828
#include <platform/CHIPDeviceConfig.h>

src/app/ReadHandler.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
#include <app/MessageDef/StatusResponseMessage.h>
2929
#include <app/MessageDef/SubscribeRequestMessage.h>
3030
#include <app/MessageDef/SubscribeResponseMessage.h>
31-
#include <app/icd/ICDConfig.h>
31+
#include <app/icd/server/ICDServerConfig.h>
3232
#include <lib/core/TLVUtilities.h>
3333
#include <messaging/ExchangeContext.h>
3434

3535
#include <app/ReadHandler.h>
3636
#include <app/reporting/Engine.h>
3737

3838
#if CHIP_CONFIG_ENABLE_ICD_SERVER
39-
#include <app/icd/ICDConfigurationData.h> //nogncheck
39+
#include <app/icd/server/ICDConfigurationData.h> //nogncheck
4040
#endif
4141

4242
namespace chip {

src/app/chip_data_model.cmake

+3-3
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,9 @@ function(chip_configure_data_model APP_TARGET)
139139
${CHIP_APP_BASE_DIR}/util/attribute-storage.cpp
140140
${CHIP_APP_BASE_DIR}/util/attribute-table.cpp
141141
${CHIP_APP_BASE_DIR}/util/binding-table.cpp
142-
${CHIP_APP_BASE_DIR}/icd/ICDMonitoringTable.cpp
143-
${CHIP_APP_BASE_DIR}/icd/ICDNotifier.cpp
144-
${CHIP_APP_BASE_DIR}/icd/ICDConfigurationData.cpp
142+
${CHIP_APP_BASE_DIR}/icd/server/ICDMonitoringTable.cpp
143+
${CHIP_APP_BASE_DIR}/icd/server/ICDNotifier.cpp
144+
${CHIP_APP_BASE_DIR}/icd/server/ICDConfigurationData.cpp
145145
${CHIP_APP_BASE_DIR}/util/DataModelHandler.cpp
146146
${CHIP_APP_BASE_DIR}/util/ember-compatibility-functions.cpp
147147
${CHIP_APP_BASE_DIR}/util/generic-callback-stubs.cpp

src/app/chip_data_model.gni

+4-4
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,10 @@ template("chip_data_model") {
300300
"${_app_root}/clusters/${cluster}/${cluster}.h",
301301
]
302302
deps += [
303-
"${chip_root}/src/app/icd:configuration-data",
304-
"${chip_root}/src/app/icd:icd_config",
305-
"${chip_root}/src/app/icd:monitoring-table",
306-
"${chip_root}/src/app/icd:notifier",
303+
"${chip_root}/src/app/icd/server:configuration-data",
304+
"${chip_root}/src/app/icd/server:icd-server-config",
305+
"${chip_root}/src/app/icd/server:monitoring-table",
306+
"${chip_root}/src/app/icd/server:notifier",
307307
]
308308
} else if (cluster == "resource-monitoring-server") {
309309
sources += [

src/app/clusters/icd-management-server/icd-management-server.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
#include <app-common/zap-generated/cluster-objects.h>
2424
#include <app-common/zap-generated/ids/Clusters.h>
2525
#include <app/AttributeAccessInterface.h>
26-
#include <app/icd/ICDMonitoringTable.h>
27-
#include <app/icd/ICDNotifier.h>
26+
#include <app/icd/server/ICDMonitoringTable.h>
27+
#include <app/icd/server/ICDNotifier.h>
2828
#include <app/server/Server.h>
2929
#include <app/util/af.h>
3030
#include <app/util/attribute-storage.h>

src/app/clusters/icd-management-server/icd-management-server.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include <app-common/zap-generated/cluster-objects.h>
2121
#include <app/CommandHandler.h>
2222
#include <app/ConcreteAttributePath.h>
23-
#include <app/icd/ICDConfigurationData.h>
24-
#include <app/icd/ICDMonitoringTable.h>
23+
#include <app/icd/server/ICDConfigurationData.h>
24+
#include <app/icd/server/ICDMonitoringTable.h>
2525
#include <app/util/basic-types.h>
2626
#include <crypto/SessionKeystore.h>
2727
#include <lib/core/CHIPPersistentStorageDelegate.h>

src/app/icd/BUILD.gn src/app/icd/server/BUILD.gn

+11-11
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414

1515
import("//build_overrides/chip.gni")
1616
import("${chip_root}/build/chip/buildconfig_header.gni")
17-
import("icd.gni")
17+
import("${chip_root}/src/app/icd/icd.gni")
1818

1919
# ICD Server sources and configurations
2020

21-
buildconfig_header("icd_buildconfig") {
22-
header = "ICDBuildConfig.h"
23-
header_dir = "app/icd"
21+
buildconfig_header("icd-server-buildconfig") {
22+
header = "ICDServerBuildConfig.h"
23+
header_dir = "app/icd/server"
2424

2525
defines = [
2626
"CHIP_CONFIG_ENABLE_ICD_SERVER=${chip_enable_icd_server}",
@@ -29,13 +29,13 @@ buildconfig_header("icd_buildconfig") {
2929
"ICD_ENFORCE_SIT_SLOW_POLL_LIMIT=${icd_enforce_sit_slow_poll_limit}",
3030
]
3131

32-
visibility = [ ":icd_config" ]
32+
visibility = [ ":icd-server-config" ]
3333
}
3434

35-
source_set("icd_config") {
36-
sources = [ "ICDConfig.h" ]
35+
source_set("icd-server-config") {
36+
sources = [ "ICDServerConfig.h" ]
3737

38-
deps = [ ":icd_buildconfig" ]
38+
deps = [ ":icd-server-buildconfig" ]
3939
}
4040

4141
source_set("observer") {
@@ -49,7 +49,7 @@ source_set("notifier") {
4949
]
5050

5151
deps = [
52-
":icd_config",
52+
":icd-server-config",
5353
"${chip_root}/src/lib/core",
5454
]
5555
}
@@ -62,7 +62,7 @@ source_set("manager") {
6262
"ICDManager.h",
6363
]
6464

65-
deps = [ ":icd_config" ]
65+
deps = [ ":icd-server-config" ]
6666

6767
public_deps = [
6868
":configuration-data",
@@ -112,7 +112,7 @@ source_set("configuration-data") {
112112
]
113113

114114
deps = [
115-
":icd_config",
115+
":icd-server-config",
116116
"${chip_root}/src/lib/core",
117117
"${chip_root}/src/lib/support",
118118
]

src/app/icd/ICDCheckInSender.cpp src/app/icd/server/ICDCheckInSender.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include <app/icd/ICDCheckInSender.h>
19-
#include <app/icd/ICDConfigurationData.h>
20-
#include <app/icd/ICDNotifier.h>
18+
#include <app/icd/server/ICDCheckInSender.h>
19+
#include <app/icd/server/ICDConfigurationData.h>
20+
#include <app/icd/server/ICDNotifier.h>
2121
#include <lib/dnssd/Resolver.h>
2222
#include <protocols/secure_channel/CheckinMessage.h>
2323
#include <system/SystemPacketBuffer.h>

src/app/icd/ICDCheckInSender.h src/app/icd/server/ICDCheckInSender.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
#pragma once
1818

19-
#include <app/icd/ICDMonitoringTable.h>
19+
#include <app/icd/server/ICDMonitoringTable.h>
2020
#include <credentials/FabricTable.h>
2121
#include <lib/address_resolve/AddressResolve.h>
2222

src/app/icd/ICDConfigurationData.cpp src/app/icd/server/ICDConfigurationData.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717

1818
#include "ICDConfigurationData.h"
19-
#include <app/icd/ICDConfig.h>
19+
#include <app/icd/server/ICDServerConfig.h>
2020
#include <lib/support/CodeUtils.h>
2121

2222
namespace chip {

src/app/icd/ICDConfigurationData.h src/app/icd/server/ICDConfigurationData.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class ICDConfigurationData
9292
// ICD related information is managed by the ICDManager but stored in the ICDConfigurationData to enable consummers to access it
9393
// without creating a circular dependency. To avoid allowing consummers changing the state of the ICD mode without going through
9494
// the ICDManager, the ICDManager is a friend that can access the private setters. If a consummer needs to be notified when a
95-
// value is changed, they can leverage the Observer events the ICDManager generates. See src/app/icd/ICDStateObserver.h
95+
// value is changed, they can leverage the Observer events the ICDManager generates. See src/app/icd/server/ICDStateObserver.h
9696
friend class chip::app::ICDManager;
9797
friend class chip::app::TestICDManager;
9898

src/app/icd/ICDManager.cpp src/app/icd/server/ICDManager.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
#include <app-common/zap-generated/attributes/Accessors.h>
1919
#include <app-common/zap-generated/ids/Attributes.h>
2020
#include <app-common/zap-generated/ids/Clusters.h>
21-
#include <app/icd/ICDConfig.h>
22-
#include <app/icd/ICDConfigurationData.h>
23-
#include <app/icd/ICDManager.h>
24-
#include <app/icd/ICDMonitoringTable.h>
21+
#include <app/icd/server/ICDConfigurationData.h>
22+
#include <app/icd/server/ICDManager.h>
23+
#include <app/icd/server/ICDMonitoringTable.h>
24+
#include <app/icd/server/ICDServerConfig.h>
2525
#include <lib/support/CodeUtils.h>
2626
#include <lib/support/logging/CHIPLogging.h>
2727
#include <platform/ConnectivityManager.h>

src/app/icd/ICDManager.h src/app/icd/server/ICDManager.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
#include <app-common/zap-generated/cluster-enums.h>
2020
#include <app/SubscriptionManager.h>
21-
#include <app/icd/ICDCheckInSender.h>
22-
#include <app/icd/ICDConfigurationData.h>
23-
#include <app/icd/ICDMonitoringTable.h>
24-
#include <app/icd/ICDNotifier.h>
25-
#include <app/icd/ICDStateObserver.h>
21+
#include <app/icd/server/ICDCheckInSender.h>
22+
#include <app/icd/server/ICDConfigurationData.h>
23+
#include <app/icd/server/ICDMonitoringTable.h>
24+
#include <app/icd/server/ICDNotifier.h>
25+
#include <app/icd/server/ICDStateObserver.h>
2626
#include <credentials/FabricTable.h>
2727
#include <lib/support/BitFlags.h>
2828
#include <platform/CHIPDeviceConfig.h>
File renamed without changes.
File renamed without changes.

src/app/icd/ICDNotifier.cpp src/app/icd/server/ICDNotifier.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include <app/icd/ICDNotifier.h>
18+
#include <app/icd/server/ICDNotifier.h>
1919
#include <cstdint>
2020
#include <cstring>
2121

src/app/icd/ICDNotifier.h src/app/icd/server/ICDNotifier.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
#pragma once
1818

19-
#include <app/icd/ICDConfig.h>
19+
#include <app/icd/server/ICDServerConfig.h>
2020
#include <lib/core/CHIPError.h>
2121
#include <lib/support/BitFlags.h>
2222

src/app/icd/ICDConfig.h src/app/icd/server/ICDServerConfig.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
#pragma once
1919

2020
#if CHIP_HAVE_CONFIG_H
21-
#include <app/icd/ICDBuildConfig.h>
21+
#include <app/icd/server/ICDServerBuildConfig.h>
2222
#endif
File renamed without changes.

src/app/reporting/Engine.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
*
2424
*/
2525

26-
#include <app/icd/ICDConfig.h>
26+
#include <app/icd/server/ICDServerConfig.h>
2727
#if CHIP_CONFIG_ENABLE_ICD_SERVER
28-
#include <app/icd/ICDNotifier.h> // nogncheck
28+
#include <app/icd/server/ICDNotifier.h> // nogncheck
2929
#endif
3030
#include <app/AppConfig.h>
3131
#include <app/InteractionModelEngine.h>

src/app/reporting/ReportScheduler.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#pragma once
2020

2121
#include <app/ReadHandler.h>
22-
#include <app/icd/ICDStateObserver.h>
22+
#include <app/icd/server/ICDStateObserver.h>
2323
#include <lib/core/CHIPError.h>
2424
#include <system/SystemClock.h>
2525

src/app/server/BUILD.gn

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ static_library("server") {
5151

5252
public_deps = [
5353
"${chip_root}/src/app",
54-
"${chip_root}/src/app/icd:icd_config",
55-
"${chip_root}/src/app/icd:observer",
54+
"${chip_root}/src/app/icd/server:icd-server-config",
55+
"${chip_root}/src/app/icd/server:observer",
5656
"${chip_root}/src/lib/address_resolve",
5757
"${chip_root}/src/lib/dnssd",
5858
"${chip_root}/src/messaging",
@@ -63,6 +63,6 @@ static_library("server") {
6363
]
6464

6565
if (chip_enable_icd_server) {
66-
public_deps += [ "${chip_root}/src/app/icd:notifier" ]
66+
public_deps += [ "${chip_root}/src/app/icd/server:notifier" ]
6767
}
6868
}

src/app/server/CommissioningWindowManager.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
* limitations under the License.
1616
*/
1717

18-
#include <app/icd/ICDConfig.h>
18+
#include <app/icd/server/ICDServerConfig.h>
1919
#include <app/server/CommissioningWindowManager.h>
2020
#if CHIP_CONFIG_ENABLE_ICD_SERVER
21-
#include <app/icd/ICDNotifier.h> // nogncheck
21+
#include <app/icd/server/ICDNotifier.h> // nogncheck
2222
#endif
2323
#include <app/reporting/reporting.h>
2424
#include <app/server/Dnssd.h>

src/app/server/Dnssd.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
#pragma once
1919

20-
#include <app/icd/ICDConfig.h>
20+
#include <app/icd/server/ICDServerConfig.h>
2121
#if CHIP_CONFIG_ENABLE_ICD_SERVER
22-
#include <app/icd/ICDManager.h> // nogncheck
22+
#include <app/icd/server/ICDManager.h> // nogncheck
2323
#endif
24-
#include <app/icd/ICDStateObserver.h>
24+
#include <app/icd/server/ICDStateObserver.h>
2525
#include <app/server/CommissioningModeProvider.h>
2626
#include <credentials/FabricTable.h>
2727
#include <lib/core/CHIPError.h>

0 commit comments

Comments
 (0)