Skip to content

Commit

Permalink
Put the static-supported-modes-manager to common paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
du48s03 authored and dinglamazon committed Nov 8, 2021
1 parent 1e0a0df commit 22f68ac
Show file tree
Hide file tree
Showing 17 changed files with 14 additions and 588 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const StaticSupportedModesManager StaticSupportedModesManager::instance = Static
const SupportedModesManager::ModeOptionsProvider StaticSupportedModesManager::getModeOptionsProvider(EndpointId endpointId) const
{
for (auto & endpointSpanPair : supportedOptionsByEndpoints)
{
if (endpointSpanPair.mEndpointId == endpointId)
{
return ModeOptionsProvider(endpointSpanPair.mSpan.data(), endpointSpanPair.mSpan.end());
Expand Down
3 changes: 2 additions & 1 deletion examples/all-clusters-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ list(
${chip_dir}/zzz_generated/all-clusters-app/zap-generated/CHIPClusters.cpp

${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp
${chip_dir}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp

${chip_dir}/examples/all-clusters-app/ameba/main/chipinterface.cpp
${chip_dir}/examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp
${chip_dir}/examples/all-clusters-app/ameba/main/CHIPDeviceManager.cpp
${chip_dir}/examples/all-clusters-app/ameba/main/Globals.cpp
${chip_dir}/examples/all-clusters-app/ameba/main/LEDWidget.cpp
${chip_dir}/examples/all-clusters-app/ameba/main/static-supported-modes-manager.cpp
)

add_library(
Expand All @@ -64,6 +64,7 @@ target_include_directories(
${chip_dir}/zzz_generated/all-clusters-app/zap-generated
${chip_dir}/zzz_generated/app-common
${chip_dir}/examples/all-clusters-app/all-clusters-common
${chip_dir}/examples/all-clusters-app/all-clusters-common/include
${chip_dir}/examples/all-clusters-app/ameba/main/include
${chip_dir_output}/gen/include
${chip_dir}/src/include/
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# The list of src and include dirs must be in sync with that in all-clusters-app/esp32/main/component.mk
set(PRIV_INCLUDE_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/zzz_generated/all-clusters-app"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/all-clusters-app/all-clusters-common/include"
"${CMAKE_CURRENT_LIST_DIR}/include"
)
set(SRC_DIRS_LIST
Expand Down

This file was deleted.

This file was deleted.

6 changes: 4 additions & 2 deletions examples/all-clusters-app/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import("//build_overrides/build.gni")
import("//build_overrides/chip.gni")

static_library("static-supported-modes-manager") {
sources = [ "include/static-supported-modes-manager.cpp" ]
sources = [
"${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp",
]

#zap_pregenerated_dir = "${chip_root}/zzz_generated"

Expand All @@ -29,13 +31,13 @@ static_library("static-supported-modes-manager") {
]
include_dirs = [
"include",
"${chip_root}/examples/all-clusters-app/all-clusters-common/include",
"${chip_root}/src",
"${chip_root}/zzz_generated/all-clusters-app",
]

cflags = [ "-Wconversion" ]

print("include_dirs = ")
}

executable("chip-all-clusters-app") {
Expand Down

This file was deleted.

This file was deleted.

3 changes: 2 additions & 1 deletion examples/all-clusters-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ target_include_directories(${APP_TARGET} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/main/include/
${APP_ROOT}/all-clusters-common
${APP_ROOT}/all-clusters-common/include
${APP_CLUSTERS}
${MBED_COMMON}/util/include
${CHIP_ROOT}/src/app
Expand All @@ -50,7 +51,6 @@ target_sources(${APP_TARGET} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/main/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main/AppTask.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main/LowPowerManager.cpp
${CMAKE_CURRENT_SOURCE_DIR}/main/static-supported-modes-manager.cpp

${MBED_COMMON}/util/LEDWidget.cpp

Expand All @@ -69,6 +69,7 @@ target_sources(${APP_TARGET} PRIVATE
${CHIP_ROOT}/src/app/server/CommissioningWindowManager.cpp

${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp
${CHIP_ROOT}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp

${APP_UTIL}/DataModelHandler.cpp
${APP_UTIL}/af-event.cpp
Expand Down
Loading

0 comments on commit 22f68ac

Please sign in to comment.