NetworkSocketAPI
Dependents: HelloWizFi250Interface
Fork of NetworkSocketAPI by
Revision 88:6cfd38609828, committed 2016-04-06
- Comitter:
- geky
- Date:
- Wed Apr 06 13:50:19 2016 +0000
- Parent:
- 87:94e2cf3a06be
- Child:
- 89:b1d417383c0d
- Commit message:
- Refactored WiFi enum
Changed in this revision
WiFiInterface.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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