Skip to content

CellularBase -> CellularInterface tidy #10146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions features/netsocket/CellularBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
#ifndef CELLULAR_BASE_H
#define CELLULAR_BASE_H

#include "CellularInterface.h"

/**
* This class is deprecated and will be removed altogether after expiration of
* deprecation notice.
* @deprecated Migrated to CellularInterface
*/
#include "CellularInterface.h"

MBED_DEPRECATED_SINCE("mbed-os-5.12", "Migrated to CellularInterface")
typedef CellularInterface CellularBase;

Expand Down
7 changes: 4 additions & 3 deletions features/netsocket/NetworkInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class NetworkInterface: public DNS {
* target.network-default-interface-type or other overrides.
*
* 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.
*
* The default behavior is to return the default interface for the
Expand Down Expand Up @@ -340,9 +340,10 @@ class NetworkInterface: public DNS {

/** Return pointer to a CellularInterface.
* @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")
virtual CellularInterface *cellularBase()
MBED_DEPRECATED_SINCE("mbed-os-5.12", "CellularBase migrated to CellularInterface - use cellularInterface()")
virtual CellularInterface *cellularBase() // virtual retained for binary compatibility
{
return 0;
}
Expand Down
10 changes: 5 additions & 5 deletions features/netsocket/NetworkInterfaceDefaults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "EthInterface.h"
#include "WiFiInterface.h"
#include "CellularBase.h"
#include "CellularInterface.h"
#include "MeshInterface.h"

/* Weak default instance static classes for the various abstract classes.
Expand All @@ -40,7 +40,7 @@ MBED_WEAK MeshInterface *MeshInterface::get_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();
}
Expand Down Expand Up @@ -87,9 +87,9 @@ void WiFiInterface::set_default_parameters()
#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.
*/
#ifdef MBED_CONF_NSAPI_DEFAULT_CELLULAR_APN
Expand Down Expand Up @@ -148,7 +148,7 @@ MBED_WEAK NetworkInterface *NetworkInterface::get_target_default_instance()
#elif MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE == CELLULAR
MBED_WEAK NetworkInterface *NetworkInterface::get_target_default_instance()
{
CellularBase *cellular = CellularBase::get_default_instance();
CellularInterface *cellular = CellularInterface::get_default_instance();
if (!cellular) {
return NULL;
}
Expand Down