[Telepathy] FileTransfer: integrating with annoying APIs

Danielle Madeley danielle.madeley at collabora.co.uk
Thu Oct 28 17:43:49 PDT 2010

On Thu, 2010-10-28 at 12:39 +0100, Sjoerd Simons wrote:
> On Thu, 2010-10-28 at 15:32 +1100, Danielle Madeley wrote:

> That's an implementation detail of the client you're using, in the
> specification the states and when you can call ProvideFile is completely
> seperate. The only link between the two is that the state machine cna't
> move to the Open state before you call ProvideFile (as it obviously
> can't start transferring data before getting file data).
> Ofcourse this is subtle and for a client it's easy to see why it would
> assume there is no point in calling ProvideFile before seeing the state
> move to Accepted.

So Empathy does call ProvideFile immediately, but the spec is vague. The
State property kind of implies you should be waiting for Accepted. The
description at the top says you can call ProvideFile immediately though.
It seems that you might need to fake the Accepted state in order to
guarantee having ProvideFile called.


> I think all we need is to make it clear/require that clients should
> always call ProvideFile as soon as possible and should not wait until
> the state moves to Accepted. I don't see the point of having a special
> property that says: For this specific FT the requirements is  more
> strict. We should just make it more strict in all cases.
> On CMs that need a local copy from the file they can start copying
> immediately, on CM that just stream data they only start reading when
> they need it (like they already do as setting up the actual data stream
> can take some time after the remote end accept the FT).

At the moment the client will only stream once the channel has entered
the Open state, so we still need a new state saying to start streaming
the data (we need the data before the transfer begins). The idea of the
property is to tell clients whether to open during the Open state or the
Prespool state.

Danielle Madeley
Software Developer, Collabora Ltd.                  Melbourne, Australia


More information about the telepathy mailing list