[next] telepathy-glib: TpConnectionManager: rename _get_protocol_object() to _get_protocol()

Xavier Claessens xclaesse at kemper.freedesktop.org
Tue Jun 26 03:21:32 PDT 2012


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

Author: Xavier Claessens <xavier.claessens at collabora.co.uk>
Date:   Tue Jun  5 14:30:15 2012 +0200

TpConnectionManager: rename _get_protocol_object() to _get_protocol()

---

 docs/reference/telepathy-glib-sections.txt |    2 +-
 next-NEWS                                  |    3 +++
 telepathy-glib/connection-manager.c        |    6 +++---
 telepathy-glib/connection-manager.h        |    2 +-
 tests/dbus/cm.c                            |   12 ++++++------
 tests/dbus/protocol-objects.c              |    4 ++--
 6 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/docs/reference/telepathy-glib-sections.txt b/docs/reference/telepathy-glib-sections.txt
index 397caaf..609e88a 100644
--- a/docs/reference/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib-sections.txt
@@ -3631,7 +3631,7 @@ tp_connection_manager_is_running
 tp_connection_manager_dup_protocols
 tp_connection_manager_dup_protocol_names
 tp_connection_manager_has_protocol
-tp_connection_manager_get_protocol_object
+tp_connection_manager_get_protocol
 TpConnectionManagerParam
 tp_connection_manager_param_get_name
 tp_connection_manager_param_get_dbus_signature
diff --git a/next-NEWS b/next-NEWS
index 9456d44..6db8586 100644
--- a/next-NEWS
+++ b/next-NEWS
@@ -54,3 +54,6 @@ API/Behaviour changes
    Apps should now keep their own reference to the TpConnection in order to use
    its TpContact. Note that keeping a reference to the TpAccountManager or
    TpAccount is good as well.
+
+ - tp_connection_manager_get_protocol_object() has been renamed to
+   tp_connection_manager_get_protocol().
diff --git a/telepathy-glib/connection-manager.c b/telepathy-glib/connection-manager.c
index 68fc7f9..00c6c14 100644
--- a/telepathy-glib/connection-manager.c
+++ b/telepathy-glib/connection-manager.c
@@ -1704,7 +1704,7 @@ tp_connection_manager_dup_protocol_names (TpConnectionManager *self)
 }
 
 /**
- * tp_connection_manager_get_protocol_object:
+ * tp_connection_manager_get_protocol:
  * @self: a connection manager
  * @protocol: the name of a protocol as defined in the Telepathy D-Bus API,
  *            e.g. "jabber" or "msn"
@@ -1723,7 +1723,7 @@ tp_connection_manager_dup_protocol_names (TpConnectionManager *self)
  * Since: 0.11.11
  */
 TpProtocol *
-tp_connection_manager_get_protocol_object (TpConnectionManager *self,
+tp_connection_manager_get_protocol (TpConnectionManager *self,
     const gchar *protocol)
 {
   g_return_val_if_fail (TP_IS_CONNECTION_MANAGER (self), NULL);
@@ -1791,7 +1791,7 @@ gboolean
 tp_connection_manager_has_protocol (TpConnectionManager *self,
                                     const gchar *protocol)
 {
-  return (tp_connection_manager_get_protocol_object (self, protocol) != NULL);
+  return (tp_connection_manager_get_protocol (self, protocol) != NULL);
 }
 
 /**
diff --git a/telepathy-glib/connection-manager.h b/telepathy-glib/connection-manager.h
index 685341d..68a3ee0 100644
--- a/telepathy-glib/connection-manager.h
+++ b/telepathy-glib/connection-manager.h
@@ -120,7 +120,7 @@ gchar **tp_connection_manager_dup_protocol_names (TpConnectionManager *self)
   G_GNUC_WARN_UNUSED_RESULT;
 gboolean tp_connection_manager_has_protocol (TpConnectionManager *self,
     const gchar *protocol);
-TpProtocol *tp_connection_manager_get_protocol_object (
+TpProtocol *tp_connection_manager_get_protocol (
     TpConnectionManager *self, const gchar *protocol);
 _TP_AVAILABLE_IN_0_18
 GList *tp_connection_manager_dup_protocols (TpConnectionManager *self)
diff --git a/tests/dbus/cm.c b/tests/dbus/cm.c
index cd7d61c..5279584 100644
--- a/tests/dbus/cm.c
+++ b/tests/dbus/cm.c
@@ -179,7 +179,7 @@ test_file_got_info (Test *test,
   g_assert (tp_connection_manager_has_protocol (test->cm, "normal"));
   g_assert (!tp_connection_manager_has_protocol (test->cm, "not-there"));
 
-  protocol = tp_connection_manager_get_protocol_object (test->cm, "normal");
+  protocol = tp_connection_manager_get_protocol (test->cm, "normal");
 
   g_assert_cmpstr (tp_protocol_get_name (protocol), ==, "normal");
   g_assert (tp_protocol_can_register (protocol));
@@ -242,10 +242,10 @@ test_file_got_info (Test *test,
   g_assert (strv[3] == NULL);
   g_strfreev (strv);
 
-  protocol = tp_connection_manager_get_protocol_object (test->cm, "weird");
+  protocol = tp_connection_manager_get_protocol (test->cm, "weird");
 
   g_assert_cmpstr (tp_protocol_get_name (protocol), ==, "weird");
-  g_assert (protocol == tp_connection_manager_get_protocol_object (test->cm,
+  g_assert (protocol == tp_connection_manager_get_protocol (test->cm,
         "weird"));
   g_assert (!tp_protocol_can_register (protocol));
 
@@ -294,7 +294,7 @@ test_complex_file_got_info (Test *test,
   /* FIXME: it's not technically an API guarantee that params
    * come out in this order... */
 
-  protocol = tp_connection_manager_get_protocol_object (test->cm, "foo");
+  protocol = tp_connection_manager_get_protocol (test->cm, "foo");
 
   g_assert_cmpstr (tp_protocol_get_name (protocol), ==, "foo");
 
@@ -346,7 +346,7 @@ test_complex_file_got_info (Test *test,
   param = &tp_protocol_borrow_params (protocol)[6];
   g_assert (param->name == NULL);
 
-  protocol = tp_connection_manager_get_protocol_object (test->cm, "bar");
+  protocol = tp_connection_manager_get_protocol (test->cm, "bar");
   g_assert_cmpstr (tp_protocol_get_name (protocol), ==, "bar");
 
   param = &tp_protocol_borrow_params (protocol)[0];
@@ -400,7 +400,7 @@ test_complex_file_got_info (Test *test,
   param = &tp_protocol_borrow_params (protocol)[6];
   g_assert (param->name == NULL);
 
-  protocol = tp_connection_manager_get_protocol_object (test->cm,
+  protocol = tp_connection_manager_get_protocol (test->cm,
       "somewhat-pathological");
   g_assert_cmpstr (tp_protocol_get_name (protocol), ==,
       "somewhat-pathological");
diff --git a/tests/dbus/protocol-objects.c b/tests/dbus/protocol-objects.c
index 995c24f..8a4264a 100644
--- a/tests/dbus/protocol-objects.c
+++ b/tests/dbus/protocol-objects.c
@@ -334,7 +334,7 @@ test_protocol_object (Test *test,
       "example_echo_2");
   tp_tests_proxy_run_until_prepared (test->cm, NULL);
   test->protocol = g_object_ref (
-      tp_connection_manager_get_protocol_object (test->cm, "example"));
+      tp_connection_manager_get_protocol (test->cm, "example"));
 
   g_assert_cmpstr (tp_protocol_get_name (test->protocol), ==, "example");
 
@@ -402,7 +402,7 @@ test_protocol_object_from_file (Test *test,
       "test_manager_file");
   tp_tests_proxy_run_until_prepared (test->file_cm, NULL);
   test->file_protocol = g_object_ref (
-      tp_connection_manager_get_protocol_object (test->file_cm, "foo"));
+      tp_connection_manager_get_protocol (test->file_cm, "foo"));
 
   g_assert_cmpstr (tp_protocol_get_name (test->file_protocol), ==, "foo");
 



More information about the telepathy-commits mailing list