From cccfc7facafa7a532dab7cbfd94698b4f7a0d4bd Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Mon, 5 Mar 2018 21:03:20 +0100 Subject: [PATCH] thunderbolt: adapt to bolt 0.2 interface changes All enums are now strings on the bus. Also the Device.Security property is gnome. Some new properties got added instead. --- js/ui/status/thunderbolt.js | 42 +++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/js/ui/status/thunderbolt.js b/js/ui/status/thunderbolt.js index 3fa244541..e12131302 100644 --- a/js/ui/status/thunderbolt.js +++ b/js/ui/status/thunderbolt.js @@ -19,8 +19,8 @@ const BoltClientInterface = ' \ \ \ \ - \ - \ + \ + \ \ \ \ @@ -34,13 +34,17 @@ const BoltDeviceInterface = ' \ \ \ \ - \ - \ - \ + \ + \ \ + \ \ - \ - \ + \ + \ + \ + \ + \ + \ \ '; @@ -50,23 +54,25 @@ const BoltDeviceProxy = Gio.DBusProxy.makeProxyWrapper(BoltDeviceInterface); /* */ var Status = { - DISCONNECTED: 0, - CONNECTED: 1, - AUTHORIZING: 2, - AUTH_ERROR: 3, - AUTHORIZED: 4, - AUTHORIZED_SECURE: 5, - AUTHORIZED_NEWKY: 6 + DISCONNECTED: 'disconnected', + CONNECTED: 'connected', + AUTHORIZING: 'authorizing', + AUTH_ERROR: 'auth-error', + AUTHORIZED: 'authorized', + AUTHORIZED_SECURE: 'authorized-secure', + AUTHORIZED_NEWKEY: 'authorized-newkey' }; var Policy = { - DEFAULT: 0, - MANUAL: 1, - AUTO:2 + DEFAULT: 'default', + MANUAL: 'manual', + AUTO: 'auto' }; var AuthFlags = { - NONE: 0, + NONE: 'none', +}; + }; const BOLT_DBUS_NAME = 'org.freedesktop.bolt';