[Telepathy] File transfer spec

Marco Barisione marco at barisione.org
Wed Jun 6 12:32:21 PDT 2007

I'm working on telepathy-salut to add file transfer capabilities using
the proposed file transfer spec and I have some notes about it.
I read all the messages I found in this list about this spec but maybe I
missed something so I may write something stupid :)

First of all there isn't a way to get the initiator, direction, state,
etc. of a single file transfer, so if you want the state you have to do:

for ft in channel.ListFileTransfers():
    if ft[0] == id:
        state = ft[3]

instead of something as simple as:

state = channel.GetFileTransfer(id)[3]

So I propose to add a GetFileTransfer() method (maybe you can find a
better name).

There is no way to inform the user of the failure of a transfer, i.e.
the file transfer interface is lacking something like
Channel.Type.Text.SendError. I would like to add a FileTransferError

FileTransferError (u: error, u: id, u: initiator, u: direction,
                   u: state, s: filename, a{sv}: information)

or just:

FileTransferError (u: id, u: error)

The ChannelFileTransferError enumeration could have some generic errors
similar to the ones in the ChannelTextSendError enumeration and some
specific errors such as ChannelFileTransferErrorRemoteClosed when the
remote user stops a transfer.

Can the state of a file transfer change from open to pending? I think
that a (local or remote) pending transfer can only become open, so why
FileTransferStateChanged and not FileTransferOpened or

The order of the arguments to NewFileTransfer and the values returned by
ListFileTransfers() are different, it's not a big problem but I would
like to move state before filename in NewFileTransfer.

Marco Barisione

More information about the Telepathy mailing list