[next] telepathy-logger: test library: remove utility function to fetch handles

Jonny Lamb jonny at kemper.freedesktop.org
Wed Aug 8 03:41:19 PDT 2012


Module: telepathy-logger
Branch: next
Commit: 718954c6f3a5775ffff72de882338e97b5f4d150
URL:    http://cgit.freedesktop.org/telepathy/telepathy-logger/commit/?id=718954c6f3a5775ffff72de882338e97b5f4d150

Author: Jonny Lamb <jonny.lamb at collabora.co.uk>
Date:   Wed Aug  8 11:36:16 2012 +0100

test library: remove utility function to fetch handles

Handles are like so totally olde, man.

Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>

---

 tests/lib/util.c |   39 ---------------------------------------
 tests/lib/util.h |    4 ----
 2 files changed, 0 insertions(+), 43 deletions(-)

diff --git a/tests/lib/util.c b/tests/lib/util.c
index 1928915..ae10d5a 100644
--- a/tests/lib/util.c
+++ b/tests/lib/util.c
@@ -111,45 +111,6 @@ typedef struct {
     TpHandle handle;
 } HandleRequestResult;
 
-static void
-handles_requested_cb (TpConnection *connection G_GNUC_UNUSED,
-    TpHandleType handle_type G_GNUC_UNUSED,
-    guint n_handles,
-    const TpHandle *handles,
-    const gchar * const *ids G_GNUC_UNUSED,
-    const GError *error,
-    gpointer user_data,
-    GObject *weak_object G_GNUC_UNUSED)
-{
-  HandleRequestResult *result = user_data;
-
-  g_assert_no_error ((GError *) error);
-  g_assert_cmpuint (n_handles, ==, 1);
-  result->handle = handles[0];
-}
-
-static void
-handle_request_result_finish (gpointer r)
-{
-  HandleRequestResult *result = r;
-
-  g_main_loop_quit (result->loop);
-}
-
-TpHandle
-tp_tests_connection_run_request_contact_handle (TpConnection *connection,
-    const gchar *id)
-{
-  HandleRequestResult result = { g_main_loop_new (NULL, FALSE), 0 };
-  const gchar * const ids[] = { id, NULL };
-
-  tp_connection_request_handles (connection, -1, TP_HANDLE_TYPE_CONTACT, ids,
-      handles_requested_cb, &result, handle_request_result_finish, NULL);
-  g_main_loop_run (result.loop);
-  g_main_loop_unref (result.loop);
-  return result.handle;
-}
-
 void
 _test_assert_empty_strv (const char *file,
     int line,
diff --git a/tests/lib/util.h b/tests/lib/util.h
index e9c8f8c..ceaac90 100644
--- a/tests/lib/util.h
+++ b/tests/lib/util.h
@@ -17,10 +17,6 @@ TpDBusDaemon *tp_tests_dbus_daemon_dup_or_die (void);
 
 void tp_tests_proxy_run_until_dbus_queue_processed (gpointer proxy);
 
-TpHandle tp_tests_connection_run_request_contact_handle (
-    TpConnection *connection,
-    const gchar *id);
-
 void tp_tests_proxy_run_until_prepared (gpointer proxy,
     const GQuark *features);
 gboolean tp_tests_proxy_run_until_prepared_or_failed (gpointer proxy,



More information about the telepathy-commits mailing list