aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-file.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:20:57 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:20:57 +0800
commitdc95d64cc9cc83a2e499d667bad90e99c33dcf5e (patch)
tree3f90d87aaf6da6aad49211d0b4c388db8e5316a8 /libempathy/empathy-tp-file.c
parentc4acf2126b82dc13002c33989ed39b5f0065ec1a (diff)
downloadgsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar
gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.gz
gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.bz2
gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.lz
gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.xz
gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.tar.zst
gsoc2013-empathy-dc95d64cc9cc83a2e499d667bad90e99c33dcf5e.zip
Implement latest ft draft
svn path=/trunk/; revision=1849
Diffstat (limited to 'libempathy/empathy-tp-file.c')
-rw-r--r--libempathy/empathy-tp-file.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libempathy/empathy-tp-file.c b/libempathy/empathy-tp-file.c
index b2e7d8be6..377fa5bd3 100644
--- a/libempathy/empathy-tp-file.c
+++ b/libempathy/empathy-tp-file.c
@@ -530,6 +530,7 @@ tp_file_constructor (GType type,
TpHandle handle;
GHashTable *properties;
McAccount *account;
+ GValue *requested;
file_obj = G_OBJECT_CLASS (empathy_tp_file_parent_class)->constructor (type,
n_props, props);
@@ -567,6 +568,9 @@ tp_file_constructor (GType type,
tp_cli_dbus_properties_run_get_all (tp_file->priv->channel,
-1, EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER, &properties, NULL, NULL);
+ tp_cli_dbus_properties_run_get (tp_file->priv->channel,
+ -1, TP_IFACE_CHANNEL, "Requested", &requested, NULL, NULL);
+
tp_file->priv->size = g_value_get_uint64 (
g_hash_table_lookup (properties, "Size"));
@@ -588,11 +592,11 @@ tp_file_constructor (GType type,
tp_file->priv->description = g_value_dup_string (
g_hash_table_lookup (properties, "Description"));
- if (tp_file->priv->state == EMP_FILE_TRANSFER_STATE_LOCAL_PENDING)
- tp_file->priv->incoming = TRUE;
+ tp_file->priv->incoming = !g_value_get_boolean (requested);
g_hash_table_destroy (properties);
g_object_unref (account);
+ g_value_unset (requested);
return file_obj;
}
@@ -796,7 +800,7 @@ empathy_tp_file_offer (EmpathyTpFile *tp_file)
g_value_init (&nothing, G_TYPE_STRING);
g_value_set_string (&nothing, "");
- emp_cli_channel_type_file_transfer_call_offer_file (
+ emp_cli_channel_type_file_transfer_call_provide_file (
TP_PROXY (tp_file->priv->channel), -1,
TP_SOCKET_ADDRESS_TYPE_UNIX, TP_SOCKET_ACCESS_CONTROL_LOCALHOST,
&nothing, tp_file_method_cb, tp_file, NULL, NULL);