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




commit b6e0961ab3b92f2b1c63537c7af1f6d8e61c1898
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]