[Telepathy] Account and AccountManager objects

Simon McVittie simon.mcvittie at collabora.co.uk
Mon Jan 28 10:00:57 PST 2008

Hash: SHA1

On Mon, 28 Jan 2008 at 16:23:53 +0200, Alberto Mardegan wrote:
> ext Simon McVittie wrote:
> >   (TODO: The Nokia UI also has a concept of "whatever you need to do to
> >   make this account go online, try to make it happen". The API will need
> >   some sort of support for that - but that should be global or
> >   group-based convenience API, probably)
> Yes, I would also add this "if you have to go online, do it with this 
> presence/message".

So whatever UI causes the activation is responsible for deciding what
status to set? That sounds rather mysterious... it sounds like a job for
MC really. On the other hand, I suppose the UI might ask the user?

- ----------------------------------------------------
|To call Bob, you need to connect to the account   |
|"Google Talk (example at gmail.com)".                |
|                                                  |
|Set this status: [ (-) Busy |v]                   |
|with message:    [On the phone__________________] |
|                                                  |
|      [   OK   ]   [ Cancel ]                     |
- ----------------------------------------------------

Thinking about this some more, here are ways an account can become connected,
and possible things we could do:

* We gain an Internet connection, or do some other action that can
  trigger an "onlineness" event. Accounts that are so configured try to
  go online.

  Requirements to support this: either MC guesses an appropriate status
  for all accounts (in ITOS2008 it's a global preference), or each
  account has a stored value for "when you get online, do this".

  Reasonable implementation: for each account, either store a boolean
  "put this online whenever possible", or a presence type (possibly Offline)
  "set this status whenever possible" (I was leaning towards the latter
  in previous mails)

* The user asks to initiate a call/IM session/... with a stored contact.
  That account has to go online first.

  Requirements to support this: either MC guesses an appropriate status
  for the account, or it uses the stored status from the previous case

  Reasonable implementation: the UI sketch above seems OK, actually.
  The UI could always ask MC "what status would *you* set?",
  or perhaps pass in Connection_Presence_Type_Unset to trigger an MC
  decision, if it doesn't want to ask the user.

* The same as the last one, but we weren't previously connected to a
  network, and we activate the network connection for the purpose (this
  is mostly an Internet-tablet case).

  Reasonable implementation: either we somehow freeze automatic
  connection for a short time, or we reason "well, while they're going online
  anyway..." and do the same as any other "gaining an Internet
  connection" event

* The user explicitly asks to put this account online
  (implicitly selecting a status)

* The user explicitly asks to put a group that includes this account,
  or all accounts, online (should probably be exactly the same as the previous)

For the VPN use-case, we could have something in the Advanced tab of
account config, I suppose:

|                                |
| This account requires          |
| [ VPN "vpn.example.com"    |v] |
- ----------------------------------

together with some way for VPN plugins, etc. to add extra requirements.



More information about the Telepathy mailing list