[Bug 48780] add API to request channels without speaking fluent D-Bus

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 25 16:52:34 CEST 2012


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

--- Comment #23 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-04-25 07:52:34 PDT ---
(In reply to comment #20)
> tbh, I would have _supports_file_transfer_full(self, flags) and expose
> FTCapFlags

My concern about this whole commit is: how does anything complex work in a UI?
Realistically, the UI will want to ask, for each input box: do I show this or
not? - and leave it at that.

If flags is an "out" argument, it's flattening potentially multiple requestable
channel classes into one. (Imagine that Gabble supports both Jingle and SI file
transfers, and they have different capabilities.) The TpCapabilities object has
to either take an arbitrary File Transfer RCC (the first?), the union, or the
intersection; any of those is basically misleading, but we can't do better
without having the UI understand that there are multiple sub-protocols, and
iterate over them.

The API I implemented is effectively the same as taking the union - the UI will
offer everything supported by any of the sub-protocols, and if the user
specifies too many things, the request might fail. It at least does that
without falsely implying that a complete set of things is supported, though...

If flags is an "in" argument, in principle the UI could play "20 questions"
with the TpCapabilities to get the most complete possible list of fields:

    do you support FT with a description, a date and an offset?
    - no
    do you support FT with a description?
    - yes
    do you support FT with a description and a date?
    - no
    do you support FT with a description and an offset?
    - yes
    (show description, offset inputs, but hide date input)

but the number of questions required is a combinatorial explosion, so... no.
Realistically, nobody's going to do that anyway.

A more likely (mis-)implementation is a UI that has this "conversation" with a
basic FT implementation that lacks all the optional extras:

    do you support FT with a description, a date and an offset?
    - no
    (hide FT support entirely)

and we don't want that.

-- 
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