aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:20:40 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-11-22 00:20:40 +0800
commitc3b450c67ce03d1b097c692d4c70d37f924d9255 (patch)
treeaa24afba7a671896cb0a90ef915539dd8cc3fbe9 /libempathy
parente86d045e49dec4ccadcb27ac4bf01d71a09b0bda (diff)
downloadgsoc2013-empathy-c3b450c67ce03d1b097c692d4c70d37f924d9255.tar
gsoc2013-empathy-c3b450c67ce03d1b097c692d4c70d37f924d9255.tar.gz
gsoc2013-empathy-c3b450c67ce03d1b097c692d4c70d37f924d9255.tar.bz2
gsoc2013-empathy-c3b450c67ce03d1b097c692d4c70d37f924d9255.tar.lz
gsoc2013-empathy-c3b450c67ce03d1b097c692d4c70d37f924d9255.tar.xz
gsoc2013-empathy-c3b450c67ce03d1b097c692d4c70d37f924d9255.tar.zst
gsoc2013-empathy-c3b450c67ce03d1b097c692d4c70d37f924d9255.zip
Set the Date property when requesting a FT channel
svn path=/trunk/; revision=1845
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-dispatcher.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libempathy/empathy-dispatcher.c b/libempathy/empathy-dispatcher.c
index 942b5484f..8573c3bbf 100644
--- a/libempathy/empathy-dispatcher.c
+++ b/libempathy/empathy-dispatcher.c
@@ -984,6 +984,7 @@ empathy_dispatcher_send_file (EmpathyContact *contact,
GFileInfo *info;
guint64 size;
gchar *filename;
+ GTimeVal last_modif;
g_return_if_fail (EMPATHY_IS_CONTACT (contact));
g_return_if_fail (G_IS_FILE (gfile));
@@ -1000,7 +1001,8 @@ empathy_dispatcher_send_file (EmpathyContact *contact,
info = g_file_query_info (request->gfile,
G_FILE_ATTRIBUTE_STANDARD_SIZE ","
- G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+ G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE ","
+ G_FILE_ATTRIBUTE_TIME_MODIFIED,
0, NULL, NULL);
size = info ? g_file_info_get_size (info) : EMPATHY_TP_FILE_UNKNOWN_SIZE;
filename = g_file_get_basename (request->gfile);
@@ -1046,9 +1048,15 @@ empathy_dispatcher_send_file (EmpathyContact *contact,
g_hash_table_insert (args, EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Size",
value);
+ /* org.freedesktop.Telepathy.Channel.Type.FileTransfer.Date */
+ g_file_info_get_modification_time (info, &last_modif);
+ value = tp_g_value_slice_new (G_TYPE_UINT64);
+ g_value_set_uint64 (value, last_modif.tv_sec);
+ g_hash_table_insert (args, EMP_IFACE_CHANNEL_TYPE_FILE_TRANSFER ".Date",
+ value);
+
/* TODO: Description ? */
/* TODO: ContentHashType and ContentHash ? */
- /* TODO: Date */
tp_cli_connection_interface_requests_call_create_channel (connection, -1,
args,