From b5fa375734a6ce7b5b91a038b5f4fb556b6fa73c Mon Sep 17 00:00:00 2001 From: Trevor Holbrook Date: Thu, 14 Oct 2021 21:42:09 +0000 Subject: [PATCH] more namespace fixing and remove more dead files --- .../EFR32/SoftwareUpdateManagerImpl.cpp | 45 ---------- .../EFR32/SoftwareUpdateManagerImpl.h | 88 ------------------ src/platform/ESP32/BUILD.gn | 1 - .../ESP32/SoftwareUpdateManagerImpl.cpp | 45 ---------- .../ESP32/SoftwareUpdateManagerImpl.h | 89 ------------------- ...nericThreadStackManagerImpl_OpenThread.cpp | 2 + ...ThreadStackManagerImpl_OpenThread_LwIP.cpp | 2 +- src/platform/OpenThread/OpenThreadUtils.cpp | 2 +- src/platform/P6/BUILD.gn | 2 - src/platform/P6/SoftwareUpdateManagerImpl.cpp | 38 -------- src/platform/P6/SoftwareUpdateManagerImpl.h | 89 ------------------- src/platform/nxp/k32w/k32w0/BUILD.gn | 1 - .../k32w/k32w0/SoftwareUpdateManagerImpl.cpp | 46 ---------- .../k32w/k32w0/SoftwareUpdateManagerImpl.h | 89 ------------------- .../qpg/SoftwareUpdateManagerImpl.cpp | 39 -------- 15 files changed, 4 insertions(+), 574 deletions(-) delete mode 100644 src/platform/EFR32/SoftwareUpdateManagerImpl.cpp delete mode 100644 src/platform/EFR32/SoftwareUpdateManagerImpl.h delete mode 100644 src/platform/ESP32/SoftwareUpdateManagerImpl.cpp delete mode 100644 src/platform/ESP32/SoftwareUpdateManagerImpl.h delete mode 100644 src/platform/P6/SoftwareUpdateManagerImpl.cpp delete mode 100644 src/platform/P6/SoftwareUpdateManagerImpl.h delete mode 100644 src/platform/nxp/k32w/k32w0/SoftwareUpdateManagerImpl.cpp delete mode 100644 src/platform/nxp/k32w/k32w0/SoftwareUpdateManagerImpl.h delete mode 100644 src/platform/qpg/SoftwareUpdateManagerImpl.cpp diff --git a/src/platform/EFR32/SoftwareUpdateManagerImpl.cpp b/src/platform/EFR32/SoftwareUpdateManagerImpl.cpp deleted file mode 100644 index 993a009ea7b890..00000000000000 --- a/src/platform/EFR32/SoftwareUpdateManagerImpl.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* this file behaves like a config.h, comes first */ -#include - -#if CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER - -#include -#include - -#include -#include - -namespace chip { -namespace DeviceLayer { - -SoftwareUpdateManagerImpl SoftwareUpdateManagerImpl::sInstance; - -CHIP_ERROR SoftwareUpdateManagerImpl::_Init(void) -{ - Internal::GenericSoftwareUpdateManagerImpl_BDX::DoInit(); - Internal::GenericSoftwareUpdateManagerImpl::DoInit(); - - return CHIP_NO_ERROR; -} - -} // namespace DeviceLayer -} // namespace chip - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER diff --git a/src/platform/EFR32/SoftwareUpdateManagerImpl.h b/src/platform/EFR32/SoftwareUpdateManagerImpl.h deleted file mode 100644 index e3e55c34fa4c7c..00000000000000 --- a/src/platform/EFR32/SoftwareUpdateManagerImpl.h +++ /dev/null @@ -1,88 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#if CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER - -#include -#include - -namespace chip { -namespace DeviceLayer { - -/** - * Concrete implementation of the SoftwareUpdateManager singleton object for the - * Silicon Labs EFR32 platforms. - */ -class SoftwareUpdateManagerImpl final : public SoftwareUpdateManager, - public Internal::GenericSoftwareUpdateManagerImpl, - public Internal::GenericSoftwareUpdateManagerImpl_BDX -{ - // Allow the SoftwareUpdateManager interface class to delegate method calls to - // the implementation methods provided by this class. - friend class SoftwareUpdateManager; - - // Allow the GenericSoftwareUpdateManagerImpl base class to access helper methods - // and types defined on this class. - friend class Internal::GenericSoftwareUpdateManagerImpl; - - // Allow the GenericSoftwareUpdateManagerImpl_BDX base class to access helper methods - // and types defined on this class. - friend class Internal::GenericSoftwareUpdateManagerImpl_BDX; - -public: - // ===== Members for internal use by the following friends. - - friend ::chip::DeviceLayer::SoftwareUpdateManager & SoftwareUpdateMgr(void); - friend SoftwareUpdateManagerImpl & SoftwareUpdateMgrImpl(void); - - static SoftwareUpdateManagerImpl sInstance; - -private: - // ===== Members that implement the SoftwareUpdateManager abstract interface. - - CHIP_ERROR _Init(void); -}; - -/** - * Returns a reference to the public interface of the SoftwareUpdateManager singleton object. - * - * Internal components should use this to access features of the SoftwareUpdateManager object - * that are common to all platforms. - */ -inline SoftwareUpdateManager & SoftwareUpdateMgr(void) -{ - return SoftwareUpdateManagerImpl::sInstance; -} - -/** - * Returns the platform-specific implementation of the SoftwareUpdateManager singleton object. - * - * Internal components can use this to gain access to features of the SoftwareUpdateManager - * that are specific to the EFR32 platform. - */ -inline SoftwareUpdateManagerImpl & SoftwareUpdateMgrImpl(void) -{ - return SoftwareUpdateManagerImpl::sInstance; -} - -} // namespace DeviceLayer -} // namespace chip - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER diff --git a/src/platform/ESP32/BUILD.gn b/src/platform/ESP32/BUILD.gn index d43cdb84d6cc20..175b83e29267ed 100644 --- a/src/platform/ESP32/BUILD.gn +++ b/src/platform/ESP32/BUILD.gn @@ -40,7 +40,6 @@ static_library("ESP32") { "LwIPCoreLock.cpp", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", - "SoftwareUpdateManagerImpl.h", "SystemTimeSupport.cpp", "bluedroid/BLEManagerImpl.cpp", "nimble/BLEManagerImpl.cpp", diff --git a/src/platform/ESP32/SoftwareUpdateManagerImpl.cpp b/src/platform/ESP32/SoftwareUpdateManagerImpl.cpp deleted file mode 100644 index f5b0b02b4053ab..00000000000000 --- a/src/platform/ESP32/SoftwareUpdateManagerImpl.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* this file behaves like a config.h, comes first */ -#include - -#if CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER - -#include - -#include -#include - -namespace chip { -namespace DeviceLayer { - -SoftwareUpdateManagerImpl SoftwareUpdateManagerImpl::sInstance; - -CHIP_ERROR SoftwareUpdateManagerImpl::_Init(void) -{ - Internal::GenericSoftwareUpdateManagerImpl_BDX::DoInit(); - Internal::GenericSoftwareUpdateManagerImpl::DoInit(); - - return CHIP_NO_ERROR; -} - -} // namespace DeviceLayer -} // namespace chip - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER diff --git a/src/platform/ESP32/SoftwareUpdateManagerImpl.h b/src/platform/ESP32/SoftwareUpdateManagerImpl.h deleted file mode 100644 index 4d941cba97dfe1..00000000000000 --- a/src/platform/ESP32/SoftwareUpdateManagerImpl.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#if CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER - -#include -#include - -namespace chip { -namespace DeviceLayer { - -/** - * Concrete implementation of the SoftwareUpdateManager singleton object for the - * ESP32 platforms. - */ -class SoftwareUpdateManagerImpl final : public SoftwareUpdateManager, - public Internal::GenericSoftwareUpdateManagerImpl, - public Internal::GenericSoftwareUpdateManagerImpl_BDX -{ - // Allow the SoftwareUpdateManager interface class to delegate method calls to - // the implementation methods provided by this class. - friend class SoftwareUpdateManager; - - // Allow the GenericSoftwareUpdateManagerImpl base class to access helper methods - // and types defined on this class. - friend class Internal::GenericSoftwareUpdateManagerImpl; - - // Allow the GenericSoftwareUpdateManagerImpl_BDX base class to access helper methods - // and types defined on this class. - friend class Internal::GenericSoftwareUpdateManagerImpl_BDX; - -public: - // ===== Members for internal use by the following friends. - - friend ::chip::DeviceLayer::SoftwareUpdateManager & SoftwareUpdateMgr(void); - friend SoftwareUpdateManagerImpl & SoftwareUpdateMgrImpl(void); - - static SoftwareUpdateManagerImpl sInstance; - -private: - // ===== Members that implement the SoftwareUpdateManager abstract interface. - - CHIP_ERROR _Init(void); -}; - -/** - * Returns a reference to the public interface of the SoftwareUpdateManager singleton object. - * - * Internal components should use this to access features of the SoftwareUpdateManager object - * that are common to all platforms. - */ -inline SoftwareUpdateManager & SoftwareUpdateMgr(void) -{ - return SoftwareUpdateManagerImpl::sInstance; -} - -/** - * Returns the platform-specific implementation of the SoftwareUpdateManager singleton object. - * - * Internal components can use this to gain access to features of the SoftwareUpdateManager - * that are specific to the ESP32 platform. - */ -inline SoftwareUpdateManagerImpl & SoftwareUpdateMgrImpl(void) -{ - return SoftwareUpdateManagerImpl::sInstance; -} - -} // namespace DeviceLayer -} // namespace chip - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp index 6b7f372c02fe99..d0492d7f74ff3c 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp @@ -73,6 +73,8 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::DataModel; +using chip::Inet::IPPrefix; + namespace chip { namespace DeviceLayer { namespace Internal { diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp index f2ecd8f301ee06..974808351f4759 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp @@ -247,7 +247,7 @@ void GenericThreadStackManagerImpl_OpenThread_LwIP::UpdateThreadInter uint8_t state = netif_ip6_addr_state(mNetIf, addrIdx); if (state != IP6_ADDR_INVALID) { - Inet::IPAddress addr = IPAddress::FromIPv6(*netif_ip6_addr(mNetIf, addrIdx)); + Inet::IPAddress addr = Inet::IPAddress::FromIPv6(*netif_ip6_addr(mNetIf, addrIdx)); char addrStr[50]; addr.ToString(addrStr, sizeof(addrStr)); const char * typeStr; diff --git a/src/platform/OpenThread/OpenThreadUtils.cpp b/src/platform/OpenThread/OpenThreadUtils.cpp index e29558df8710c0..659107946bc4f9 100644 --- a/src/platform/OpenThread/OpenThreadUtils.cpp +++ b/src/platform/OpenThread/OpenThreadUtils.cpp @@ -172,7 +172,7 @@ void LogOpenThreadPacket(const char * titleStr, otMessage * pkt) char srcStr[50], destStr[50], typeBuf[20]; const char * type = typeBuf; - IPAddress addr; + Inet::IPAddress addr; uint8_t headerData[44]; uint16_t pktLen; diff --git a/src/platform/P6/BUILD.gn b/src/platform/P6/BUILD.gn index 45fbf8ee460a49..7269cd9a817f7b 100644 --- a/src/platform/P6/BUILD.gn +++ b/src/platform/P6/BUILD.gn @@ -51,8 +51,6 @@ static_library("P6") { "P6Utils.h", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", - "SoftwareUpdateManagerImpl.cpp", - "SoftwareUpdateManagerImpl.h", "SystemPlatformConfig.h", "WarmPlatformConfig.h", "app_platform_cfg.c", diff --git a/src/platform/P6/SoftwareUpdateManagerImpl.cpp b/src/platform/P6/SoftwareUpdateManagerImpl.cpp deleted file mode 100644 index eabccdae3f4a71..00000000000000 --- a/src/platform/P6/SoftwareUpdateManagerImpl.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* this file behaves like a config.h, comes first */ -#include - -#if CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER - -namespace chip { -namespace DeviceLayer { - -SoftwareUpdateManagerImpl SoftwareUpdateManagerImpl::sInstance; - -CHIP_ERROR SoftwareUpdateManagerImpl::_Init(void) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - return err; -} - -} // namespace DeviceLayer -} // namespace chip - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER diff --git a/src/platform/P6/SoftwareUpdateManagerImpl.h b/src/platform/P6/SoftwareUpdateManagerImpl.h deleted file mode 100644 index fe42c52df70edd..00000000000000 --- a/src/platform/P6/SoftwareUpdateManagerImpl.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#if CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER - -#include -#include - -namespace chip { -namespace DeviceLayer { - -/** - * Concrete implementation of the SoftwareUpdateManager singleton object for the - * PSoC6 platforms. - */ -class SoftwareUpdateManagerImpl final : public SoftwareUpdateManager, - public Internal::GenericSoftwareUpdateManagerImpl, - public Internal::GenericSoftwareUpdateManagerImpl_BDX -{ - // Allow the SoftwareUpdateManager interface class to delegate method calls to - // the implementation methods provided by this class. - friend class SoftwareUpdateManager; - - // Allow the GenericSoftwareUpdateManagerImpl base class to access helper methods - // and types defined on this class. - friend class Internal::GenericSoftwareUpdateManagerImpl; - - // Allow the GenericSoftwareUpdateManagerImpl_BDX base class to access helper methods - // and types defined on this class. - friend class Internal::GenericSoftwareUpdateManagerImpl_BDX; - -public: - // ===== Members for internal use by the following friends. - - friend ::chip::DeviceLayer::SoftwareUpdateManager & SoftwareUpdateMgr(void); - friend SoftwareUpdateManagerImpl & SoftwareUpdateMgrImpl(void); - - static SoftwareUpdateManagerImpl sInstance; - -private: - // ===== Members that implement the SoftwareUpdateManager abstract interface. - - CHIP_ERROR _Init(void); -}; - -/** - * Returns a reference to the public interface of the SoftwareUpdateManager singleton object. - * - * Internal components should use this to access features of the SoftwareUpdateManager object - * that are common to all platforms. - */ -inline SoftwareUpdateManager & SoftwareUpdateMgr(void) -{ - return SoftwareUpdateManagerImpl::sInstance; -} - -/** - * Returns the platform-specific implementation of the SoftwareUpdateManager singleton object. - * - * Internal components can use this to gain access to features of the SoftwareUpdateManager - * that are specific to the PSoC6 platform. - */ -inline SoftwareUpdateManagerImpl & SoftwareUpdateMgrImpl(void) -{ - return SoftwareUpdateManagerImpl::sInstance; -} - -} // namespace DeviceLayer -} // namespace chip - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER diff --git a/src/platform/nxp/k32w/k32w0/BUILD.gn b/src/platform/nxp/k32w/k32w0/BUILD.gn index aba72e6da7c2a8..10628fd4466e5c 100644 --- a/src/platform/nxp/k32w/k32w0/BUILD.gn +++ b/src/platform/nxp/k32w/k32w0/BUILD.gn @@ -44,7 +44,6 @@ static_library("k32w0") { "NFCManagerImpl.h", "PlatformManagerImpl.cpp", "PlatformManagerImpl.h", - "SoftwareUpdateManagerImpl.h", "ble_function_mux.c", ] diff --git a/src/platform/nxp/k32w/k32w0/SoftwareUpdateManagerImpl.cpp b/src/platform/nxp/k32w/k32w0/SoftwareUpdateManagerImpl.cpp deleted file mode 100644 index c464bb327c24a6..00000000000000 --- a/src/platform/nxp/k32w/k32w0/SoftwareUpdateManagerImpl.cpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2020 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* this file behaves like a config.h, comes first */ -#include - -#if CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER - -#include -#include - -#include -#include - -namespace chip { -namespace DeviceLayer { - -SoftwareUpdateManagerImpl SoftwareUpdateManagerImpl::sInstance; - -CHIP_ERROR SoftwareUpdateManagerImpl::_Init(void) -{ - Internal::GenericSoftwareUpdateManagerImpl_BDX::DoInit(); - Internal::GenericSoftwareUpdateManagerImpl::DoInit(); - - return CHIP_NO_ERROR; -} - -} // namespace DeviceLayer -} // namespace chip - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER diff --git a/src/platform/nxp/k32w/k32w0/SoftwareUpdateManagerImpl.h b/src/platform/nxp/k32w/k32w0/SoftwareUpdateManagerImpl.h deleted file mode 100644 index f04025435928d5..00000000000000 --- a/src/platform/nxp/k32w/k32w0/SoftwareUpdateManagerImpl.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2020 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#pragma once - -#if CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER - -#include -#include - -namespace chip { -namespace DeviceLayer { - -/** - * Concrete implementation of the SoftwareUpdateManager singleton object for the - * NXP K32W platforms. - */ -class SoftwareUpdateManagerImpl final : public SoftwareUpdateManager, - public Internal::GenericSoftwareUpdateManagerImpl, - public Internal::GenericSoftwareUpdateManagerImpl_BDX -{ - // Allow the SoftwareUpdateManager interface class to delegate method calls to - // the implementation methods provided by this class. - friend class SoftwareUpdateManager; - - // Allow the GenericSoftwareUpdateManagerImpl base class to access helper methods - // and types defined on this class. - friend class Internal::GenericSoftwareUpdateManagerImpl; - - // Allow the GenericSoftwareUpdateManagerImpl_BDX base class to access helper methods - // and types defined on this class. - friend class Internal::GenericSoftwareUpdateManagerImpl_BDX; - -public: - // ===== Members for internal use by the following friends. - - friend ::chip::DeviceLayer::SoftwareUpdateManager & SoftwareUpdateMgr(void); - friend SoftwareUpdateManagerImpl & SoftwareUpdateMgrImpl(void); - - static SoftwareUpdateManagerImpl sInstance; - -private: - // ===== Members that implement the SoftwareUpdateManager abstract interface. - - CHIP_ERROR _Init(void); -}; - -/** - * Returns a reference to the public interface of the SoftwareUpdateManager singleton object. - * - * Internal components should use this to access features of the SoftwareUpdateManager object - * that are common to all platforms. - */ -inline SoftwareUpdateManager & SoftwareUpdateMgr(void) -{ - return SoftwareUpdateManagerImpl::sInstance; -} - -/** - * Returns the platform-specific implementation of the SoftwareUpdateManager singleton object. - * - * Internal components can use this to gain access to features of the SoftwareUpdateManager - * that are specific to the K32W platform. - */ -inline SoftwareUpdateManagerImpl & SoftwareUpdateMgrImpl(void) -{ - return SoftwareUpdateManagerImpl::sInstance; -} - -} // namespace DeviceLayer -} // namespace chip - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER diff --git a/src/platform/qpg/SoftwareUpdateManagerImpl.cpp b/src/platform/qpg/SoftwareUpdateManagerImpl.cpp deleted file mode 100644 index ce64b8139c7c29..00000000000000 --- a/src/platform/qpg/SoftwareUpdateManagerImpl.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -#if CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER - -#include - -namespace chip { -namespace DeviceLayer { - -SoftwareUpdateManagerImpl SoftwareUpdateManagerImpl::sInstance; - -CHIP_ERROR SoftwareUpdateManagerImpl::_Init(void) -{ - Internal::GenericSoftwareUpdateManagerImpl::DoInit(); - - return CHIP_NO_ERROR; -} - -} // namespace DeviceLayer -} // namespace chip - -#endif // CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER