[Telepathy] File transfer spec
Marco Barisione
marco at barisione.org
Thu Jun 7 06:01:50 PDT 2007
Il giorno gio, 07/06/2007 alle 12.19 +0100, Simon McVittie ha scritto:
> * We should define some well-known keys for the optional info dict. In
> particular, UInt64: size (omitted if not known).
iChat adds send the mime-type and the posix permissions of the file in
its file offers. Do we need them?
The mime-type could be useful but what should happen if I'm offering a
"dangerous" file but with the type set to "image/jpeg"?
The permissions are probably useless and dangerous.
Other useful keys could be a description and the creation date.
> * IIRC, we wanted to be able to support "groups" of files as well as
> single files, so we could support Google Talk in future? Or do we not
> care about maintaining the difference between offering a bunch of
> files together vs offering them one after the other?
It would be useful but it's not possible with the currents methods.
> A reasonable criticism. Or we could change the signature of
> CloseFileTransfer and FileTransferClosed, like so:
>
> CloseFileTransfer(u: id, u: reason)
> FileTransferClosed(u: id, u: reason)
>
> with one of the reasons being FILE_TRANSFER_CLOSE_REASON_SUCCESS.
>
+1
> > 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
> > FileTransferStarted?
>
> You could be right there, yes.
I like FileTransferStareted and I would change the name of the state
too.
> > 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.
>
> Or vice versa. I agree that the inconsistency is silly.
And in Python you cannot do:
for ft in chan.ListFileTransfers():
self._on_new_file_transfer(*args)
I prefer to move state between direction and filename so it's
immediately after the other enum.
--
Marco Barisione
http://www.barisione.org/
More information about the Telepathy
mailing list