aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-account-chooser.h
diff options
context:
space:
mode:
authorVitaly Minko <vitaly.minko@gmail.com>2010-11-11 01:23:39 +0800
committerVitaly Minko <vitaly.minko@gmail.com>2010-11-11 01:23:39 +0800
commit18d649cbfd8eda7678957a3d2a76b9bb8681a981 (patch)
treec3798b5507f8bf2102d3bd6c94922a21e40c17a8 /libempathy-gtk/empathy-account-chooser.h
parentc6cd722328a112e8f4b015ca57ffe8dc72f50cd8 (diff)
downloadgsoc2013-empathy-18d649cbfd8eda7678957a3d2a76b9bb8681a981.tar
gsoc2013-empathy-18d649cbfd8eda7678957a3d2a76b9bb8681a981.tar.gz
gsoc2013-empathy-18d649cbfd8eda7678957a3d2a76b9bb8681a981.tar.bz2
gsoc2013-empathy-18d649cbfd8eda7678957a3d2a76b9bb8681a981.tar.lz
gsoc2013-empathy-18d649cbfd8eda7678957a3d2a76b9bb8681a981.tar.xz
gsoc2013-empathy-18d649cbfd8eda7678957a3d2a76b9bb8681a981.tar.zst
gsoc2013-empathy-18d649cbfd8eda7678957a3d2a76b9bb8681a981.zip
Make AccountChooser filters asynchronous to let them handle newly connected accounts properly (#633481).
Diffstat (limited to 'libempathy-gtk/empathy-account-chooser.h')
-rw-r--r--libempathy-gtk/empathy-account-chooser.h26
1 files changed, 23 insertions, 3 deletions
diff --git a/libempathy-gtk/empathy-account-chooser.h b/libempathy-gtk/empathy-account-chooser.h
index f80d7003c..dfd372c3e 100644
--- a/libempathy-gtk/empathy-account-chooser.h
+++ b/libempathy-gtk/empathy-account-chooser.h
@@ -38,8 +38,26 @@ G_BEGIN_DECLS
#define EMPATHY_IS_ACCOUNT_CHOOSER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EMPATHY_TYPE_ACCOUNT_CHOOSER))
#define EMPATHY_ACCOUNT_CHOOSER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EMPATHY_TYPE_ACCOUNT_CHOOSER, EmpathyAccountChooserClass))
-typedef gboolean (* EmpathyAccountChooserFilterFunc) (TpAccount *account,
- gpointer user_data);
+/**
+ * EmpathyAccountChooserFilterResultCallback:
+ * @is_enabled: indicated whether the account should be enabled
+ * @user_data: user data passed to the callback
+ */
+typedef void (* EmpathyAccountChooserFilterResultCallback) (gboolean is_enabled,
+ gpointer user_data);
+
+/**
+ * EmpathyAccountChooserFilterFunc:
+ * @account: a #TpAccount
+ * @callback: an #EmpathyAccountChooserFilterResultCallback accepting the result
+ * @callback_data: data passed to the @callback
+ * @user_data: user data passed to the callback
+ */
+typedef void (* EmpathyAccountChooserFilterFunc) (
+ TpAccount *account,
+ EmpathyAccountChooserFilterResultCallback callback,
+ gpointer callback_data,
+ gpointer user_data);
typedef struct _EmpathyAccountChooser EmpathyAccountChooser;
@@ -69,7 +87,9 @@ void empathy_account_chooser_set_has_all_option (EmpathyAccountChooser
void empathy_account_chooser_set_filter (EmpathyAccountChooser *chooser,
EmpathyAccountChooserFilterFunc filter,
gpointer user_data);
-gboolean empathy_account_chooser_filter_is_connected (TpAccount *account,
+void empathy_account_chooser_filter_is_connected (TpAccount *account,
+ EmpathyAccountChooserFilterResultCallback callback,
+ gpointer callback_data,
gpointer user_data);
gboolean empathy_account_chooser_is_ready (EmpathyAccountChooser *chooser);