From de843e0a60b3a5bc1c27d86b58291f7a404087c2 Mon Sep 17 00:00:00 2001 From: Rajkumar Kanagaraj Date: Wed, 22 Jul 2020 07:05:52 -0700 Subject: [PATCH] Update netsocket header and source reference in other libraries --- UNITTESTS/CMakeLists.txt | 2 +- .../cellular/framework/AT/at_cellularcontext/unittest.cmake | 2 +- .../cellular/framework/AT/at_cellulardevice/unittest.cmake | 2 +- .../framework/AT/at_cellularinformation/unittest.cmake | 2 +- .../cellular/framework/AT/at_cellularnetwork/unittest.cmake | 2 +- .../cellular/framework/AT/at_cellularsms/unittest.cmake | 2 +- .../framework/AT/at_cellularstack/at_cellularstacktest.cpp | 2 +- .../cellular/framework/AT/at_cellularstack/unittest.cmake | 4 ++-- .../framework/device/cellularcontext/unittest.cmake | 4 ++-- .../cellular/framework/device/cellulardevice/unittest.cmake | 2 +- .../framework/device/cellularstatemachine/unittest.cmake | 2 +- UNITTESTS/stubs/ATHandler_stub.cpp | 2 +- UNITTESTS/stubs/ATHandler_stub.h | 2 +- UNITTESTS/stubs/AT_CellularInformation_stub.cpp | 2 +- UNITTESTS/stubs/AT_CellularNetwork_stub.cpp | 2 +- UNITTESTS/stubs/CellularInterface_stub.cpp | 2 +- UNITTESTS/stubs/ControlPlane_netif_stub.h | 2 +- UNITTESTS/stubs/EMAC_mock.h | 2 +- UNITTESTS/stubs/MeshInterface_stub.cpp | 2 +- UNITTESTS/stubs/NetworkInterfaceDefaults_stub.cpp | 6 +++--- UNITTESTS/stubs/NetworkStack_stub.cpp | 4 ++-- UNITTESTS/stubs/SocketAddress_stub.cpp | 2 +- UNITTESTS/stubs/SocketStats_Stub.cpp | 2 +- 23 files changed, 28 insertions(+), 28 deletions(-) diff --git a/UNITTESTS/CMakeLists.txt b/UNITTESTS/CMakeLists.txt index aa05b4b18ce..683aee8494d 100644 --- a/UNITTESTS/CMakeLists.txt +++ b/UNITTESTS/CMakeLists.txt @@ -112,7 +112,6 @@ set(unittest-includes-base "${PROJECT_SOURCE_DIR}/stubs" "${PROJECT_SOURCE_DIR}/.." "${PROJECT_SOURCE_DIR}/../features" - "${PROJECT_SOURCE_DIR}/../features/netsocket" "${PROJECT_SOURCE_DIR}/../platform" "${PROJECT_SOURCE_DIR}/../storage/filesystem/littlefs/include" "${PROJECT_SOURCE_DIR}/../storage/filesystem/fat/include" @@ -128,6 +127,7 @@ set(unittest-includes-base "${PROJECT_SOURCE_DIR}/../features/frameworks/mbed-trace" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice" "${PROJECT_SOURCE_DIR}/../connectivity/libraries/nanostack-libservice/mbed-client-libservice" + "${PROJECT_SOURCE_DIR}/../connectivity/netsocket/include" "${PROJECT_SOURCE_DIR}/../features/filesystem/fat" "${PROJECT_SOURCE_DIR}/../features/filesystem/fat/ChaN" "${PROJECT_SOURCE_DIR}/../features/filesystem/bd" diff --git a/UNITTESTS/features/cellular/framework/AT/at_cellularcontext/unittest.cmake b/UNITTESTS/features/cellular/framework/AT/at_cellularcontext/unittest.cmake index 69278eb97a5..322381c7e18 100644 --- a/UNITTESTS/features/cellular/framework/AT/at_cellularcontext/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/AT/at_cellularcontext/unittest.cmake @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes} ../features/cellular/framework/common ../features/cellular/framework/AT ../features/cellular/framework/device - ../features/netsocket/cellular + ../features/cellular ) # Source files diff --git a/UNITTESTS/features/cellular/framework/AT/at_cellulardevice/unittest.cmake b/UNITTESTS/features/cellular/framework/AT/at_cellulardevice/unittest.cmake index c345cba67dc..2ffba998f5f 100644 --- a/UNITTESTS/features/cellular/framework/AT/at_cellulardevice/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/AT/at_cellulardevice/unittest.cmake @@ -12,7 +12,7 @@ set(unittest-includes ${unittest-includes} ../features/frameworks/mbed-client-randlib/mbed-client-randlib ../drivers ../hal - ../features/netsocket/cellular + ../features/cellular ) # Source files diff --git a/UNITTESTS/features/cellular/framework/AT/at_cellularinformation/unittest.cmake b/UNITTESTS/features/cellular/framework/AT/at_cellularinformation/unittest.cmake index 31e7193ba76..31797290231 100644 --- a/UNITTESTS/features/cellular/framework/AT/at_cellularinformation/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/AT/at_cellularinformation/unittest.cmake @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes} ../features/cellular/framework/common ../features/cellular/framework/AT ../features/frameworks/mbed-client-randlib/mbed-client-randlib - ../features/netsocket/cellular + ../features/cellular ) # Source files diff --git a/UNITTESTS/features/cellular/framework/AT/at_cellularnetwork/unittest.cmake b/UNITTESTS/features/cellular/framework/AT/at_cellularnetwork/unittest.cmake index 1345b5577d8..0057980fe77 100644 --- a/UNITTESTS/features/cellular/framework/AT/at_cellularnetwork/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/AT/at_cellularnetwork/unittest.cmake @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes} ../features/cellular/framework/common ../features/cellular/framework/AT ../features/frameworks/mbed-client-randlib/mbed-client-randlib - ../features/netsocket/cellular + ../features/cellular ) # Source files diff --git a/UNITTESTS/features/cellular/framework/AT/at_cellularsms/unittest.cmake b/UNITTESTS/features/cellular/framework/AT/at_cellularsms/unittest.cmake index 2bcd59b2cac..9e0ff12e3b4 100644 --- a/UNITTESTS/features/cellular/framework/AT/at_cellularsms/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/AT/at_cellularsms/unittest.cmake @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes} ../features/cellular/framework/common ../features/cellular/framework/AT ../features/frameworks/mbed-client-randlib/mbed-client-randlib - ../features/netsocket/cellular + ../features/cellular ) # Source files diff --git a/UNITTESTS/features/cellular/framework/AT/at_cellularstack/at_cellularstacktest.cpp b/UNITTESTS/features/cellular/framework/AT/at_cellularstack/at_cellularstacktest.cpp index 0269fd7e57b..fc0cefc1e10 100644 --- a/UNITTESTS/features/cellular/framework/AT/at_cellularstack/at_cellularstacktest.cpp +++ b/UNITTESTS/features/cellular/framework/AT/at_cellularstack/at_cellularstacktest.cpp @@ -24,7 +24,7 @@ #include "FileHandle_stub.h" #include "CellularLog.h" #include "ATHandler_stub.h" -#include "SocketAddress.h" +#include "netsocket/SocketAddress.h" #include "CellularDevice_stub.h" #include "AT_CellularDevice_stub.h" #include "myCellularDevice.h" diff --git a/UNITTESTS/features/cellular/framework/AT/at_cellularstack/unittest.cmake b/UNITTESTS/features/cellular/framework/AT/at_cellularstack/unittest.cmake index aa1c310f815..a722f21fcd9 100644 --- a/UNITTESTS/features/cellular/framework/AT/at_cellularstack/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/AT/at_cellularstack/unittest.cmake @@ -9,7 +9,7 @@ set(unittest-includes ${unittest-includes} ../features/cellular/framework/common ../features/cellular/framework/AT ../features/frameworks/mbed-client-randlib/mbed-client-randlib - ../features/netsocket/cellular + ../features/cellular ) # Source files @@ -20,7 +20,7 @@ set(unittest-sources ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c ../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c ../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c - ../features/netsocket/SocketAddress.cpp + ../connectivity/netsocket/source/SocketAddress.cpp ) # Test files diff --git a/UNITTESTS/features/cellular/framework/device/cellularcontext/unittest.cmake b/UNITTESTS/features/cellular/framework/device/cellularcontext/unittest.cmake index 2d0c66d41b5..afece991a45 100644 --- a/UNITTESTS/features/cellular/framework/device/cellularcontext/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/device/cellularcontext/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} /features/cellular/framework/device/cellulardevice ../features/cellular/framework/device ../features/cellular/framework/common - ../features/netsocket/cellular + ../features/cellular ) # Source files @@ -19,7 +19,7 @@ set(unittest-sources ../connectivity/libraries/nanostack-libservice/source/libip4string/stoip4.c ../connectivity/libraries/nanostack-libservice/source/libip6string/stoip6.c ../connectivity/libraries/nanostack-libservice/source/libBits/common_functions.c - ../features/netsocket/SocketAddress.cpp + ../connectivity/netsocket/source/SocketAddress.cpp ) # Test files diff --git a/UNITTESTS/features/cellular/framework/device/cellulardevice/unittest.cmake b/UNITTESTS/features/cellular/framework/device/cellulardevice/unittest.cmake index 96c0f1daacf..f6680ccd70a 100644 --- a/UNITTESTS/features/cellular/framework/device/cellulardevice/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/device/cellulardevice/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} /features/cellular/framework/device/cellulardevice ../features/cellular/framework/device ../features/cellular/framework/common - ../features/netsocket/cellular + ../features/cellular ) # Source files diff --git a/UNITTESTS/features/cellular/framework/device/cellularstatemachine/unittest.cmake b/UNITTESTS/features/cellular/framework/device/cellularstatemachine/unittest.cmake index 95dbc7e5035..25191dceacb 100644 --- a/UNITTESTS/features/cellular/framework/device/cellularstatemachine/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/device/cellularstatemachine/unittest.cmake @@ -8,7 +8,7 @@ set(unittest-includes ${unittest-includes} /features/cellular/framework/device/cellularstatemachine ../features/cellular/framework/device ../features/cellular/framework/common - ../features/netsocket/cellular + ../features/cellular ) # Source files diff --git a/UNITTESTS/stubs/ATHandler_stub.cpp b/UNITTESTS/stubs/ATHandler_stub.cpp index fde70aaa545..c5b9c7ce673 100644 --- a/UNITTESTS/stubs/ATHandler_stub.cpp +++ b/UNITTESTS/stubs/ATHandler_stub.cpp @@ -16,7 +16,7 @@ */ #include -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" #include "events/EventQueue.h" #include "ATHandler_stub.h" diff --git a/UNITTESTS/stubs/ATHandler_stub.h b/UNITTESTS/stubs/ATHandler_stub.h index 45b112ff42c..538daedd2c9 100644 --- a/UNITTESTS/stubs/ATHandler_stub.h +++ b/UNITTESTS/stubs/ATHandler_stub.h @@ -18,7 +18,7 @@ #include "stdint.h" #include "stdbool.h" #include -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" #include "ATHandler.h" #include "FileHandle_stub.h" #include "Callback.h" diff --git a/UNITTESTS/stubs/AT_CellularInformation_stub.cpp b/UNITTESTS/stubs/AT_CellularInformation_stub.cpp index 8f92d796d4a..6d9d9aef32a 100644 --- a/UNITTESTS/stubs/AT_CellularInformation_stub.cpp +++ b/UNITTESTS/stubs/AT_CellularInformation_stub.cpp @@ -16,7 +16,7 @@ */ #include "AT_CellularInformation.h" -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" using namespace mbed; diff --git a/UNITTESTS/stubs/AT_CellularNetwork_stub.cpp b/UNITTESTS/stubs/AT_CellularNetwork_stub.cpp index 5f043a641c8..df8a55de227 100644 --- a/UNITTESTS/stubs/AT_CellularNetwork_stub.cpp +++ b/UNITTESTS/stubs/AT_CellularNetwork_stub.cpp @@ -20,7 +20,7 @@ #include "CellularUtil.h" #include "CellularLog.h" #include "FileHandle.h" -#include "nsapi_types.h" +#include "netsocket/nsapi_types.h" using namespace mbed; using namespace mbed_cellular_util; diff --git a/UNITTESTS/stubs/CellularInterface_stub.cpp b/UNITTESTS/stubs/CellularInterface_stub.cpp index 27a49868eef..154decef7a9 100644 --- a/UNITTESTS/stubs/CellularInterface_stub.cpp +++ b/UNITTESTS/stubs/CellularInterface_stub.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "CellularInterface.h" +#include "netsocket/CellularInterface.h" MBED_WEAK CellularInterface *CellularInterface::get_target_default_instance() { diff --git a/UNITTESTS/stubs/ControlPlane_netif_stub.h b/UNITTESTS/stubs/ControlPlane_netif_stub.h index a15fd38dc96..be220f47e88 100644 --- a/UNITTESTS/stubs/ControlPlane_netif_stub.h +++ b/UNITTESTS/stubs/ControlPlane_netif_stub.h @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "ControlPlane_netif.h" +#include "netsocket/ControlPlane_netif.h" #include namespace mbed { diff --git a/UNITTESTS/stubs/EMAC_mock.h b/UNITTESTS/stubs/EMAC_mock.h index f41ae8021f7..2e33bcc0071 100644 --- a/UNITTESTS/stubs/EMAC_mock.h +++ b/UNITTESTS/stubs/EMAC_mock.h @@ -20,7 +20,7 @@ #include "gtest/gtest.h" #include "gmock/gmock.h" -#include "features/netsocket/EMAC.h" +#include "netsocket/EMAC.h" class MockEMAC : public EMAC { public: diff --git a/UNITTESTS/stubs/MeshInterface_stub.cpp b/UNITTESTS/stubs/MeshInterface_stub.cpp index dd504e54f88..f6346ab7d70 100644 --- a/UNITTESTS/stubs/MeshInterface_stub.cpp +++ b/UNITTESTS/stubs/MeshInterface_stub.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "MeshInterface.h" +#include "netsocket/MeshInterface.h" MBED_WEAK MeshInterface *MeshInterface::get_target_default_instance() { diff --git a/UNITTESTS/stubs/NetworkInterfaceDefaults_stub.cpp b/UNITTESTS/stubs/NetworkInterfaceDefaults_stub.cpp index da2ff3f4ce9..dd3a562b2b0 100644 --- a/UNITTESTS/stubs/NetworkInterfaceDefaults_stub.cpp +++ b/UNITTESTS/stubs/NetworkInterfaceDefaults_stub.cpp @@ -15,9 +15,9 @@ * limitations under the License. */ #include "netsocket/NetworkInterface.h" -#include "WiFiInterface.h" -#include "CellularInterface.h" -#include "MeshInterface.h" +#include "netsocket/WiFiInterface.h" +#include "netsocket/CellularInterface.h" +#include "netsocket/MeshInterface.h" MBED_WEAK WiFiInterface *WiFiInterface::get_default_instance() { diff --git a/UNITTESTS/stubs/NetworkStack_stub.cpp b/UNITTESTS/stubs/NetworkStack_stub.cpp index 76ad5175a4f..dd68b3e9fb5 100644 --- a/UNITTESTS/stubs/NetworkStack_stub.cpp +++ b/UNITTESTS/stubs/NetworkStack_stub.cpp @@ -15,8 +15,8 @@ * limitations under the License. */ -#include "NetworkStack.h" -#include "nsapi_dns.h" +#include "netsocket/NetworkStack.h" +#include "netsocket/nsapi_dns.h" #include "mbed.h" #include "stddef.h" #include diff --git a/UNITTESTS/stubs/SocketAddress_stub.cpp b/UNITTESTS/stubs/SocketAddress_stub.cpp index 034fe9de992..4d1dd345d60 100644 --- a/UNITTESTS/stubs/SocketAddress_stub.cpp +++ b/UNITTESTS/stubs/SocketAddress_stub.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "SocketAddress.h" +#include "netsocket/SocketAddress.h" SocketAddress::SocketAddress(const nsapi_addr_t &addr, uint16_t port) diff --git a/UNITTESTS/stubs/SocketStats_Stub.cpp b/UNITTESTS/stubs/SocketStats_Stub.cpp index 7f1c91ecff8..4da960210a3 100644 --- a/UNITTESTS/stubs/SocketStats_Stub.cpp +++ b/UNITTESTS/stubs/SocketStats_Stub.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ -#include "SocketStats.h" +#include "netsocket/SocketStats.h" #if MBED_CONF_NSAPI_SOCKET_STATS_ENABLED int SocketStats::get_entry_position(const Socket *const reference_id)