summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMilan Srdinko <msrdinko@alps.cz>2017-02-13 16:34:44 +0100
committerMilan Srdinko <msrdinko@alps.cz>2017-03-17 12:15:13 +0100
commit3d17ff13b8a7fe9a2c60f815b1805ec619285b18 (patch)
tree86ff8687001fc784a8fa43c47d08c29b9d157e06 /app
parent13d17203d42320370d0253cfb68059fb4ee7f08a (diff)
WiFi: add event unsubscribe/delete on Wi-Fi disable
Change-Id: I2b3c74fc24b57c6152f105ff7bd8b090d9dad155 Signed-off-by: Milan Srdinko <msrdinko@alps.cz>
Diffstat (limited to 'app')
-rw-r--r--app/wifi/Wifi.qml27
1 files changed, 26 insertions, 1 deletions
diff --git a/app/wifi/Wifi.qml b/app/wifi/Wifi.qml
index 3bf4774..f3871a6 100644
--- a/app/wifi/Wifi.qml
+++ b/app/wifi/Wifi.qml
@@ -185,7 +185,8 @@ SettingPage {
} else if (websocket.status == WebSocket.Closed) {
status_str = "Socket closed"
- //TODO: unsubscribe for events
+ console.log("Socket closed, bye.")
+
}
console.log(status_str)
@@ -207,6 +208,30 @@ SettingPage {
var parameterJson = 'None'
sendSocketMesage(verb_str, parameterJson)
+
+ verb_str = "eventunsub"
+ parameterJson = {
+ tag: 'password'
+ }
+ sendSocketMesage(verb_str, parameterJson)
+
+ verb_str = "eventdel"
+ parameterJson = {
+ tag: 'password'
+ }
+ sendSocketMesage(verb_str, parameterJson)
+
+ verb_str = "eventunsub"
+ parameterJson = {
+ tag: 'networkList'
+ }
+ sendSocketMesage(verb_str, parameterJson)
+
+ verb_str = "eventdel"
+ parameterJson = {
+ tag: 'networkList'
+ }
+
websocket.active = false
}