aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-contact-factory.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:22:42 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:22:42 +0800
commite4bd8c5f48498cd8ad5efb754345b55b18aaee4e (patch)
tree3323115b68cdd444ec2a423342643799d4f7486f /libempathy/empathy-tp-contact-factory.c
parent6b545adcf659e1ab84b7184305ca687a8c54a15e (diff)
downloadgsoc2013-empathy-e4bd8c5f48498cd8ad5efb754345b55b18aaee4e.tar
gsoc2013-empathy-e4bd8c5f48498cd8ad5efb754345b55b18aaee4e.tar.gz
gsoc2013-empathy-e4bd8c5f48498cd8ad5efb754345b55b18aaee4e.tar.bz2
gsoc2013-empathy-e4bd8c5f48498cd8ad5efb754345b55b18aaee4e.tar.lz
gsoc2013-empathy-e4bd8c5f48498cd8ad5efb754345b55b18aaee4e.tar.xz
gsoc2013-empathy-e4bd8c5f48498cd8ad5efb754345b55b18aaee4e.tar.zst
gsoc2013-empathy-e4bd8c5f48498cd8ad5efb754345b55b18aaee4e.zip
Fix coding style
svn path=/trunk/; revision=1876
Diffstat (limited to 'libempathy/empathy-tp-contact-factory.c')
-rw-r--r--libempathy/empathy-tp-contact-factory.c93
1 files changed, 47 insertions, 46 deletions
diff --git a/libempathy/empathy-tp-contact-factory.c b/libempathy/empathy-tp-contact-factory.c
index e41343ce8..479db6602 100644
--- a/libempathy/empathy-tp-contact-factory.c
+++ b/libempathy/empathy-tp-contact-factory.c
@@ -822,57 +822,57 @@ tp_contact_factory_ready (EmpathyTpContactFactory *tp_factory)
static void
get_requestable_channel_classes_cb (TpProxy *connection,
- const GValue *value,
- const GError *error,
- gpointer user_data,
- GObject *weak_object)
+ const GValue *value,
+ const GError *error,
+ gpointer user_data,
+ GObject *weak_object)
{
- EmpathyTpContactFactory *self = EMPATHY_TP_CONTACT_FACTORY (user_data);
- EmpathyTpContactFactoryPriv *priv = GET_PRIV (self);
- GPtrArray *classes;
- guint i;
-
- if (error != NULL)
- {
- DEBUG ("Error: %s", error->message);
- tp_contact_factory_ready (self);
- return;
- }
+ EmpathyTpContactFactory *self = EMPATHY_TP_CONTACT_FACTORY (weak_object);
+ EmpathyTpContactFactoryPriv *priv = GET_PRIV (self);
+ GPtrArray *classes;
+ guint i;
- classes = g_value_get_boxed (value);
+ if (error != NULL) {
+ DEBUG ("Error: %s", error->message);
+ tp_contact_factory_ready (self);
+ return;
+ }
- for (i = 0; i < classes->len; i++)
- {
- GValue class = {0,};
- GValue *chan_type, *handle_type;
- GHashTable *fixed_prop;
+ classes = g_value_get_boxed (value);
+ for (i = 0; i < classes->len; i++) {
+ GValue class = {0,};
+ GValue *chan_type, *handle_type;
+ GHashTable *fixed_prop;
- g_value_init (&class, TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS);
- g_value_set_static_boxed (&class, g_ptr_array_index (classes, i));
+ g_value_init (&class, TP_STRUCT_TYPE_REQUESTABLE_CHANNEL_CLASS);
+ g_value_set_static_boxed (&class, g_ptr_array_index (classes, i));
- dbus_g_type_struct_get (&class,
- 0, &fixed_prop,
- G_MAXUINT);
+ dbus_g_type_struct_get (&class,
+ 0, &fixed_prop,
+ G_MAXUINT);
- chan_type = g_hash_table_lookup (fixed_prop,
- TP_IFACE_CHANNEL ".ChannelType");
- if (chan_type == NULL || tp_strdiff (g_value_get_string (chan_type),
- EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER))
- continue;
+ chan_type = g_hash_table_lookup (fixed_prop,
+ TP_IFACE_CHANNEL ".ChannelType");
+ if (chan_type == NULL ||
+ tp_strdiff (g_value_get_string (chan_type),
+ EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER)) {
+ continue;
+ }
- handle_type = g_hash_table_lookup (fixed_prop,
- TP_IFACE_CHANNEL ".TargetHandleType");
- if (handle_type == NULL || g_value_get_uint (handle_type)
- != TP_HANDLE_TYPE_CONTACT)
- continue;
+ handle_type = g_hash_table_lookup (fixed_prop,
+ TP_IFACE_CHANNEL ".TargetHandleType");
+ if (handle_type == NULL ||
+ g_value_get_uint (handle_type) != TP_HANDLE_TYPE_CONTACT) {
+ continue;
+ }
- /* We can request file transfer channel to contacts. */
- priv->can_request_ft = TRUE;
+ /* We can request file transfer channel to contacts. */
+ priv->can_request_ft = TRUE;
- break;
- }
+ break;
+ }
- tp_contact_factory_ready (self);
+ tp_contact_factory_ready (self);
}
static void
@@ -904,11 +904,12 @@ tp_contact_factory_got_avatar_requirements_cb (TpConnection *proxy,
priv->avatar_max_size = max_size;
}
- /* Can we request file transfer channels? */
- tp_cli_dbus_properties_call_get (priv->connection, -1,
- TP_IFACE_CONNECTION_INTERFACE_REQUESTS, "RequestableChannelClasses",
- get_requestable_channel_classes_cb, tp_factory, NULL,
- G_OBJECT (tp_factory));
+ /* Can we request file transfer channels? */
+ tp_cli_dbus_properties_call_get (priv->connection, -1,
+ TP_IFACE_CONNECTION_INTERFACE_REQUESTS,
+ "RequestableChannelClasses",
+ get_requestable_channel_classes_cb, NULL, NULL,
+ G_OBJECT (tp_factory));
}
static void