NetworkSocketAPI

Dependencies:   DnsQuery

Dependents:   HelloWizFi250Interface

Fork of NetworkSocketAPI by NetworkSocketAPI

Revision:
88:6cfd38609828
Parent:
78:0914f9b9b24b
Child:
89:b1d417383c0d
--- a/WiFiInterface.h	Tue Apr 05 23:47:04 2016 +0000
+++ b/WiFiInterface.h	Wed Apr 06 13:50:19 2016 +0000
@@ -19,33 +19,33 @@
 
 #include "NetworkInterface.h"
 
+/** Enum for WiFi encryption types
+*/
+enum nsapi_security_t {
+    NSAPI_SECURITY_NONE = 0,   /*!< open access point */
+    NSAPI_SECURITY_WEP,        /*!< phrase conforms to WEP */
+    NSAPI_SECURITY_WPA,        /*!< phrase conforms to WPA */
+    NSAPI_SECURITY_WPA2,       /*!< phrase conforms to WPA2 */
+};
+
 /** WiFiInterface class
  *  Common interface that is shared between WiFi devices
  */
 class WiFiInterface : public NetworkInterface
 {
 public:
-    /** Enum for WiFi encryption types
-     */
-    enum security_t {
-        SECURITY_NONE = 0,   /*!< open access point */
-        SECURITY_WEP,        /*!< phrase conforms to WEP */
-        SECURITY_WPA,        /*!< phrase conforms to WPA */
-        SECURITY_WPA2,       /*!< phrase conforms to WPA2 */
-    };
-
     /** Start the interface
     /param ssid     Name of the network to connect to
     /param pass     Security passphrase to connect to the network
     /param security Type of encryption for connection
     /return         0 on success, negative on failure
     */
-    virtual int connect(const char *ssid, const char *pass, security_t security = SECURITY_NONE) = 0;
+    virtual int connect(const char *ssid, const char *pass, nsapi_security_t security = NSAPI_SECURITY_NONE) = 0;
 
     /** Stop the interface
     /return     0 on success, negative on failure
     */
-    virtual int32_t disconnect() = 0;
+    virtual int disconnect() = 0;
 };
 
 #endif