diff options
author | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-08-08 11:36:16 +0100 |
---|---|---|
committer | Jonny Lamb <jonny.lamb@collabora.co.uk> | 2012-08-08 11:36:16 +0100 |
commit | 718954c6f3a5775ffff72de882338e97b5f4d150 (patch) | |
tree | 7e7e6398a812636953a68ceffb90583de9cf3f53 | |
parent | f379163914b62a357330330754e1a55e9ea18036 (diff) | |
download | telepathy-logger-718954c6f3a5775ffff72de882338e97b5f4d150.tar.gz |
test library: remove utility function to fetch handles
Handles are like so totally olde, man.
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r-- | tests/lib/util.c | 39 | ||||
-rw-r--r-- | 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, |