-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from omert08/getstatus_development
It gives feedback in case provisioning is successful or failed.
- Loading branch information
Showing
6 changed files
with
144 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
enum WifiConnectionState { | ||
Connected, | ||
Connecting, | ||
Disconnected, | ||
ConnectionFailed, | ||
} | ||
|
||
enum WifiConnectFailedReason { | ||
AuthError, | ||
NetworkNotFound, | ||
} | ||
|
||
class ConnectionStatus { | ||
ConnectionStatus({ | ||
this.state, | ||
this.ip, | ||
this.failedReason, | ||
}); | ||
|
||
final WifiConnectionState state; | ||
final String ip; | ||
final WifiConnectFailedReason failedReason; | ||
} | ||
|
||
class WifiAP { | ||
const WifiAP({ | ||
this.ssid, | ||
this.rssi, | ||
this.active = false, | ||
this.private = true, | ||
}); | ||
|
||
final String ssid; | ||
final int rssi; | ||
final bool active; | ||
final bool private; | ||
|
||
int compareTo(WifiAP other) { | ||
if (rssi > other.rssi) { | ||
return -1; | ||
} | ||
if (rssi == other.rssi) { | ||
return 0; | ||
} | ||
return 1; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters