From 16e8b77474d0f243281fb12060ac867743bef259 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teppo=20J=C3=A4rvelin?= Date: Tue, 13 Mar 2018 13:09:36 +0200 Subject: [PATCH] PR review findings, updated deprecated comments. --- features/netsocket/CellularInterface.h | 10 +++--- .../OnboardCellularInterface.h | 12 +++---- .../PPPCellularInterface.h | 34 +++++++++---------- .../UARTCellularInterface.h | 6 ++-- 4 files changed, 31 insertions(+), 31 deletions(-) diff --git a/features/netsocket/CellularInterface.h b/features/netsocket/CellularInterface.h index cfcf2dd4c5..3905530f19 100644 --- a/features/netsocket/CellularInterface.h +++ b/features/netsocket/CellularInterface.h @@ -29,7 +29,7 @@ class CellularInterface : public NetworkInterface public: /** CellularInterface lifetime */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") virtual ~CellularInterface() {}; /** Set the cellular network APN and credentials @@ -39,7 +39,7 @@ public: * @param password Optional password fot the APN * @return 0 on success, negative error code on failure */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") virtual nsapi_error_t set_credentials(const char *apn, const char *username = 0, const char *password = 0) = 0; @@ -50,7 +50,7 @@ public: * @param password Optional password for your APN * @return 0 on success, negative error code on failure */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") virtual nsapi_error_t connect(const char *apn, const char *username = 0, const char *password = 0) = 0; @@ -60,14 +60,14 @@ public: * * @return 0 on success, negative error code on failure */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") virtual nsapi_error_t connect() = 0; /** Stop the interface * * @return 0 on success, negative error code on failure */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.") virtual nsapi_error_t disconnect() = 0; }; diff --git a/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.h b/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.h index 140ef02440..1bc30b4bc7 100644 --- a/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.h +++ b/features/netsocket/cellular/generic_modem_driver/OnboardCellularInterface.h @@ -37,10 +37,10 @@ class OnboardCellularInterface : public UARTCellularInterface { public: - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") OnboardCellularInterface(bool debug = false); - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") virtual ~OnboardCellularInterface(); protected: @@ -49,7 +49,7 @@ protected: * modem_init() is equivalent to plugging in the device, for example, attaching power and serial port. * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") virtual void modem_init(); /** Sets the modem in unplugged state @@ -58,7 +58,7 @@ protected: * and serial port. This puts the modem in lowest power state. * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") virtual void modem_deinit(); /** Powers up the modem @@ -67,7 +67,7 @@ protected: * The driver may repeat this if the modem is not responsive to AT commands. * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") virtual void modem_power_up(); /** Powers down the modem @@ -75,7 +75,7 @@ protected: * modem_power_down() is equivalent to turning off the modem by button press. * Uses onboard_modem_api.h where the target provides the implementation of onboard_modem_api. */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularPower.h instead.") virtual void modem_power_down(); }; diff --git a/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.h b/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.h index 309f2fd11e..d14a937833 100644 --- a/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.h +++ b/features/netsocket/cellular/generic_modem_driver/PPPCellularInterface.h @@ -109,10 +109,10 @@ public: * The file handle pointer is not accessed within the constructor, only recorded for later * use - this permits a derived class to pass a pointer to a not-yet-constructed member object. */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") PPPCellularInterface(FileHandle *fh, bool debug = false); - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual ~PPPCellularInterface(); /** Set the Cellular network credentials @@ -123,7 +123,7 @@ public: * @param uname optionally, Username * @param pwd optionally, password */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual void set_credentials(const char *apn, const char *uname = 0, const char *pwd = 0); @@ -131,7 +131,7 @@ public: * * @param sim_pin PIN for the SIM card */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual void set_sim_pin(const char *sim_pin); /** Start the interface @@ -149,7 +149,7 @@ public: * @param pwd optionally, password * @return NSAPI_ERROR_OK on success, or negative error code on failure */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual nsapi_error_t connect(const char *sim_pin, const char *apn = 0, const char *uname = 0, const char *pwd = 0); @@ -173,7 +173,7 @@ public: * Preferred method is to setup APN using 'set_credentials()' API. * @return 0 on success, negative error code on failure */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual nsapi_error_t connect(); /** Attempt to disconnect from the network @@ -183,7 +183,7 @@ public: * * @return 0 on success, negative error code on failure */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual nsapi_error_t disconnect(); /** Adds or removes a SIM facility lock @@ -196,7 +196,7 @@ public: * @param set can be set to true if the SIM pin check is supposed to be enabled * and vice versa. */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") void set_sim_pin_check(bool set); /** Change the pin for the SIM card @@ -207,7 +207,7 @@ public: * * @param new_pin new pin to be used in string format */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") void set_new_sim_pin(const char *new_pin); /** Check if the connection is currently established or not @@ -216,7 +216,7 @@ public: * connected to an external packet data network using PPP, isConnected() * API returns true and false otherwise. */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual bool is_connected(); /** Get the local IP address @@ -224,7 +224,7 @@ public: * @return Null-terminated representation of the local IP address * or null if no IP address has been recieved */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual const char *get_ip_address(); /** Get the local network mask @@ -232,7 +232,7 @@ public: * @return Null-terminated representation of the local network mask * or null if no network mask has been recieved */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual const char *get_netmask(); /** Get the local gateways @@ -240,7 +240,7 @@ public: * @return Null-terminated representation of the local gateway * or null if no network mask has been recieved */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual const char *get_gateway(); @@ -248,21 +248,21 @@ public: * * @param on set true to enable debug traces */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") void modem_debug_on(bool on); /** Register callback for status reporting * * @param status_cb The callback for status changes */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual void attach(Callback status_cb); /** Get the connection status * * @return The connection status according to nsapi_connection_status_t */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual nsapi_connection_status_t get_connection_status() const; /** Set blocking status of connect() which by default should be blocking @@ -270,7 +270,7 @@ public: * @param blocking true if connect is blocking * @return 0 on success, negative error code on failure */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual nsapi_error_t set_blocking(bool blocking); private: diff --git a/features/netsocket/cellular/generic_modem_driver/UARTCellularInterface.h b/features/netsocket/cellular/generic_modem_driver/UARTCellularInterface.h index b1f4748e61..0d5e611be8 100644 --- a/features/netsocket/cellular/generic_modem_driver/UARTCellularInterface.h +++ b/features/netsocket/cellular/generic_modem_driver/UARTCellularInterface.h @@ -34,13 +34,13 @@ class UARTCellularInterface : public PPPCellularInterface { public: - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") UARTCellularInterface(PinName tx, PinName rx, PinName dcd = NC, PinName rts = NC, PinName cts = NC, PinName ri = NC, PinName dtr = NC, PinName dsr = NC, int baud = MBED_CONF_PPP_CELL_IFACE_BAUD_RATE, bool active_high = false, bool debug = false); - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual ~UARTCellularInterface(); private: @@ -56,7 +56,7 @@ protected: * signaling is not desired. enable_hup() controls whether this function should be * active. */ - MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API instead.") + MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/easy_cellular/EasyCellularConnection.h instead.") virtual void enable_hup(bool enable); };