[Bug 31376] TpFileTransferChannel : high level API for FT

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon May 30 13:37:45 CEST 2011


https://bugs.freedesktop.org/show_bug.cgi?id=31376

--- Comment #17 from Xavier Claessens <xclaesse at gmail.com> 2011-05-30 04:37:45 PDT ---
Here are the things that my branch does differently:

 - Properties that are not immutable must be fetched with a GetAll call, we
usually do that with a feature that must be prepared on the channel. The spec
was actually missing tags to tell which properties are mutable and which
aren't, so I've also fixed the spec for this.

 - Properties are all read-only, so no need of a set_properties


Things my branch adds:

 - Create TpFileTransferChannel subclass in automatic factory

 - Give the state reason with the _get_state() getter.

 - "file" property that gives a GFile instead of URI string, since all
operations are using GFile anyway. This is consistent with at least
tp_contact_get_avatar_file() where we also decided to wrap the URI into a
GFile.

 - Since it now has a feature to prepare for mutable properties, I've added
code to prepare it in unit tests.

Review for sjokkis code I've imported:

 - tp_file_transfer_channel_accept_file_async(): I don't think you set a value
to self->priv->address_type and self->priv->access_control

 - tp_file_transfer_channel_offer_file_async(): I don't think you need to
create self->priv->address there, it is given in provide_file_cb() if I
understand correctly.


Things missing:

 - Since I changed to spec to allow approver to define the URI where to save
incoming file transfer, I don't think _accept_file_async() should take one in
args. But the URI could not be defined by approver, so there are still cases
where we need to give a file... I think we need a separate _set_uri_async()
that will set the URI property, that's needed to tell observers as well.

 - Unit test does not pass, the channel gets closed when feature is being
prepared... I don't know what's going on :(


Note: This branch contains not directly related changes like
_tp_determine_socket_address_type and _tp_determine_access_control_type that
could maybe already be merged?

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list