[polari/wip/fmuellner/iface-cleanup: 2/2] telepathyClient: Use template strings for interface description




commit 8ad44ac69c8e324b1bf47aca0600868cc2442e52
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Aug 31 14:39:35 2018 +0200

    telepathyClient: Use template strings for interface description
    
    It's a tad bit cleaner as it doesn't require line-end escaping.
    
    https://gitlab.gnome.org/GNOME/polari/merge_requests/67

 src/telepathyClient.js | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)
---
diff --git a/src/telepathyClient.js b/src/telepathyClient.js
index c8992c6a..3e2f00b9 100644
--- a/src/telepathyClient.js
+++ b/src/telepathyClient.js
@@ -29,24 +29,25 @@ Gio._promisify(Tp.TextChannel.prototype,
 
 const SHELL_CLIENT_PREFIX = 'org.freedesktop.Telepathy.Client.GnomeShell';
 
-const SASLAuthenticationIface = '<node> \
-<interface name="org.freedesktop.Telepathy.Channel.Interface.SASLAuthentication"> \
-<method name="StartMechanismWithData"> \
-    <arg type="s" direction="in" name="mechanism" /> \
-    <arg type="ay" direction="in" name="data" /> \
-</method> \
-<method name="AcceptSASL"/> \
-<method name="AbortSASL"> \
-    <arg type="u" direction="in" name="reason"/> \
-    <arg type="s" direction="in" name="debug-message"/> \
-</method> \
-<signal name="SASLStatusChanged"> \
-    <arg name="status" type="u" /> \
-    <arg name="reason" type="s" /> \
-    <arg name="details" type="a{sv}" /> \
-</signal> \
-</interface> \
-</node>';
+const SASLAuthenticationIface = `
+<node>
+<interface name="org.freedesktop.Telepathy.Channel.Interface.SASLAuthentication">
+  <method name="StartMechanismWithData">
+    <arg type="s" direction="in" name="mechanism" />
+    <arg type="ay" direction="in" name="data" />
+  </method>
+  <method name="AcceptSASL"/>
+  <method name="AbortSASL">
+    <arg type="u" direction="in" name="reason"/>
+    <arg type="s" direction="in" name="debug-message"/>
+  </method>
+  <signal name="SASLStatusChanged">
+    <arg name="status" type="u" />
+    <arg name="reason" type="s" />
+    <arg name="details" type="a{sv}" />
+  </signal>
+</interface>
+</node>`;
 let SASLAuthProxy = Gio.DBusProxy.makeProxyWrapper(SASLAuthenticationIface);
 
 const SASLStatus = {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]