BBR 1 Ebene

Committer:
borlanic
Date:
Mon May 14 11:29:06 2018 +0000
Revision:
0:fbdae7e6d805
BBR

Who changed what in which revision?

UserRevisionLine numberNew contents of line
borlanic 0:fbdae7e6d805 1 /* CellularInterface
borlanic 0:fbdae7e6d805 2 * Copyright (c) 2015 ARM Limited
borlanic 0:fbdae7e6d805 3 *
borlanic 0:fbdae7e6d805 4 * Licensed under the Apache License, Version 2.0 (the "License");
borlanic 0:fbdae7e6d805 5 * you may not use this file except in compliance with the License.
borlanic 0:fbdae7e6d805 6 * You may obtain a copy of the License at
borlanic 0:fbdae7e6d805 7 *
borlanic 0:fbdae7e6d805 8 * http://www.apache.org/licenses/LICENSE-2.0
borlanic 0:fbdae7e6d805 9 *
borlanic 0:fbdae7e6d805 10 * Unless required by applicable law or agreed to in writing, software
borlanic 0:fbdae7e6d805 11 * distributed under the License is distributed on an "AS IS" BASIS,
borlanic 0:fbdae7e6d805 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
borlanic 0:fbdae7e6d805 13 * See the License for the specific language governing permissions and
borlanic 0:fbdae7e6d805 14 * limitations under the License.
borlanic 0:fbdae7e6d805 15 */
borlanic 0:fbdae7e6d805 16
borlanic 0:fbdae7e6d805 17 #ifndef CELLULAR_INTERFACE_H
borlanic 0:fbdae7e6d805 18 #define CELLULAR_INTERFACE_H
borlanic 0:fbdae7e6d805 19
borlanic 0:fbdae7e6d805 20 #include "netsocket/NetworkInterface.h"
borlanic 0:fbdae7e6d805 21
borlanic 0:fbdae7e6d805 22 /** CellularInterface class
borlanic 0:fbdae7e6d805 23 *
borlanic 0:fbdae7e6d805 24 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.
borlanic 0:fbdae7e6d805 25 *
borlanic 0:fbdae7e6d805 26 * Common interface that is shared between ethernet hardware
borlanic 0:fbdae7e6d805 27 * @addtogroup netsocket
borlanic 0:fbdae7e6d805 28 */
borlanic 0:fbdae7e6d805 29 class CellularInterface : public NetworkInterface
borlanic 0:fbdae7e6d805 30 {
borlanic 0:fbdae7e6d805 31 public:
borlanic 0:fbdae7e6d805 32 /** CellularInterface lifetime
borlanic 0:fbdae7e6d805 33 */
borlanic 0:fbdae7e6d805 34 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
borlanic 0:fbdae7e6d805 35 virtual ~CellularInterface() {};
borlanic 0:fbdae7e6d805 36
borlanic 0:fbdae7e6d805 37 /** Set the cellular network APN and credentials
borlanic 0:fbdae7e6d805 38 *
borlanic 0:fbdae7e6d805 39 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.
borlanic 0:fbdae7e6d805 40 *
borlanic 0:fbdae7e6d805 41 * @param apn Optional name of the network to connect to
borlanic 0:fbdae7e6d805 42 * @param username Optional username for the APN
borlanic 0:fbdae7e6d805 43 * @param password Optional password fot the APN
borlanic 0:fbdae7e6d805 44 * @return 0 on success, negative error code on failure
borlanic 0:fbdae7e6d805 45 */
borlanic 0:fbdae7e6d805 46 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
borlanic 0:fbdae7e6d805 47 virtual nsapi_error_t set_credentials(const char *apn,
borlanic 0:fbdae7e6d805 48 const char *username = 0, const char *password = 0) = 0;
borlanic 0:fbdae7e6d805 49
borlanic 0:fbdae7e6d805 50 /** Start the interface
borlanic 0:fbdae7e6d805 51 *
borlanic 0:fbdae7e6d805 52 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.
borlanic 0:fbdae7e6d805 53 *
borlanic 0:fbdae7e6d805 54 * @param apn Optional name of the network to connect to
borlanic 0:fbdae7e6d805 55 * @param username Optional username for your APN
borlanic 0:fbdae7e6d805 56 * @param password Optional password for your APN
borlanic 0:fbdae7e6d805 57 * @return 0 on success, negative error code on failure
borlanic 0:fbdae7e6d805 58 */
borlanic 0:fbdae7e6d805 59 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
borlanic 0:fbdae7e6d805 60 virtual nsapi_error_t connect(const char *apn,
borlanic 0:fbdae7e6d805 61 const char *username = 0, const char *password = 0) = 0;
borlanic 0:fbdae7e6d805 62
borlanic 0:fbdae7e6d805 63 /** Start the interface
borlanic 0:fbdae7e6d805 64 *
borlanic 0:fbdae7e6d805 65 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.
borlanic 0:fbdae7e6d805 66 *
borlanic 0:fbdae7e6d805 67 * Attempts to connect to a cellular network based on supplied credentials
borlanic 0:fbdae7e6d805 68 *
borlanic 0:fbdae7e6d805 69 * @return 0 on success, negative error code on failure
borlanic 0:fbdae7e6d805 70 */
borlanic 0:fbdae7e6d805 71 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
borlanic 0:fbdae7e6d805 72 virtual nsapi_error_t connect() = 0;
borlanic 0:fbdae7e6d805 73
borlanic 0:fbdae7e6d805 74 /** Stop the interface
borlanic 0:fbdae7e6d805 75 *
borlanic 0:fbdae7e6d805 76 * @deprecated This API will be deprecated in mbed-os-5.9. Use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.
borlanic 0:fbdae7e6d805 77 *
borlanic 0:fbdae7e6d805 78 * @return 0 on success, negative error code on failure
borlanic 0:fbdae7e6d805 79 */
borlanic 0:fbdae7e6d805 80 MBED_DEPRECATED_SINCE("mbed-os-5.9", "This API will be deprecated, use mbed-os/features/cellular/framework/API/CellularNetwork.h instead.")
borlanic 0:fbdae7e6d805 81 virtual nsapi_error_t disconnect() = 0;
borlanic 0:fbdae7e6d805 82 };
borlanic 0:fbdae7e6d805 83
borlanic 0:fbdae7e6d805 84
borlanic 0:fbdae7e6d805 85 #endif