Re: Making a phone call with GNOME



On Wed, 21 Mar 2018 at 11:43:09 +0000, Bob Ham wrote:
On 19/03/18 13:27, Simon McVittie wrote:
There's no way we could have designed this correctly in Telepathy without
being aware of protocol quirks like these, and indeed this API wasn't
present in our first attempts (initially we could only represent
one-to-one conversations and named chatrooms, like in XMPP and IRC).

Can I ask how this was eventually exposed in the API?  Was there a
boolean property on some interface, or separate interfaces for the
different semantics, or something else?

Named chatroom: TargetHandleType = ROOM, TargetID = room's unique ID,
and the Channel has the Group interface to list its members
(including whether we are there or merely invited, members who we
invited, members who were invited by others (if we can know that), etc.)

Strictly one-to-one conversation: TargetHandleType = CONTACT,
TargetID = peer's unique ID

MSNP-style unnamed chatroom: TargetHandleType = NONE, TargetID = "",
and the Channel has the Group interface to list its members
(including whether we are there or merely invited, members who we
invited, members who were invited by others (if we can know that), etc.)

... but even that isn't enough, because XMPP chatrooms
have a unique ID that is human-readable except for when it
isn't, and Skype chatrooms have a unique identifier that
can be rejoined later but is not human-readable; so we added
https://telepathy.freedesktop.org/spec/Channel_Interface_Room.html
later on.

The complexity of Telepathy might look ridiculous, but everything is
there for a reason. If you are trying to put a UX-agnostic abstraction
layer across as many protocols as Telepathy, make sure you are aware of
what you're letting yourself in for.

libpurple is simpler than Telepathy, but it achieves that by having a
UI-centric rather than protocol-centric design, or at least it did last
time I worked with it: it's easy to use it to implement a UX that looks
a lot like Pidgin (or Pidgin with macOS widgets, i.e. Adium, or Pidgin
in a TUI, i.e. Finch), but hard to use it to implement any other UX.

    smcv


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]