Skip to content

Commit

Permalink
[Connectivity] Rename OTAHelper to OTAInitializer
Browse files Browse the repository at this point in the history
  • Loading branch information
pankore committed May 27, 2022
1 parent fccb11e commit 9f44742
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion examples/all-clusters-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ list(
${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp
${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp
${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp
${chip_dir}/examples/platform/ameba/ota/OTAHelper.cpp
${chip_dir}/examples/platform/ameba/ota/OTAInitializer.cpp
)
endif (matter_enable_ota_requestor)

Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <support/logging/CHIPLogging.h>
#include <support/logging/Constants.h>
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
#include <ota/OTAHelper.h>
#include <ota/OTAInitializer.h>
#endif

#include "Globals.h"
Expand All @@ -59,7 +59,7 @@ constexpr uint32_t kInitOTARequestorDelaySec = 3;
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
void InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
{
OTAHelper::Instance().InitOTARequestor();
OTAInitializer::Instance().InitOTARequestor();
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ list(
${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp
${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp
${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp
${chip_dir}/examples/platform/ameba/ota/OTAHelper.cpp
${chip_dir}/examples/platform/ameba/ota/OTAInitializer.cpp
)
endif (matter_enable_ota_requestor)

Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <support/logging/Constants.h>

#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
#include <ota/OTAHelper.h>
#include <ota/OTAInitializer.h>
#endif

static const char * TAG = "app-devicecallbacks";
Expand All @@ -57,7 +57,7 @@ constexpr uint32_t kInitOTARequestorDelaySec = 3;
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
void InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
{
OTAHelper::Instance().InitOTARequestor();
OTAInitializer::Instance().InitOTARequestor();
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion examples/ota-requestor-app/ameba/chip_main.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ list(
${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorDriver.cpp
${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp
${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp
${chip_dir}/examples/platform/ameba/ota/OTAHelper.cpp
${chip_dir}/examples/platform/ameba/ota/OTAInitializer.cpp
)

add_library(
Expand Down
4 changes: 2 additions & 2 deletions examples/ota-requestor-app/ameba/main/DeviceCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#include <support/logging/CHIPLogging.h>
#include <support/logging/Constants.h>
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
#include <ota/OTAHelper.h>
#include <ota/OTAInitializer.h>
#endif

#include "Globals.h"
Expand All @@ -59,7 +59,7 @@ constexpr uint32_t kInitOTARequestorDelaySec = 3;
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
void InitOTARequestorHandler(System::Layer * systemLayer, void * appState)
{
OTAHelper::Instance().InitOTARequestor();
OTAInitializer::Instance().InitOTARequestor();
}
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* limitations under the License.
*/

#include "OTAHelper.h"
#include "OTAInitializer.h"
#include "app/clusters/ota-requestor/DefaultOTARequestorStorage.h"
#include <app/clusters/ota-requestor/BDXDownloader.h>
#include <app/clusters/ota-requestor/DefaultOTARequestor.h>
Expand Down Expand Up @@ -49,7 +49,7 @@ extern "C" void amebaApplyUpdateCmdHandler()
PlatformMgr().ScheduleWork([](intptr_t) { GetRequestorInstance()->ApplyUpdate(); });
}

void OTAHelper::InitOTARequestor(void)
void OTAInitializer::InitOTARequestor(void)
{
SetRequestorInstance(&gRequestorCore);
gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
* limitations under the License.
*/

class OTAHelper
class OTAInitializer
{
public:
static OTAHelper & Instance(void)
static OTAInitializer & Instance(void)
{
static OTAHelper sInitOTA;
static OTAInitializer sInitOTA;
return sInitOTA;
}
void InitOTARequestor(void);
Expand Down

0 comments on commit 9f44742

Please sign in to comment.