zhang chenhong / Mbed 2 deprecated IDW01M1_Cloud_IBM

Dependencies:   mbed Servo X_NUCLEO_IKS01A2 X_NUCLEO_IDW01M1v2 NetworkSocketAPI NDefLib MQTT

Committer:
mridup
Date:
Fri Apr 08 12:07:17 2016 +0000
Revision:
0:cbf8bc43bc9e
changes for optimization in Keil compiler

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mridup 0:cbf8bc43bc9e 1 /* NetworkInterface Base Class
mridup 0:cbf8bc43bc9e 2 * Copyright (c) 2015 ARM Limited
mridup 0:cbf8bc43bc9e 3 *
mridup 0:cbf8bc43bc9e 4 * Licensed under the Apache License, Version 2.0 (the "License");
mridup 0:cbf8bc43bc9e 5 * you may not use this file except in compliance with the License.
mridup 0:cbf8bc43bc9e 6 * You may obtain a copy of the License at
mridup 0:cbf8bc43bc9e 7 *
mridup 0:cbf8bc43bc9e 8 * http://www.apache.org/licenses/LICENSE-2.0
mridup 0:cbf8bc43bc9e 9 *
mridup 0:cbf8bc43bc9e 10 * Unless required by applicable law or agreed to in writing, software
mridup 0:cbf8bc43bc9e 11 * distributed under the License is distributed on an "AS IS" BASIS,
mridup 0:cbf8bc43bc9e 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
mridup 0:cbf8bc43bc9e 13 * See the License for the specific language governing permissions and
mridup 0:cbf8bc43bc9e 14 * limitations under the License.
mridup 0:cbf8bc43bc9e 15 */
mridup 0:cbf8bc43bc9e 16
mridup 0:cbf8bc43bc9e 17 #include "NetworkInterface.h"
mridup 0:cbf8bc43bc9e 18 #include "DnsQuery.h"
mridup 0:cbf8bc43bc9e 19
mridup 0:cbf8bc43bc9e 20
mridup 0:cbf8bc43bc9e 21 bool NetworkInterface::isConnected()
mridup 0:cbf8bc43bc9e 22 {
mridup 0:cbf8bc43bc9e 23 return getIPAddress() != 0;
mridup 0:cbf8bc43bc9e 24 }
mridup 0:cbf8bc43bc9e 25
mridup 0:cbf8bc43bc9e 26 int32_t NetworkInterface::getHostByName(const char *name, char *ip)
mridup 0:cbf8bc43bc9e 27 {
mridup 0:cbf8bc43bc9e 28 return dnsQuery(this, name, ip);
mridup 0:cbf8bc43bc9e 29 }