binding: bluetooth: update subscription to events 75/10575/1
authorMatt Ranostay <matt.ranostay@konsulko.com>
Wed, 9 Aug 2017 05:39:56 +0000 (22:39 -0700)
committerMatt Ranostay <matt.ranostay@konsulko.com>
Wed, 9 Aug 2017 05:43:52 +0000 (22:43 -0700)
Update the subscription to bluetooth events to the new
more consistent format

Bug-AGL: SPEC-819
Change-Id: I3a89f2db804794b31321a958a09d9c8a021e8b8e
Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
app/api/BluetoothManager.qml

index 514a395..f102fe2 100644 (file)
@@ -144,10 +144,8 @@ WebSocket {
         switch (status) {
             case WebSocket.Open:
             console.debug("onStatusChanged: Open")
-            sendSocketMessage("eventadd", { "tag" : "device_updated", "name" : "device_updated" })
-            sendSocketMessage("eventsub", { "tag" : "device_updated" })
-            sendSocketMessage("eventadd", { "tag" : "connection", "name" : "connection" })
-            sendSocketMessage("eventsub", { "tag" : "connection" })
+            sendSocketMessage("subscribe", { value : "device_updated" })
+            sendSocketMessage("subscribe", { value : "connection" })
             sendSocketMessage("discovery_result", 'None')
             break
             case WebSocket.Error: