CellularBase -> CellularInterface tidy

Remove remaining references to deprecated CellularBase in code, avoiding
one warning.

Add deprecation to Doxygen.
pull/10146/head
Kevin Bracey 2019-03-18 11:04:22 +02:00
parent 6b84b14ab6
commit 9ad90691a3
3 changed files with 12 additions and 10 deletions

View File

@ -22,12 +22,13 @@
#ifndef CELLULAR_BASE_H #ifndef CELLULAR_BASE_H
#define CELLULAR_BASE_H #define CELLULAR_BASE_H
#include "CellularInterface.h"
/** /**
* This class is deprecated and will be removed altogether after expiration of * This class is deprecated and will be removed altogether after expiration of
* deprecation notice. * deprecation notice.
* @deprecated Migrated to CellularInterface
*/ */
#include "CellularInterface.h"
MBED_DEPRECATED_SINCE("mbed-os-5.12", "Migrated to CellularInterface") MBED_DEPRECATED_SINCE("mbed-os-5.12", "Migrated to CellularInterface")
typedef CellularInterface CellularBase; typedef CellularInterface CellularBase;

View File

@ -51,7 +51,7 @@ public:
* target.network-default-interface-type or other overrides. * target.network-default-interface-type or other overrides.
* *
* The type of the interface returned can be tested by calling ethInterface(), * The type of the interface returned can be tested by calling ethInterface(),
* wifiInterface(), meshInterface(), cellularBase(), emacInterface() and checking * wifiInterface(), meshInterface(), cellularInterface(), emacInterface() and checking
* for NULL pointers. * for NULL pointers.
* *
* The default behavior is to return the default interface for the * The default behavior is to return the default interface for the
@ -340,9 +340,10 @@ public:
/** Return pointer to a CellularInterface. /** Return pointer to a CellularInterface.
* @return Pointer to requested interface type or NULL if this class doesn't implement the interface. * @return Pointer to requested interface type or NULL if this class doesn't implement the interface.
* @deprecated CellularBase migrated to CellularInterface - use cellularInterface()
*/ */
MBED_DEPRECATED_SINCE("mbed-os-5.12", "Migrated to CellularInterface") MBED_DEPRECATED_SINCE("mbed-os-5.12", "CellularBase migrated to CellularInterface - use cellularInterface()")
virtual CellularInterface *cellularBase() virtual CellularInterface *cellularBase() // virtual retained for binary compatibility
{ {
return 0; return 0;
} }

View File

@ -18,7 +18,7 @@
#include "EthInterface.h" #include "EthInterface.h"
#include "WiFiInterface.h" #include "WiFiInterface.h"
#include "CellularBase.h" #include "CellularInterface.h"
#include "MeshInterface.h" #include "MeshInterface.h"
/* Weak default instance static classes for the various abstract classes. /* Weak default instance static classes for the various abstract classes.
@ -40,7 +40,7 @@ MBED_WEAK MeshInterface *MeshInterface::get_default_instance()
return get_target_default_instance(); return get_target_default_instance();
} }
MBED_WEAK CellularBase *CellularBase::get_default_instance() MBED_WEAK CellularInterface *CellularInterface::get_default_instance()
{ {
return get_target_default_instance(); return get_target_default_instance();
} }
@ -87,9 +87,9 @@ void WiFiInterface::set_default_parameters()
#endif #endif
} }
void CellularBase::set_default_parameters() void CellularInterface::set_default_parameters()
{ {
/* CellularBase is expected to attempt to work without any parameters - we /* CellularInterface is expected to attempt to work without any parameters - we
* will try, at least. * will try, at least.
*/ */
#ifdef MBED_CONF_NSAPI_DEFAULT_CELLULAR_APN #ifdef MBED_CONF_NSAPI_DEFAULT_CELLULAR_APN
@ -148,7 +148,7 @@ MBED_WEAK NetworkInterface *NetworkInterface::get_target_default_instance()
#elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == CELLULAR #elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == CELLULAR
MBED_WEAK NetworkInterface *NetworkInterface::get_target_default_instance() MBED_WEAK NetworkInterface *NetworkInterface::get_target_default_instance()
{ {
CellularBase *cellular = CellularBase::get_default_instance(); CellularInterface *cellular = CellularInterface::get_default_instance();
if (!cellular) { if (!cellular) {
return NULL; return NULL;
} }