aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-utils.c91
-rw-r--r--libempathy/empathy-utils.h10
2 files changed, 0 insertions, 101 deletions
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index 37ad74dd1..047dd931e 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -331,97 +331,6 @@ empathy_file_lookup (const gchar *filename, const gchar *subdir)
return path;
}
-typedef struct {
- EmpathyRunUntilReadyFunc func;
- gpointer user_data;
- GObject *object;
- GMainLoop *loop;
-} RunUntilReadyData;
-
-static void
-run_until_ready_cb (RunUntilReadyData *data)
-{
- if (!data->func || data->func (data->object, data->user_data)) {
- DEBUG ("Object %p is ready", data->object);
- g_main_loop_quit (data->loop);
- }
-}
-
-static gboolean
-object_is_ready (GObject *object,
- gpointer user_data)
-{
- gboolean ready;
-
- g_object_get (object, "ready", &ready, NULL);
-
- return ready;
-}
-
-void
-empathy_run_until_ready_full (gpointer object,
- const gchar *signal,
- EmpathyRunUntilReadyFunc func,
- gpointer user_data,
- GMainLoop **loop)
-{
- RunUntilReadyData data;
- gulong signal_id;
-
- g_return_if_fail (G_IS_OBJECT (object));
- g_return_if_fail (signal != NULL);
-
- if (func && func (object, user_data)) {
- return;
- }
-
- DEBUG ("Starting run until ready for object %p", object);
-
- data.func = func;
- data.user_data = user_data;
- data.object = object;
- data.loop = g_main_loop_new (NULL, FALSE);
-
- signal_id = g_signal_connect_swapped (object, signal,
- G_CALLBACK (run_until_ready_cb),
- &data);
- if (loop != NULL) {
- *loop = data.loop;
- }
-
- g_main_loop_run (data.loop);
-
- if (loop != NULL) {
- *loop = NULL;
- }
-
- g_signal_handler_disconnect (object, signal_id);
- g_main_loop_unref (data.loop);
-}
-
-void
-empathy_run_until_ready (gpointer object)
-{
- empathy_run_until_ready_full (object, "notify::ready", object_is_ready,
- NULL, NULL);
-}
-
-McAccount *
-empathy_channel_get_account (TpChannel *channel)
-{
- TpConnection *connection;
- McAccount *account;
- MissionControl *mc;
-
- g_object_get (channel, "connection", &connection, NULL);
- mc = empathy_mission_control_dup_singleton ();
- account = mission_control_get_account_for_tpconnection (mc, connection, NULL);
- g_object_unref (connection);
- g_object_unref (mc);
-
- return account;
-}
-
guint
empathy_proxy_hash (gconstpointer key)
{
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index 8684acc00..e6bcfebfc 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -74,16 +74,6 @@ const gchar * empathy_presence_to_str (McPresence presence);
McPresence empathy_presence_from_str (const gchar *str);
gchar * empathy_file_lookup (const gchar *filename,
const gchar *subdir);
-
-typedef gboolean (*EmpathyRunUntilReadyFunc) (GObject *object,
- gpointer user_data);
-void empathy_run_until_ready (gpointer object);
-void empathy_run_until_ready_full (gpointer object,
- const gchar *signal,
- EmpathyRunUntilReadyFunc func,
- gpointer user_data,
- GMainLoop **loop);
-McAccount * empathy_channel_get_account (TpChannel *channel);
gboolean empathy_proxy_equal (gconstpointer a,
gconstpointer b);
guint empathy_proxy_hash (gconstpointer key);