diff options
author | Matt Ranostay <matt.ranostay@konsulko.com> | 2017-08-08 19:22:58 -0700 |
---|---|---|
committer | Matt Ranostay <matt.ranostay@konsulko.com> | 2017-08-08 23:08:36 -0700 |
commit | 704266f16bb57155a7bd08f0956a8560e567a153 (patch) | |
tree | e1ef6c84395bdc3ae7c126c75dd7719935171519 /app/bluetooth/Bluetooth.qml | |
parent | a2c350866397ac6c9f07a78edd43eabe93d372c3 (diff) |
qml: bluetooth: update subscription to events
Update the subscription to bluetooth events to the new
more consistent format
Bug-AGL: SPEC-819
Change-Id: I4236ca5f018be42d58f474220c418354437721f4
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'app/bluetooth/Bluetooth.qml')
-rw-r--r-- | app/bluetooth/Bluetooth.qml | 57 |
1 files changed, 4 insertions, 53 deletions
diff --git a/app/bluetooth/Bluetooth.qml b/app/bluetooth/Bluetooth.qml index 71e3635..666069c 100644 --- a/app/bluetooth/Bluetooth.qml +++ b/app/bluetooth/Bluetooth.qml @@ -103,59 +103,10 @@ SettingPage { if (verb_str == "connect"){ WebSocket.sendTextMessage (request_str) } - - verb_str = "eventadd" - parameterJson = { - tag: 'device_updated', - name: 'device_updated' - } - sendSocketMesage(verb_str, parameterJson) - - verb_str = "eventsub" - parameterJson = { - tag: 'device_updated' - } - sendSocketMesage(verb_str, parameterJson) - - verb_str = "eventadd" - parameterJson = { - tag: 'device_added', - name: 'device_added' - } - sendSocketMesage(verb_str, parameterJson) - - verb_str = "eventsub" - parameterJson = { - tag: 'device_added' - } - sendSocketMesage(verb_str, parameterJson) - - verb_str = "eventadd" - parameterJson = { - tag: 'device_removed', - name: 'device_removed' - } - sendSocketMesage(verb_str, parameterJson) - - verb_str = "eventsub" - parameterJson = { - tag: 'device_removed' - } - sendSocketMesage(verb_str, parameterJson) - - verb_str = "eventadd" - parameterJson = { - tag: 'request_confirmation', - name: 'request_confirmation' - } - sendSocketMesage(verb_str, parameterJson) - - verb_str = "eventsub" - parameterJson = { - tag: 'request_confirmation' - } - sendSocketMesage(verb_str, parameterJson) - + sendSocketMesage("subscribe", { value: "device_updated" }) + sendSocketMesage("subscribe", { value: "device_added" }) + sendSocketMesage("subscribe", { value: "device_removed" }) + sendSocketMesage("subscribe", { value: "request_confirmation" }) } else if (websocket.status == WebSocket.Closed) { status_str = "Socket closed" } |