[Telepathy-commits] [telepathy-salut/master] content hash and dates are always non on the receiver side as the protocol doesn't support them

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Nov 21 03:46:46 PST 2008


---
 src/salut-file-transfer-channel.c        |    6 ------
 tests/twisted/avahi/test-receive-file.py |   11 ++++++-----
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/src/salut-file-transfer-channel.c b/src/salut-file-transfer-channel.c
index d1f6540..7a5b6a4 100644
--- a/src/salut-file-transfer-channel.c
+++ b/src/salut-file-transfer-channel.c
@@ -973,12 +973,6 @@ salut_file_transfer_channel_received_file_offer (SalutFileTransferChannel *self,
   self->priv->description = g_strdup (ft->description);
   self->priv->content_type = g_strdup (ft->content_type);
 
-  /* FIXME: missing properties:
-     - content_hash_type and content_hash
-     - date
-     - initial offset
-   */
-
   return TRUE;
 }
 
diff --git a/tests/twisted/avahi/test-receive-file.py b/tests/twisted/avahi/test-receive-file.py
index c28e4a8..2392b89 100644
--- a/tests/twisted/avahi/test-receive-file.py
+++ b/tests/twisted/avahi/test-receive-file.py
@@ -34,6 +34,7 @@ FT_STATE_CANCELLED = 7
 
 FT_STATE_CHANGE_REASON_NONE = 0
 
+FILE_HASH_TYPE_NONE = 0
 FILE_HASH_TYPE_MD5 = 1
 
 SOCKET_ADDRESS_TYPE_UNIX = 0
@@ -136,12 +137,12 @@ def test(q, bus, conn):
     assert props[ft_name_prefix + '.ContentType'] == FILE_CONTENT_TYPE
     assert props[ft_name_prefix + '.Filename'] == FILE_NAME
     assert props[ft_name_prefix + '.Size'] == FILE_SIZE
-    # FIXME: How should we deal with the hash properties?
-    #assert props[ft_name_prefix + '.ContentHashType'] == FILE_HASH_TYPE
-    #assert props[ft_name_prefix + '.ContentHash'] == FILE_HASH
+    # FT's protocol doesn't allow us the send the hash info
+    assert props[ft_name_prefix + '.ContentHashType'] == FILE_HASH_TYPE_NONE
+    assert props[ft_name_prefix + '.ContentHash'] == ''
     assert props[ft_name_prefix + '.Description'] == FILE_DESCRIPTION
-    # FIXME: How should we deal with the Date property?
-    #assert props[ft_name_prefix + '.Date'] == 1225278834
+    # FT's protocol doesn't allow us the send the date info
+    assert props[ft_name_prefix + '.Date'] == 0
     assert props[ft_name_prefix + '.AvailableSocketTypes'] == \
         {SOCKET_ADDRESS_TYPE_UNIX: [SOCKET_ACCESS_CONTROL_LOCALHOST]}
     assert props[ft_name_prefix + '.TransferredBytes'] == 0
-- 
1.5.6.5




More information about the Telepathy-commits mailing list