From 34471026bc10a0f074a4dbd84847e9c28709d7f3 Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Tue, 8 Mar 2022 09:44:03 -0800 Subject: [PATCH] [OTA] Move OTARequestorDriver to clusters directory (#15949) --- config/mbed/CMakeLists.txt | 3 ++- examples/all-clusters-app/ameba/chip_main.cmake | 2 +- examples/all-clusters-app/ameba/main/chipinterface.cpp | 8 ++++---- examples/all-clusters-app/esp32/main/main.cpp | 2 +- examples/all-clusters-app/nrfconnect/CMakeLists.txt | 1 + .../all-clusters-app/nrfconnect/main/include/AppTask.h | 2 +- examples/lighting-app/ameba/chip_main.cmake | 1 + examples/lighting-app/ameba/main/chipinterface.cpp | 8 ++++---- examples/lighting-app/esp32/main/main.cpp | 2 +- examples/lighting-app/nrfconnect/CMakeLists.txt | 1 + examples/lighting-app/nrfconnect/main/AppTask.cpp | 2 +- examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp | 6 +++--- examples/lighting-app/telink/CMakeLists.txt | 1 + examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp | 2 +- examples/lock-app/nrfconnect/main/AppTask.cpp | 2 +- examples/ota-requestor-app/ameba/chip_main.cmake | 1 + .../ota-requestor-app/ameba/main/chipinterface.cpp | 8 ++++---- examples/ota-requestor-app/cyw30739/src/main.cpp | 2 +- examples/ota-requestor-app/efr32/src/AppTask.cpp | 8 ++++---- examples/ota-requestor-app/esp32/main/main.cpp | 2 +- examples/ota-requestor-app/linux/main.cpp | 10 +++++----- examples/ota-requestor-app/p6/src/AppTask.cpp | 8 ++++---- examples/platform/efr32/OTAConfig.h | 8 ++++---- .../platform/mbed/ota}/OTARequestorDriverImpl.cpp | 0 .../platform/mbed/ota}/OTARequestorDriverImpl.h | 4 ++-- examples/platform/qpg/ota/ota.cpp | 2 +- examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp | 2 +- examples/pump-app/nrfconnect/main/AppTask.cpp | 2 +- .../pump-controller-app/nrfconnect/main/AppTask.cpp | 2 +- src/app/chip_data_model.gni | 2 ++ .../ota-requestor}/ExtendedOTARequestorDriver.cpp | 4 ++-- .../ota-requestor}/ExtendedOTARequestorDriver.h | 3 ++- .../ota-requestor}/GenericOTARequestorDriver.cpp | 6 +++--- .../ota-requestor}/GenericOTARequestorDriver.h | 3 ++- src/app/clusters/ota-requestor/OTARequestor.h | 2 +- .../clusters/ota-requestor}/OTARequestorDriver.h | 0 src/platform/BUILD.gn | 9 --------- 37 files changed, 66 insertions(+), 65 deletions(-) rename {src/platform/mbed => examples/platform/mbed/ota}/OTARequestorDriverImpl.cpp (100%) rename {src/platform/mbed => examples/platform/mbed/ota}/OTARequestorDriverImpl.h (94%) rename src/{platform => app/clusters/ota-requestor}/ExtendedOTARequestorDriver.cpp (97%) rename src/{platform => app/clusters/ota-requestor}/ExtendedOTARequestorDriver.h (97%) rename src/{platform => app/clusters/ota-requestor}/GenericOTARequestorDriver.cpp (99%) rename src/{platform => app/clusters/ota-requestor}/GenericOTARequestorDriver.h (98%) rename src/{include/platform => app/clusters/ota-requestor}/OTARequestorDriver.h (100%) diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index 7b333d23a694d8..9272c948dfe6db 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -463,10 +463,11 @@ if (CONFIG_CHIP_OTA_REQUESTOR) ) target_sources(${APP_TARGET} PRIVATE + ${CHIP_ROOT}/examples/platform/mbed/ota/OTARequestorDriverImpl.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp ${CHIP_ROOT}/src/platform/mbed/OTAImageProcessorImpl.cpp - ${CHIP_ROOT}/src/platform/mbed/OTARequestorDriverImpl.cpp ) if (NOT ${APP_TARGET} MATCHES "shell") diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index 6e955282202e62..a854cb0503573f 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -118,6 +118,7 @@ list( #OTARequestor ${chip_dir}/src/app/clusters/ota-requestor/BDXDownloader.cpp ${chip_dir}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${chip_dir}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp ) endif (matter_enable_ota_requestor) @@ -264,4 +265,3 @@ add_custom_command( POST_BUILD COMMAND cp lib${chip_main}.a ${CMAKE_CURRENT_SOURCE_DIR}/lib/application ) - diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index b248e34df7770c..715f20280195c4 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -39,10 +39,10 @@ #include #if CONFIG_ENABLE_OTA_REQUESTOR -#include "app/clusters/ota-requestor/BDXDownloader.h" -#include "app/clusters/ota-requestor/OTARequestor.h" -#include "platform/Ameba/AmebaOTAImageProcessor.h" -#include "platform/GenericOTARequestorDriver.h" +#include +#include +#include +#include #endif #if CONFIG_ENABLE_PW_RPC diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index c18f4ed6e6a8df..020abc509e06b5 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -46,7 +47,6 @@ #include #include #include -#include #if CONFIG_HAVE_DISPLAY #include "DeviceWithDisplay.h" diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 26befe925387f2..913eb279c218c1 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -73,6 +73,7 @@ target_sources(app PRIVATE ${GEN_DIR}/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp) diff --git a/examples/all-clusters-app/nrfconnect/main/include/AppTask.h b/examples/all-clusters-app/nrfconnect/main/include/AppTask.h index 3f8b5b82e95422..a5a89f6e24718a 100644 --- a/examples/all-clusters-app/nrfconnect/main/include/AppTask.h +++ b/examples/all-clusters-app/nrfconnect/main/include/AppTask.h @@ -21,8 +21,8 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include -#include #include #endif diff --git a/examples/lighting-app/ameba/chip_main.cmake b/examples/lighting-app/ameba/chip_main.cmake index 6b71cd2bbd6e43..5f77187194252a 100755 --- a/examples/lighting-app/ameba/chip_main.cmake +++ b/examples/lighting-app/ameba/chip_main.cmake @@ -16,6 +16,7 @@ list( #OTARequestor ${chip_dir}/src/app/clusters/ota-requestor/BDXDownloader.cpp ${chip_dir}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${chip_dir}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp ) endif (matter_enable_ota_requestor) diff --git a/examples/lighting-app/ameba/main/chipinterface.cpp b/examples/lighting-app/ameba/main/chipinterface.cpp index fcf8ded9381f55..f882c659a98e1e 100644 --- a/examples/lighting-app/ameba/main/chipinterface.cpp +++ b/examples/lighting-app/ameba/main/chipinterface.cpp @@ -42,10 +42,10 @@ #include #if CONFIG_ENABLE_OTA_REQUESTOR -#include "app/clusters/ota-requestor/BDXDownloader.h" -#include "app/clusters/ota-requestor/OTARequestor.h" -#include "platform/Ameba/AmebaOTAImageProcessor.h" -#include "platform/GenericOTARequestorDriver.h" +#include +#include +#include +#include #endif using namespace ::chip; diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index f08024dd7b22ba..670a739d4c7ac0 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -28,6 +28,7 @@ #include "shell_extension/launch.h" #include #include +#include #include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include using namespace ::chip; using namespace ::chip::Credentials; diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index ffd231a5ddb850..dd55b415cfb741 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -94,6 +94,7 @@ target_sources(app PRIVATE ${NRFCONNECT_COMMON}/util/LEDWidget.cpp ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp) chip_configure_data_model(app diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index 5ac02d89ec08f9..f7e49ffd19552e 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -41,8 +41,8 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include -#include #include #endif diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp index dc6e355423567d..9f81e8d6ff2901 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -36,9 +36,9 @@ /* OTA related includes */ #include "OTAImageProcessorImpl.h" #include "OtaSupport.h" -#include "platform/GenericOTARequestorDriver.h" -#include "src/app/clusters/ota-requestor/BDXDownloader.h" -#include "src/app/clusters/ota-requestor/OTARequestor.h" +#include +#include +#include #include "Keyboard.h" #include "LED.h" diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index d30ce4bec977e1..ff95953c7d52ec 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -99,5 +99,6 @@ target_sources(app PRIVATE ${CHIP_ROOT}/src/app/clusters/ota-requestor/ota-requestor-server.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${CHIP_ROOT}/src/app/clusters/groups-server/groups-server.cpp ) diff --git a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp index 6e9ce8e4e4f8b4..33efe151742ac8 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -30,10 +30,10 @@ #include #include +#include #include #include #include -#include #include #include diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 85d1984131810e..a66a4051dda9a7 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -37,8 +37,8 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include -#include #include #endif diff --git a/examples/ota-requestor-app/ameba/chip_main.cmake b/examples/ota-requestor-app/ameba/chip_main.cmake index 23b93b329580d3..d167230c3f7b22 100644 --- a/examples/ota-requestor-app/ameba/chip_main.cmake +++ b/examples/ota-requestor-app/ameba/chip_main.cmake @@ -24,6 +24,7 @@ list( ${chip_dir}/src/app/clusters/ota-requestor/BDXDownloader.cpp ${chip_dir}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${chip_dir}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp ) diff --git a/examples/ota-requestor-app/ameba/main/chipinterface.cpp b/examples/ota-requestor-app/ameba/main/chipinterface.cpp index e0ec8f6d0f7c77..d87f326ae7005c 100644 --- a/examples/ota-requestor-app/ameba/main/chipinterface.cpp +++ b/examples/ota-requestor-app/ameba/main/chipinterface.cpp @@ -32,10 +32,10 @@ #include #include -#include "app/clusters/ota-requestor/BDXDownloader.h" -#include "app/clusters/ota-requestor/OTARequestor.h" -#include "platform/Ameba/AmebaOTAImageProcessor.h" -#include "platform/GenericOTARequestorDriver.h" +#include +#include +#include +#include void * __dso_handle = 0; diff --git a/examples/ota-requestor-app/cyw30739/src/main.cpp b/examples/ota-requestor-app/cyw30739/src/main.cpp index f3ec01f2680de3..508b9e8a6430e9 100644 --- a/examples/ota-requestor-app/cyw30739/src/main.cpp +++ b/examples/ota-requestor-app/cyw30739/src/main.cpp @@ -18,6 +18,7 @@ */ #include #include +#include #include #include #include @@ -26,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/examples/ota-requestor-app/efr32/src/AppTask.cpp b/examples/ota-requestor-app/efr32/src/AppTask.cpp index 4db969933f60a5..b06f742526eaf3 100644 --- a/examples/ota-requestor-app/efr32/src/AppTask.cpp +++ b/examples/ota-requestor-app/efr32/src/AppTask.cpp @@ -32,10 +32,10 @@ #include #include -#include "app/clusters/ota-requestor/BDXDownloader.h" -#include "app/clusters/ota-requestor/OTARequestor.h" -#include "platform/EFR32/OTAImageProcessorImpl.h" -#include "platform/GenericOTARequestorDriver.h" +#include +#include +#include +#include #include diff --git a/examples/ota-requestor-app/esp32/main/main.cpp b/examples/ota-requestor-app/esp32/main/main.cpp index 5f26f9e2476bea..c587ec4bf22c14 100644 --- a/examples/ota-requestor-app/esp32/main/main.cpp +++ b/examples/ota-requestor-app/esp32/main/main.cpp @@ -30,6 +30,7 @@ #include "nvs_flash.h" #include #include +#include #include #include #include @@ -40,7 +41,6 @@ #include #include "OTAImageProcessorImpl.h" -#include "platform/GenericOTARequestorDriver.h" using namespace ::chip; using namespace ::chip::System; diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index d049d152699f2d..25817e7b978e4c 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -17,11 +17,11 @@ */ #include "AppMain.h" -#include "app/clusters/ota-requestor/BDXDownloader.h" -#include "app/clusters/ota-requestor/DefaultOTARequestorUserConsentProvider.h" -#include "app/clusters/ota-requestor/OTARequestor.h" -#include "platform/ExtendedOTARequestorDriver.h" -#include "platform/Linux/OTAImageProcessorImpl.h" +#include +#include +#include +#include +#include using chip::BDXDownloader; using chip::ByteSpan; diff --git a/examples/ota-requestor-app/p6/src/AppTask.cpp b/examples/ota-requestor-app/p6/src/AppTask.cpp index ef45532e6af40d..537973c12593d2 100644 --- a/examples/ota-requestor-app/p6/src/AppTask.cpp +++ b/examples/ota-requestor-app/p6/src/AppTask.cpp @@ -23,15 +23,14 @@ #include "AppEvent.h" #include "ButtonHandler.h" #include "LEDWidget.h" -#include "app/clusters/ota-requestor/BDXDownloader.h" -#include "app/clusters/ota-requestor/OTARequestor.h" -#include "platform/GenericOTARequestorDriver.h" -#include "platform/P6/OTAImageProcessorImpl.h" #include "qrcodegen.h" #include #include #include #include +#include +#include +#include #include #include #include @@ -41,6 +40,7 @@ #include #include #include +#include #include #include diff --git a/examples/platform/efr32/OTAConfig.h b/examples/platform/efr32/OTAConfig.h index 41dd739b100eca..65932ec498100e 100644 --- a/examples/platform/efr32/OTAConfig.h +++ b/examples/platform/efr32/OTAConfig.h @@ -18,10 +18,10 @@ #pragma once -#include "app/clusters/ota-requestor/BDXDownloader.h" -#include "app/clusters/ota-requestor/OTARequestor.h" -#include "platform/EFR32/OTAImageProcessorImpl.h" -#include "platform/GenericOTARequestorDriver.h" +#include +#include +#include +#include class OTAConfig { diff --git a/src/platform/mbed/OTARequestorDriverImpl.cpp b/examples/platform/mbed/ota/OTARequestorDriverImpl.cpp similarity index 100% rename from src/platform/mbed/OTARequestorDriverImpl.cpp rename to examples/platform/mbed/ota/OTARequestorDriverImpl.cpp diff --git a/src/platform/mbed/OTARequestorDriverImpl.h b/examples/platform/mbed/ota/OTARequestorDriverImpl.h similarity index 94% rename from src/platform/mbed/OTARequestorDriverImpl.h rename to examples/platform/mbed/ota/OTARequestorDriverImpl.h index d54a6e9b177289..98cdc7579a0459 100644 --- a/src/platform/mbed/OTARequestorDriverImpl.h +++ b/examples/platform/mbed/ota/OTARequestorDriverImpl.h @@ -22,8 +22,8 @@ #pragma once -#include -#include +#include +#include #include #include #include diff --git a/examples/platform/qpg/ota/ota.cpp b/examples/platform/qpg/ota/ota.cpp index ec8464ff1486f5..eef6412ad22d6e 100644 --- a/examples/platform/qpg/ota/ota.cpp +++ b/examples/platform/qpg/ota/ota.cpp @@ -28,8 +28,8 @@ #include #include +#include #include -#include #include using namespace chip; diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp index 82e40f71a5d53b..cdcf5a4920cbe0 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -33,8 +33,8 @@ #if defined(CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR) #include +#include #include -#include #include #endif #include diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index dc9d6b739a654b..4ac4e27f810788 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -38,8 +38,8 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include -#include #include #endif diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index d46659748df911..1ebea80904674b 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -38,8 +38,8 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include -#include #include #endif diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index bf8d7206a98c9c..23ef447d0ee194 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -132,6 +132,8 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/BDXDownloader.cpp", "${_app_root}/clusters/${cluster}/BDXDownloader.h", "${_app_root}/clusters/${cluster}/DefaultOTARequestorUserConsentProvider.h", + "${_app_root}/clusters/${cluster}/ExtendedOTARequestorDriver.cpp", + "${_app_root}/clusters/${cluster}/GenericOTARequestorDriver.cpp", "${_app_root}/clusters/${cluster}/OTARequestor.cpp", ] } else if (cluster == "bindings") { diff --git a/src/platform/ExtendedOTARequestorDriver.cpp b/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp similarity index 97% rename from src/platform/ExtendedOTARequestorDriver.cpp rename to src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp index 2fc5301172a1c7..a3b152a992773a 100644 --- a/src/platform/ExtendedOTARequestorDriver.cpp +++ b/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp @@ -15,8 +15,8 @@ * limitations under the License. */ -#include -#include +#include "ExtendedOTARequestorDriver.h" +#include "OTARequestorInterface.h" namespace chip { namespace DeviceLayer { diff --git a/src/platform/ExtendedOTARequestorDriver.h b/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.h similarity index 97% rename from src/platform/ExtendedOTARequestorDriver.h rename to src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.h index c07ff2163f7bb0..f4ef1d9b37e173 100644 --- a/src/platform/ExtendedOTARequestorDriver.h +++ b/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.h @@ -16,9 +16,10 @@ */ #pragma once #include -#include #include +#include "GenericOTARequestorDriver.h" + namespace chip { namespace DeviceLayer { diff --git a/src/platform/GenericOTARequestorDriver.cpp b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp similarity index 99% rename from src/platform/GenericOTARequestorDriver.cpp rename to src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp index a1903df1ae792f..09015ff34b2a35 100644 --- a/src/platform/GenericOTARequestorDriver.cpp +++ b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp @@ -29,12 +29,12 @@ // - The provider location passed in AnnounceOTAProviders is used in a single query (possibly retried) and then discarded // - Explicitly triggering a query through TriggerImmediateQuery() cancels any in-progress update -#include "GenericOTARequestorDriver.h" - -#include #include #include +#include "GenericOTARequestorDriver.h" +#include "OTARequestorInterface.h" + namespace chip { namespace DeviceLayer { namespace { diff --git a/src/platform/GenericOTARequestorDriver.h b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h similarity index 98% rename from src/platform/GenericOTARequestorDriver.h rename to src/app/clusters/ota-requestor/GenericOTARequestorDriver.h index ef61e26a2c589e..3bae012e9074f5 100644 --- a/src/platform/GenericOTARequestorDriver.h +++ b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h @@ -17,10 +17,11 @@ #pragma once -#include #include #include +#include "OTARequestorDriver.h" + namespace chip { class OTARequestorInterface; diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index f61d1c8780c9db..5052f13f31c762 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -25,10 +25,10 @@ #include #include #include -#include #include #include "BDXDownloader.h" +#include "OTARequestorDriver.h" #include "OTARequestorInterface.h" namespace chip { diff --git a/src/include/platform/OTARequestorDriver.h b/src/app/clusters/ota-requestor/OTARequestorDriver.h similarity index 100% rename from src/include/platform/OTARequestorDriver.h rename to src/app/clusters/ota-requestor/OTARequestorDriver.h diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 001a2b0fb9dc7f..e9c9c21aace0b1 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -316,15 +316,6 @@ if (chip_device_platform != "none") { ] } - if (chip_enable_ota_requestor) { - sources += [ - "ExtendedOTARequestorDriver.cpp", - "ExtendedOTARequestorDriver.h", - "GenericOTARequestorDriver.cpp", - "GenericOTARequestorDriver.h", - ] - } - cflags = [ "-Wconversion" ] public_deps = [