aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:28:09 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-11 23:28:09 +0800
commite7b23f0d2a0dc99944ace914078c256f2c867f64 (patch)
tree82e998453b1ef9c547a3ef2abadeaabd4e17141d /libempathy
parentb024104aa9c9be12586686a60f0f71ec54625763 (diff)
downloadgsoc2013-empathy-e7b23f0d2a0dc99944ace914078c256f2c867f64.tar
gsoc2013-empathy-e7b23f0d2a0dc99944ace914078c256f2c867f64.tar.gz
gsoc2013-empathy-e7b23f0d2a0dc99944ace914078c256f2c867f64.tar.bz2
gsoc2013-empathy-e7b23f0d2a0dc99944ace914078c256f2c867f64.tar.lz
gsoc2013-empathy-e7b23f0d2a0dc99944ace914078c256f2c867f64.tar.xz
gsoc2013-empathy-e7b23f0d2a0dc99944ace914078c256f2c867f64.tar.zst
gsoc2013-empathy-e7b23f0d2a0dc99944ace914078c256f2c867f64.zip
Move code to avoid declaring functions on the top of the file.
svn path=/trunk/; revision=1709
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-contact-factory.c128
1 files changed, 57 insertions, 71 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c
index 897cf981f..48910e2e9 100644
--- a/libempathy/empathy-tp-contact-factory.c
+++ b/libempathy/empathy-tp-contact-factory.c
@@ -67,20 +67,6 @@ enum {
PROP_MAX_SIZE
};
-/* Prototypes */
-static void tp_contact_factory_got_avatar_requirements_cb (TpConnection *proxy,
- const gchar **mime_types,
- guint min_width,
- guint min_height,
- guint max_width,
- guint max_height,
- guint max_size,
- const GError *error,
- gpointer user_data,
- GObject *tp_factory);
-static void tp_contact_factory_ready (EmpathyTpContactFactory *tp_factory);
-
-
static EmpathyContact *
tp_contact_factory_find_by_handle (EmpathyTpContactFactory *tp_factory,
guint handle)
@@ -740,63 +726,6 @@ tp_contact_factory_connection_invalidated_cb (EmpathyTpContactFactory *tp_factor
}
static void
-tp_contact_factory_got_self_handle_cb (TpConnection *proxy,
- guint handle,
- const GError *error,
- gpointer user_data,
- GObject *tp_factory)
-{
- EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory);
-
- if (error) {
- DEBUG ("Failed to get self handles: %s", error->message);
- return;
- }
-
- empathy_contact_set_handle (priv->user, handle);
-
- /* Get avatar requirements for this connection */
- tp_cli_connection_interface_avatars_call_get_avatar_requirements (
- priv->connection,
- -1,
- tp_contact_factory_got_avatar_requirements_cb,
- NULL, NULL,
- tp_factory);
-}
-
-static void
-tp_contact_factory_got_avatar_requirements_cb (TpConnection *proxy,
- const gchar **mime_types,
- guint min_width,
- guint min_height,
- guint max_width,
- guint max_height,
- guint max_size,
- const GError *error,
- gpointer user_data,
- GObject *tp_factory)
-{
- EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory);
-
- if (error) {
- DEBUG ("Failed to get avatar requirements: %s", error->message);
- /* We'll just leave avatar_mime_types as NULL; the
- * avatar-setting code can use this as a signal that you can't
- * set avatars.
- */
- } else {
- priv->avatar_mime_types = g_strdupv ((gchar **)mime_types);
- priv->avatar_min_width = min_width;
- priv->avatar_min_height = min_height;
- priv->avatar_max_width = max_width;
- priv->avatar_max_height = max_height;
- priv->avatar_max_size = max_size;
- }
-
- tp_contact_factory_ready (EMPATHY_TP_CONTACT_FACTORY (tp_factory));
-}
-
-static void
tp_contact_factory_ready (EmpathyTpContactFactory *tp_factory)
{
EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory);
@@ -888,6 +817,63 @@ tp_contact_factory_ready (EmpathyTpContactFactory *tp_factory)
}
static void
+tp_contact_factory_got_avatar_requirements_cb (TpConnection *proxy,
+ const gchar **mime_types,
+ guint min_width,
+ guint min_height,
+ guint max_width,
+ guint max_height,
+ guint max_size,
+ const GError *error,
+ gpointer user_data,
+ GObject *tp_factory)
+{
+ EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory);
+
+ if (error) {
+ DEBUG ("Failed to get avatar requirements: %s", error->message);
+ /* We'll just leave avatar_mime_types as NULL; the
+ * avatar-setting code can use this as a signal that you can't
+ * set avatars.
+ */
+ } else {
+ priv->avatar_mime_types = g_strdupv ((gchar **) mime_types);
+ priv->avatar_min_width = min_width;
+ priv->avatar_min_height = min_height;
+ priv->avatar_max_width = max_width;
+ priv->avatar_max_height = max_height;
+ priv->avatar_max_size = max_size;
+ }
+
+ tp_contact_factory_ready (EMPATHY_TP_CONTACT_FACTORY (tp_factory));
+}
+
+static void
+tp_contact_factory_got_self_handle_cb (TpConnection *proxy,
+ guint handle,
+ const GError *error,
+ gpointer user_data,
+ GObject *tp_factory)
+{
+ EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory);
+
+ if (error) {
+ DEBUG ("Failed to get self handles: %s", error->message);
+ return;
+ }
+
+ empathy_contact_set_handle (priv->user, handle);
+
+ /* Get avatar requirements for this connection */
+ tp_cli_connection_interface_avatars_call_get_avatar_requirements (
+ priv->connection,
+ -1,
+ tp_contact_factory_got_avatar_requirements_cb,
+ NULL, NULL,
+ tp_factory);
+}
+
+static void
tp_contact_factory_connection_ready_cb (EmpathyTpContactFactory *tp_factory)
{
EmpathyTpContactFactoryPriv *priv = GET_PRIV (tp_factory);