[next] telepathy-glib: remove tp_channel_manager_request_channel()

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Wed Jan 29 03:02:21 PST 2014


Module: telepathy-glib
Branch: next
Commit: ee165aad6dc32f04ee54a4957ab79760248b4ff8
URL:    http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=ee165aad6dc32f04ee54a4957ab79760248b4ff8

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Mon Jan 27 17:01:53 2014 +0100

remove tp_channel_manager_request_channel()

RequestChannel() has been removed.

---

 .../telepathy-glib/telepathy-glib-sections.txt     |    1 -
 examples/cm/call/call-manager.c                    |    3 --
 examples/cm/channelspecific/room-manager.c         |    2 --
 examples/cm/echo-message-parts/im-manager.c        |    2 --
 telepathy-glib/channel-manager.c                   |   38 +-------------------
 telepathy-glib/channel-manager.h                   |    5 ---
 telepathy-glib/simple-password-manager.c           |    1 -
 tests/lib/echo-im-manager.c                        |    2 --
 tests/lib/simple-channel-manager.c                 |    1 -
 9 files changed, 1 insertion(+), 54 deletions(-)

diff --git a/docs/reference/telepathy-glib/telepathy-glib-sections.txt b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
index 5246860..3d5150e 100644
--- a/docs/reference/telepathy-glib/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
@@ -136,7 +136,6 @@ tp_channel_manager_ensure_channel
 tp_channel_manager_foreach_channel
 tp_channel_manager_foreach_channel_class
 tp_channel_manager_type_foreach_channel_class
-tp_channel_manager_request_channel
 <SUBSECTION Standard>
 TP_CHANNEL_MANAGER
 TP_IS_CHANNEL_MANAGER
diff --git a/examples/cm/call/call-manager.c b/examples/cm/call/call-manager.c
index 1cdfb07..77713a5 100644
--- a/examples/cm/call/call-manager.c
+++ b/examples/cm/call/call-manager.c
@@ -535,7 +535,4 @@ channel_manager_iface_init (gpointer g_iface,
     example_call_manager_type_foreach_channel_class;
   iface->create_channel = example_call_manager_create_channel;
   iface->ensure_channel = example_call_manager_ensure_channel;
-  /* In this channel manager, RequestChannel is not supported; Call is not
-   * designed to work with the old RequestChannel API. */
-  iface->request_channel = NULL;
 }
diff --git a/examples/cm/channelspecific/room-manager.c b/examples/cm/channelspecific/room-manager.c
index 973065b..6aa6a48 100644
--- a/examples/cm/channelspecific/room-manager.c
+++ b/examples/cm/channelspecific/room-manager.c
@@ -380,6 +380,4 @@ channel_manager_iface_init (gpointer g_iface,
       example_csh_room_manager_type_foreach_channel_class;
   iface->create_channel = example_csh_room_manager_create_channel;
   iface->ensure_channel = example_csh_room_manager_ensure_channel;
-  /* In this channel manager, Request has the same semantics as Ensure */
-  iface->request_channel = example_csh_room_manager_ensure_channel;
 }
diff --git a/examples/cm/echo-message-parts/im-manager.c b/examples/cm/echo-message-parts/im-manager.c
index e08d350..cdce887 100644
--- a/examples/cm/echo-message-parts/im-manager.c
+++ b/examples/cm/echo-message-parts/im-manager.c
@@ -372,6 +372,4 @@ channel_manager_iface_init (gpointer g_iface,
   iface->type_foreach_channel_class = example_echo_2_im_manager_type_foreach_channel_class;
   iface->create_channel = example_echo_2_im_manager_create_channel;
   iface->ensure_channel = example_echo_2_im_manager_ensure_channel;
-  /* In this channel manager, Request has the same semantics as Ensure */
-  iface->request_channel = example_echo_2_im_manager_ensure_channel;
 }
diff --git a/telepathy-glib/channel-manager.c b/telepathy-glib/channel-manager.c
index 3cffd30..2462b68 100644
--- a/telepathy-glib/channel-manager.c
+++ b/telepathy-glib/channel-manager.c
@@ -122,8 +122,7 @@
  *  Telepathy client. The hash table will be freed after the function returns;
  *  if the channel manager wants to keep it around, it must copy it.
  *
- * Signature of an implementation of #TpChannelManagerIface.create_channel and
- * #TpChannelManagerIface.request_channel.
+ * Signature of an implementation of #TpChannelManagerIface.create_channel.
  *
  * Implementations should inspect the contents of @request_properties to see if
  * it matches a channel class handled by this manager.  If so, they should
@@ -175,9 +174,6 @@
  * @create_channel: Respond to a request for a new channel made with the
  *  Connection.Interface.Requests.CreateChannel method. See
  *  #TpChannelManagerRequestFunc for details.
- * @request_channel: Respond to a request for a (new or existing) channel made
- *  with the Connection.RequestChannel method. See #TpChannelManagerRequestFunc
- *  for details.
  * @ensure_channel: Respond to a request for a (new or existing) channel made
  *  with the Connection.Interface.Requests.EnsureChannel method. See
  *  #TpChannelManagerRequestFunc for details.
@@ -653,38 +649,6 @@ tp_channel_manager_create_channel (TpChannelManager *manager,
 
 
 /**
- * tp_channel_manager_request_channel:
- * @manager: An object implementing #TpChannelManager
- * @request: A #TpChannelManagerRequest representing this pending request.
- * @request_properties: A table mapping (const gchar *) property names to
- *  GValue, representing the desired properties of a channel requested by a
- *  Telepathy client.
- *
- * Offers an incoming RequestChannel call to @manager.
- *
- * Returns: %TRUE if this request will be handled by @manager; else %FALSE.
- *
- * Since: 0.7.15
- */
-gboolean
-tp_channel_manager_request_channel (TpChannelManager *manager,
-    TpChannelManagerRequest *request,
-    GHashTable *request_properties)
-{
-  TpChannelManagerIface *iface = TP_CHANNEL_MANAGER_GET_INTERFACE (
-      manager);
-  TpChannelManagerRequestFunc method = iface->request_channel;
-
-  /* A missing implementation is equivalent to one that always returns FALSE,
-   * meaning "can't do that, ask someone else" */
-  if (method != NULL)
-    return method (manager, request, request_properties);
-  else
-    return FALSE;
-}
-
-
-/**
  * tp_channel_manager_ensure_channel:
  * @manager: An object implementing #TpChannelManager
  * @request: A #TpChannelManagerRequest representing this pending request.
diff --git a/telepathy-glib/channel-manager.h b/telepathy-glib/channel-manager.h
index ee97938..133ca38 100644
--- a/telepathy-glib/channel-manager.h
+++ b/telepathy-glib/channel-manager.h
@@ -98,10 +98,6 @@ gboolean tp_channel_manager_create_channel (TpChannelManager *manager,
     TpChannelManagerRequest *request,
     GHashTable *request_properties);
 
-gboolean tp_channel_manager_request_channel (TpChannelManager *manager,
-    TpChannelManagerRequest *request,
-    GHashTable *request_properties);
-
 gboolean tp_channel_manager_ensure_channel (TpChannelManager *manager,
     TpChannelManagerRequest *request,
     GHashTable *request_properties);
@@ -115,7 +111,6 @@ struct _TpChannelManagerIface {
     TpChannelManagerForeachChannelClassFunc foreach_channel_class;
 
     TpChannelManagerRequestFunc create_channel;
-    TpChannelManagerRequestFunc request_channel;
     TpChannelManagerRequestFunc ensure_channel;
 
     TpChannelManagerTypeForeachChannelClassFunc type_foreach_channel_class;
diff --git a/telepathy-glib/simple-password-manager.c b/telepathy-glib/simple-password-manager.c
index 4239a9a..a60c7e8 100644
--- a/telepathy-glib/simple-password-manager.c
+++ b/telepathy-glib/simple-password-manager.c
@@ -273,7 +273,6 @@ channel_manager_iface_init (gpointer g_iface,
 
   /* these channels are not requestable */
   iface->foreach_channel_class = NULL;
-  iface->request_channel = NULL;
   iface->create_channel = NULL;
   iface->ensure_channel = NULL;
 }
diff --git a/tests/lib/echo-im-manager.c b/tests/lib/echo-im-manager.c
index 9937aa0..6f86871 100644
--- a/tests/lib/echo-im-manager.c
+++ b/tests/lib/echo-im-manager.c
@@ -377,6 +377,4 @@ channel_manager_iface_init (gpointer g_iface,
   iface->foreach_channel_class = tp_tests_echo_im_manager_foreach_channel_class;
   iface->create_channel = tp_tests_echo_im_manager_create_channel;
   iface->ensure_channel = tp_tests_echo_im_manager_ensure_channel;
-  /* In this channel manager, Request has the same semantics as Ensure */
-  iface->request_channel = tp_tests_echo_im_manager_ensure_channel;
 }
diff --git a/tests/lib/simple-channel-manager.c b/tests/lib/simple-channel-manager.c
index 4bbe8e5..500728d 100644
--- a/tests/lib/simple-channel-manager.c
+++ b/tests/lib/simple-channel-manager.c
@@ -91,5 +91,4 @@ channel_manager_iface_init (gpointer g_iface,
 
   iface->create_channel = tp_tests_simple_channel_manager_request;
   iface->ensure_channel = tp_tests_simple_channel_manager_request;
-  iface->request_channel = tp_tests_simple_channel_manager_request;
 }



More information about the telepathy-commits mailing list