Skip to content

Commit f552f9d

Browse files
author
Cruz Monrreal
authored
Merge pull request #10146 from kjbracey-arm/CellularInterface_tidy
CellularBase -> CellularInterface tidy
2 parents 9c381f2 + 9ad9069 commit f552f9d

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

features/netsocket/CellularBase.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@
2222
#ifndef CELLULAR_BASE_H
2323
#define CELLULAR_BASE_H
2424

25+
#include "CellularInterface.h"
26+
2527
/**
2628
* This class is deprecated and will be removed altogether after expiration of
2729
* deprecation notice.
30+
* @deprecated Migrated to CellularInterface
2831
*/
29-
#include "CellularInterface.h"
30-
3132
MBED_DEPRECATED_SINCE("mbed-os-5.12", "Migrated to CellularInterface")
3233
typedef CellularInterface CellularBase;
3334

features/netsocket/NetworkInterface.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class NetworkInterface: public DNS {
5151
* target.network-default-interface-type or other overrides.
5252
*
5353
* The type of the interface returned can be tested by calling ethInterface(),
54-
* wifiInterface(), meshInterface(), cellularBase(), emacInterface() and checking
54+
* wifiInterface(), meshInterface(), cellularInterface(), emacInterface() and checking
5555
* for NULL pointers.
5656
*
5757
* The default behavior is to return the default interface for the
@@ -340,9 +340,10 @@ class NetworkInterface: public DNS {
340340

341341
/** Return pointer to a CellularInterface.
342342
* @return Pointer to requested interface type or NULL if this class doesn't implement the interface.
343+
* @deprecated CellularBase migrated to CellularInterface - use cellularInterface()
343344
*/
344-
MBED_DEPRECATED_SINCE("mbed-os-5.12", "Migrated to CellularInterface")
345-
virtual CellularInterface *cellularBase()
345+
MBED_DEPRECATED_SINCE("mbed-os-5.12", "CellularBase migrated to CellularInterface - use cellularInterface()")
346+
virtual CellularInterface *cellularBase() // virtual retained for binary compatibility
346347
{
347348
return 0;
348349
}

features/netsocket/NetworkInterfaceDefaults.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "EthInterface.h"
2020
#include "WiFiInterface.h"
21-
#include "CellularBase.h"
21+
#include "CellularInterface.h"
2222
#include "MeshInterface.h"
2323

2424
/* Weak default instance static classes for the various abstract classes.
@@ -40,7 +40,7 @@ MBED_WEAK MeshInterface *MeshInterface::get_default_instance()
4040
return get_target_default_instance();
4141
}
4242

43-
MBED_WEAK CellularBase *CellularBase::get_default_instance()
43+
MBED_WEAK CellularInterface *CellularInterface::get_default_instance()
4444
{
4545
return get_target_default_instance();
4646
}
@@ -87,9 +87,9 @@ void WiFiInterface::set_default_parameters()
8787
#endif
8888
}
8989

90-
void CellularBase::set_default_parameters()
90+
void CellularInterface::set_default_parameters()
9191
{
92-
/* CellularBase is expected to attempt to work without any parameters - we
92+
/* CellularInterface is expected to attempt to work without any parameters - we
9393
* will try, at least.
9494
*/
9595
#ifdef MBED_CONF_NSAPI_DEFAULT_CELLULAR_APN
@@ -148,7 +148,7 @@ MBED_WEAK NetworkInterface *NetworkInterface::get_target_default_instance()
148148
#elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == CELLULAR
149149
MBED_WEAK NetworkInterface *NetworkInterface::get_target_default_instance()
150150
{
151-
CellularBase *cellular = CellularBase::get_default_instance();
151+
CellularInterface *cellular = CellularInterface::get_default_instance();
152152
if (!cellular) {
153153
return NULL;
154154
}

0 commit comments

Comments
 (0)