[Bug 46783] New: [next] Fix FileTransfer ContentHash property

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 29 10:54:32 CET 2012


https://bugs.freedesktop.org/show_bug.cgi?id=46783

             Bug #: 46783
           Summary: [next] Fix FileTransfer ContentHash property
    Classification: Unclassified
           Product: Telepathy
           Version: git master
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: tp-spec
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: jonny.lamb at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org


Now that we've got a next branch, we can fix this:

FileTransfer.ContentHash is really annoying because it means the person
requesting the channel must be the one who hashes the file.

We should fix this by:

 1. specifying that the file send request is sent when ProvideFile() is called,
and not when the new channel is created.

 2. making ContentHash and ContentHashType mutable *before* ProvideFile() has
been called (just like the URI property). Of course for incoming file
transfers, it's always immutable.

So here is the outgoing file transfer case:

 1. request a FileTransfer channel in some dummy app with:

  {
     ChannelType: FileTransfer,
     TargetHandleType: CONTACT,
     TargetID: "foo at bar.com",
     URI="file:///home/user/party.jpg"
  }

 2. the appropriate channel appears and another app is activated as the
handler. The handler sees the file is /home/user/party.jpg and hashes it to get
the hash "abcdefghijklmnopqrstuvwxyz". So calls:

  Set("FileTransfer", "ContentHashType", 1337)
  Set("FileTransfer", "ContentHash", "abcdefghijklmnopqrstuvwxyz")

 3. the handler then calls ProvideFile().

 4. the CM then sends the, say, SI file transfer stanza.

The incoming transfer case is pretty much the same. How does this sound then?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list