-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor/abstract Wifi classes #1802
Conversation
@mikee47 Can you check the issues reported by Codacy? |
d9f4f76
to
07302c8
Compare
@slaff If you're happy with this PR in general, there are some more breaking changes I'd like to implement, such as changing: change change and so on. The smartconfig stuff also needs rework. This will break existing applications, but the alternative is to add additional delegates and deprecate the old ones. |
Let's go with the breaking changes. Of course we should describe them in our migration document. |
* Use `addElement(BssInfo*)` instead of `add(BssInfo&)` to avoid additional copy operation * Make methods const as appropriate * coding style
…rn `String` instead of `const char*`
* Tested with ENABLE_WPS=1, requires ENABLE_ESPCONN * `getConnectionStatusName()` returns String instead of `char*` * Add `getMacAddr` method * Replace static methods with lambdas * Add list of AP's for Host * Add `ENABLE_SMART_CONFIG` * Add check to host for WPS/SmartConfig (not supported) * Rename `EStationConnectionStatus` -> `StationConnectionStatus` * Add `WpsStatus` enumerated type
* Add list of AP's for Host * Add check to host for WPS/SmartConfig (not supported)
07302c8
to
dfcf34b
Compare
@mikee47 Ping me when the PR is ready and tested on your device(s). |
@slaff Yes, tested with HttpServer_ConfigNetwork sample, Basic_SmartConfig. |
The
StationClass
,WifiEventsClass
andAccessPointClass
classes are now virtual base classes.The actual arch-specific implementations are
StationImpl
,WifiEventsImpl
andAccessPointImpl
.Breaking changes:
getConnectionStatusName()
andgetAuthorizationMethodName()
returnString
instead ofconst char*
MACAddress
class for bssids, etc. plus const references and enumerated types.Esp8266 'StationImpl':
addElement(BssInfo*)
instead ofadd(BssInfo&)
to avoid additional copy operationgetMacAddr
method to retrieve raw MAC addressAdded dependencies:
Host updates: