Hi all, I'm working on file transfer in telepathy-salut[1] and empathy[2], the current proposed spec for file transfer channels has some problems and I need some suggestions. The spec darcs repository is at [3], a generated HTML is at [4].
I need to add a method and a signal to know how many bytes were transferred, so I can show a progress bar in empathy-file-transfer. The method should return the number of bytes (a 64-bit unsigned integer) and not the percentage, as the total file size may be unknown. Suggestions for the names? GetTransferredSize() and TransferredSizeChanged? In the current proposed spec IDs become invalid when the file transfer is closed. Some components (such as a logger or the UI showing them) could be run by mc only when the file transfer is already finished, so ListFileTransfers() would return an empty list, this means that the UI can't show the file transfer, thus the user would think that the file wasn't sent. I propose to keep file transfers in the list until they are explicitly removed with AcknowledgeFileTransfer(), like we are already doing for text messages. I'm going to add a new CLOSED state to the existing ones (LOCAL_PENDING, REMOTE_PENDING and OPEN), but then FileTransferClosed signal would become a duplicate of FileTransferStateChanged so I'm going to remove it. The problem is that FieTransferClosed has a reason argument specifying why the file transfer was closed (local/remote error, local/remote stopped and success). What do you suggest to do? I want to remove FileTransferClosed but I need the reason argument. My ideas are: - Add a reason argument to FileTransferStateChanged and pass a NOT_CLOSED value when the new state is not CLOSED. - Add a reason argument to FileTransferStateChanged and pass something like ACCEPTED when the state changes from LOCAL/REMOTE_PENDING to OPEN (other transitions are not possible at the moment). The enumeration could be renamed from File_Transfer_Close_Reason to something like File_Transfer_State_Change_Reason. - Do not add a reason argument but add a GetCloseReason() method, this is what I would do in a normal API but here we have a DBUS call and I don't like adding a roundtrip only to get the reason. Do we need a signal to inform that a file transfer has been acknowledged so the ID is becoming invalid? [1] http://techn.ocracy.org/darcs/telepathy-salut/ [2] http://techn.ocracy.org/empathy/ [3] http://techn.ocracy.org/darcs/telepathy-spec.filetransfer/ [4] http://www.barisione.org/tmp/tp-spec-ft.html#org.freedesktop.Telepathy.Channel.Type.FileTransfer -- Marco Barisione http://www.barisione.org/ _______________________________________________ Telepathy mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/telepathy
