[Telepathy] Some FileTransfer spec comments

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Thu Nov 6 03:01:34 PST 2008


Le lundi 03 novembre 2008 à 15:46 +0000, Guillaume Desmottes a écrit :
> - This socket approach could be problematic in some CM. For example,
> libpurple's FT API only use file path.
> Maybe we should have move current AcceptFile, OfferFile and
> AvailableSocketTypes to a FileTransfer.Socket interface and have a
> FileTransfer.FilePath (or similar) interface implementing Accept/Offer
> using path. The rest of the current FT channel type will stay common I
> think.


As our "let's pretend we have Local_File socket type" approach failed,
we need to consider other options, including:


A) Create a FileTransferSocket channel type containing AcceptFile,
ProvideFile and AvailableSocketTypes.
Create a FileTransferLocalFile channel type containing AcceptFile(v:
path), ProvideFile(v: path). Where the path is either a string or an
array of bytes (as previously).
Move all the common members to a FileTransfer interface that would be
implemented by both type of transfer.

B) Add a LocalFile interface that could be implemented on the current FT
channel type. {Accept,Provide}File would raise an error if the transfer
by socket is not implemented.

C) ?


I think I'd vote for A). This solution is more natural and elegant than
B which seems to be a hack on top of our current implementation.
Furthermore, it would be very easy for clients to discover which kind of
transfers are implemented by looking at the ChannelType in 
Requestable_Channel_Class.


	G.



More information about the Telepathy mailing list