]> git.0d.be Git - empathy.git/commitdiff
Renaming: use tp-glib API instead of generating it as an extension
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 4 Feb 2014 12:42:08 +0000 (13:42 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Tue, 4 Feb 2014 12:43:00 +0000 (13:43 +0100)
extensions/Connection_Interface_Renaming.xml [deleted file]
extensions/Makefile.am
extensions/misc.xml
libempathy-gtk/empathy-chat.c

diff --git a/extensions/Connection_Interface_Renaming.xml b/extensions/Connection_Interface_Renaming.xml
deleted file mode 100644 (file)
index d08b748..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" ?>
-<node name="/Connection_Interface_Renaming" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
-  <tp:copyright> Copyright (C) 2005, 2006 Collabora Limited </tp:copyright>
-  <tp:copyright> Copyright (C) 2005, 2006 Nokia Corporation </tp:copyright>
-  <tp:copyright> Copyright (C) 2006 INdT </tp:copyright>
-  <tp:license xmlns="http://www.w3.org/1999/xhtml">
-    <p>This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.</p>
-
-<p>This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-Lesser General Public License for more details.</p>
-
-<p>You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.</p>
-  </tp:license>
-  <interface name="org.freedesktop.Telepathy.Connection.Interface.Renaming"
-    tp:causes-havoc='not well-tested'>
-    <tp:requires interface="org.freedesktop.Telepathy.Connection"/>
-    <signal name="Renamed" tp:name-for-bindings="Renamed">
-      <arg name="Original" type="u" tp:type="Contact_Handle">
-        <tp:docstring>
-          The handle of the original identifier
-        </tp:docstring>
-      </arg>
-      <arg name="New" type="u" tp:type="Contact_Handle">
-        <tp:docstring>
-          The handle of the new identifier
-        </tp:docstring>
-      </arg>
-      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-        <p>Emitted when the unique identifier of a contact on the server
-          changes.</p>
-
-        <p>Any channels associated with the contact's original handle will
-          continue to be to that handle, and so are no longer useful (unless
-          the contact renames back, or another contact connects with that
-          unique ID). Clients may open a similar channel associated with the
-          new handle to continue communicating with the contact.</p>
-
-        <p>For example, if a GUI client associates text
-          channels with chat windows, it should detach the old channel
-          from the chat window, closing it, and associate a channel to the
-          new handle with the same window.</p>
-
-        <p>If the contact's old handle is in any of the member lists of
-          a channel which has the groups interface, it will be removed from
-          the channel and the new handle will be added. The resulting
-          <tp:dbus-ref
-            namespace="org.freedesktop.Telepathy.Channel.Interface.Group">MembersChanged</tp:dbus-ref>
-          signal must be emitted <em>after</em> the
-          <tp:member-ref>Renamed</tp:member-ref> signal; the reason should be
-          RENAMED.
-        </p>
-
-        <p>The handles may be either general-purpose or channel-specific.
-          If the original handle is general-purpose, the new handle must be
-          general-purpose; if the original handle is channel-specific, the
-          new handle must be channel-specific in the same channel.
-        </p>
-      </tp:docstring>
-    </signal>
-    <method name="RequestRename" tp:name-for-bindings="Request_Rename">
-      <arg direction="in" name="Identifier" type="s">
-        <tp:docstring>
-          The desired identifier
-        </tp:docstring>
-      </arg>
-      <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
-        <p>Request that the user's own identifier is changed on the server.
-          If successful, a <tp:member-ref>Renamed</tp:member-ref> signal will
-          be emitted for the current "self handle" as returned by <tp:dbus-ref
-            namespace="org.freedesktop.Telepathy.Connection">GetSelfHandle</tp:dbus-ref>.</p>
-        <p>It is protocol-dependent how the identifier that's actually
-          used will be derived from the supplied identifier; some sort of
-          normalization might take place.</p>
-      </tp:docstring>
-      <tp:possible-errors>
-        <tp:error name="org.freedesktop.Telepathy.Error.Disconnected"/>
-        <tp:error name="org.freedesktop.Telepathy.Error.NetworkError"/>
-        <tp:error name="org.freedesktop.Telepathy.Error.NotAvailable"/>
-        <tp:error name="org.freedesktop.Telepathy.Error.InvalidArgument"/>
-        <tp:error name="org.freedesktop.Telepathy.Error.PermissionDenied"/>
-      </tp:possible-errors>
-    </method>
-    <tp:docstring>
-      An interface on connections to support protocols where the unique
-    identifiers of contacts can change. Because handles are immutable,
-    this is represented by a pair of handles, that representing the
-    old name, and that representing the new one.
-    </tp:docstring>
-  </interface>
-</node>
-<!-- vim:set sw=2 sts=2 et ft=xml: -->
index f72c407c0a2a98bc62f1bd6aad55e2255b2ff78a..2ec034c4d8098e34f1cc6234663b255e3be438e5 100644 (file)
@@ -13,7 +13,6 @@ EXTRA_DIST = \
     generic-types.xml \
     misc.xml \
     Logger.xml \
-    Connection_Interface_Renaming.xml \
     Channel_Interface_Credentials_Storage.xml \
     Chat_Manager.xml \
     $(NULL)
index f2f15b03fc1e948f639f88311dd5800c8a1e6006..b6247c95159f06263f2f870ac5f9114e03508d9b 100644 (file)
@@ -6,7 +6,6 @@
 
 <xi:include href="Logger.xml" />
 <xi:include href="Chat_Manager.xml" />
-<xi:include href="Connection_Interface_Renaming.xml" />
 <xi:include href="Channel_Interface_Credentials_Storage.xml" />
 
 </tp:spec>
index 35f908b7b9420385274af259715f6597b10e75af..2b5657e8e49d1e219247e50458f216eb927edd92 100644 (file)
@@ -51,7 +51,6 @@
 #include "empathy-theme-manager.h"
 #include "empathy-ui-utils.h"
 #include "empathy-utils.h"
-#include "extensions.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CHAT
 #include "empathy-debug.h"
@@ -761,7 +760,7 @@ nick_command_supported (EmpathyChat *chat)
 
        connection = tp_channel_get_connection (TP_CHANNEL (priv->tp_chat));
        return tp_proxy_has_interface_by_id (connection,
-               EMP_IFACE_QUARK_CONNECTION_INTERFACE_RENAMING);
+               TP_IFACE_QUARK_CONNECTION_INTERFACE_RENAMING);
 }
 
 static gboolean
@@ -888,7 +887,7 @@ chat_command_msg (EmpathyChat *chat,
 }
 
 static void
-callback_for_request_rename (TpProxy *proxy,
+callback_for_request_rename (TpConnection *conn,
                  const GError *error,
                  gpointer user_data,
                  GObject *weak_object)
@@ -903,11 +902,11 @@ chat_command_nick (EmpathyChat *chat,
                   GStrv        strv)
 {
        EmpathyChatPriv *priv = GET_PRIV (chat);
-       TpProxy *proxy;
+       TpConnection *conn;
 
-       proxy = TP_PROXY (tp_account_get_connection (priv->account));
+       conn = tp_account_get_connection (priv->account);
 
-       emp_cli_connection_interface_renaming_call_request_rename (proxy, -1,
+       tp_cli_connection_interface_renaming_call_request_rename (conn, -1,
                strv[1], callback_for_request_rename, NULL, NULL, NULL);
 }