[Telepathy] Account and AccountManager objects

Simon McVittie simon.mcvittie at collabora.co.uk
Tue Jan 22 09:38:41 PST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think the first thing we need to think about for Mission Control is the
concept of an account. This message is a bit of a brain-dump.

Just what is an account?

- - an independent "identity"
  - if I connect to XMPP as smcv at example.com/N810 and smcv at example.com/Laptop,
    I think we ought to think of that as one account
  - but if I connect to IRC as smcv on OFTC and smcv on Freenode, that's two
    accounts
  - accounts can have different aliases, avatars, presence, and even anonymity
    requirements

- - a way to get at contacts
  - each of my accounts can have different contact lists
  - I want to only talk to each contact from the account(s) they're aware of
  - I might want to talk to a colleague via my and his work accounts (to
    discuss XMPP) or via my and his personal accounts (to suggest we go
    to the pub)

- - something Mission Control can connect in response to environmental changes
  - e.g. internet tablets' auto-online
  - therefore we need to store the complete parameter set for each account

- - not (currently) necessarily the same as a normalized ID (which is the thing
  you get when you inspect a contact handle)

Instructive cases to think about:

- - The canonical example is, as usual, Gabble. The 'account' parameter
  is conceptually an account (although you can be connected to the same
  account multiple times from one host, if you're insane - just set two
  different resources). The 'account' parameter is globally unique and
  is the same as the self-handle's normalized value - user at example.com.

- - telepathy-sofiasip: here the 'account' parameter is user at example.com,
  but a normalized user ID is sip:user at example.com or tel:+441234678910.
  AIUI the self-handle normalizes to sip:user at example.com too.
  (Mikhail, Senko: would a sip: URI be accepted as 'account'?)

- - Idle: the 'account' parameter is e.g. 'User', the 'server' parameter
  is e.g. irc.freenode.net, you need both for an account name.
  The self-handle normalizes to 'user'. (Hmm, perhaps we should be
  normalizing all handles to user at irc.freenode.net instead, so handles
  have globally unique values... obviously, the alias would still be
  "User", and just a nick would still be accepted as input to
  RequestHandles)

- - gnome-phone-manager: the phone is online whether you want it to be or
  not, you can't do RequestConnection() on it, and the self-handle
  (hopefully) normalizes to +441234567890 or whatever. (Yes, this is a
  bit of a weird one)

- - Salut: there is no 'account' parameter. The self-handle normalizes
  to something like user at laptop, but if there's a name collision, it
  might normalize to something different every time.
  (Aside: Sjoerd, should we rename published-name to 'account'? It
  basically does the same as 'account' in every other CM - the only
  weird thing is that it's optional and in fact shouldn't be used,
  whereas 'account' is usually required)

- - Haze: it's anyone's guess what libpurple does for any given protocol.
  The Yahoo!!!1!one prpl has a boolean flag for "am I yahoo.jp or not" -
  does anyone know whether yahoo.com and yahoo.jp operate distinct namespaces?

- - Butterfly: has some sort of multi-protocol madness going on.
  I've suggested that they normalize handles to URIs, but that might be
  doomed to failure since there is in fact no URI scheme for Y!M and
  MSNP that works in the same way as xmpp: - they use
  ymsgr:sendim?username and e.g. msnim:chat?contact=user at example.com
  (the "URIs as verbs" anti-pattern, as opposed to having noun-like URIs like
  xmpp:user at example.com or sip:user at example.com).

- - telepathy-snom: what does it do?

Desirable API

- - Get from a Connection to the associated account
  - ideally, any old connection, not just one that was opened by the
    AccountManager
    - what happens if there isn't an associated account - create one
      automatically and set it disabled?
    - there's also a concept of "is it good enough?", e.g. an
      unencrypted connection to an account for which you
      'require-encryption' - it's "the same account", but at the same
      time it's not what you asked for
  - failing that, the next best thing is any connection that was opened
    by the AccountManager
    - preferably, with some way to recover from AccountManager crashes -
      remember which connections were which accounts so we can resync,
      without having to close them all and start again like NMC
      currently does
  - we may need some help from the connection manager here (another
    argument for collapsing MC into the Telepathy spec rather than
    having it as a separate "layer")

- - Get from an account to a Connection, optionally connecting with some
  default presence

- - Set parameters with which to connect, etc.

- - Change presence, alias, avatar, ... for a subset of accounts (groups)
  - work vs personal accounts are the largest use case
    - work: e.g. Available, David Bloggs PhD, some boring photo
    - personal: e.g. Busy (at work), Bloggsy, a photo of Dave at a party
  - accounts that should be put online automatically or not
    - resiak is annoyed when his N810 puts MSN online automatically,
      since his PC falls off the network when that happens, but still
      wants both N810 and PC to log on to XMPP automatically
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFHliohWSc8zVUw7HYRAnrsAJ9Sar+Gfiz5MWjcYAOToWByDUTTmACgnCf/
4J15/r1Rugi6EyWIIIYhTcU=
=fOmG
-----END PGP SIGNATURE-----


More information about the Telepathy mailing list