<br><br><div><span class="gmail_quote">2008/1/25, Simon McVittie <<a href="mailto:simon.mcvittie@collabora.co.uk">simon.mcvittie@collabora.co.uk</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>Hash: SHA1<br><br>Here are some more attempts to nail down concepts before we get into API<br>design.<br><br>Preset<br>======<br><br>Presets consist of:<br><br>* the connection manager to use
<br>* the protocol<br>* an internal preset name, not for UI (either globally unique or unique<br> per (CM, protocol) pair), e.g. gtalk</blockquote><div><br>I vote for per (CM, protocol) pair.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
* parameter defaults (overriding those given by the CM, and overridden<br> by those given by the account)<br><br>Also worth considering:<br><br>* capability info<br> - e.g. we know ahead of time that all GTalk accounts have the same server
<br> features - we can use this to pre-seed the Account's capabilities<br> - CM protocol implementations have this too, though<br><br>* the displayed name of the preset (localizable somehow)<br> - can probably also be used as (part of?) the default displayed name
<br> for new accounts</blockquote><div><br>Also a localized description text? <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
* some specified way to select a default icon from a theme:<br> e.g. for the gtalk preset (which uses gabble) for the jabber protocol, use<br> telepathy-jabber-gabble-gtalk falling back to telepathy-jabber-gabble<br> and telepathy-jabber?
<br> (Should the CM be part of the calculation or not? If so, it should be<br> less "important" than the protocol - users care about XMPP vs MSN<br> rather than Gabble vs Haze)</blockquote><div><br>I think it could just provide an icon name and if it's not available in the icon theme it's up to the UI to make a choice based on CM/Protocol.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Presets should perhaps be exposed as read-only D-Bus objects by MC.<br><br>Nokia MC on the Internet Tablets has some extra info, but some of that should
<br>be provided "out of band" by the UIs (e.g. accounts-plugin-gabble<br>knows how to handle gtalk specially, but that's between it and the<br>accounts UI).<br><br>Account<br>=======<br><br>Stored attributes of an account
<br>- -------------------------------<br><br>An Account is uniquely identified in the API by an object path.<br><br>s: Displayed name<br> User-selected. Account creation UI is responsible for picking a default<br> value appropriate for the user's locale - something like
<br> g_strdup_printf (_("Google Talk (%s)"), my_jid) would be reasonable<br><br>u (Connection_Presence_Type): Desired status<br> The status MC is or should be trying to achieve *when this account<br> is able to connect*.
<br><br> May be set to Offline by the user, to disable accounts. <br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> If you call methods to set this, MC acts on it, but only if the account is
<br> able to connect.<br><br> (Rationale: if we define this to be "when able to connect", we don't<br> have to change it in response to network connectivity - MC can use some<br> other mechanism to know which accounts can connect when - and we can
<br> remember presence across connectivity changes)<br><br> (TODO: Possibly we should store desired presence (the finer-grained<br> string one) and status message, per account, too? They probably don't<br> make sense globally, but they do make sense per account)
<br><br> (TODO: The Nokia UI also has a concept of "whatever you need to do to<br> make this account go online, try to make it happen". The API will need<br> some sort of support for that - but that should be global or
<br> group-based convenience API, probably)<br><br>s (/connection manager name/ as defined by Tp spec text): CM<br><br>s (Protocol): Protocol<br><br>s? nullable o?: Preset<br> Must be nullable somehow, for what used to be called "vanilla profiles"
<br></blockquote><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">a{sv}: CM parameter overrides<br><br>(ays): Avatar<br> To be uploaded to services that don't have server-stored avatars
<br> - how can we tell? For the moment we have to assume they don't<br><br>s: Nickname<br> To be set as an alias once per connect on services that don't have<br> server-stored aliases<br> - same comments as Avatar
<br> - terminology change in preparation for splitting the "petname set by me"<br> and "nickname set by them" functionality of Aliasing into separate<br> PetNames and Nicknames interfaces, which is a change we should make in
<br> the Telepathy spec - see <a href="http://www.xmpp.org/extensions/xep-0165.html">http://www.xmpp.org/extensions/xep-0165.html</a><br> ยง2.2 'The Roster as a Petname System'<br><br>Also worth considering:<br>
<br>* server capabilities (save capabilities so we know which accounts are<br> capable of doing what, even while offline, so UIs can present appropriate<br> info)<br><br>Transient attributes of an account<br>- ----------------------------------
<br><br>Only valid during one MC run; never stored; set by MC in response to the<br>environment, rather than being user-settable.<br><br>b: Able to connect<br> Determined dynamically by requirements of the CM/protocol (some
<br> possibilities: whether we have network connectivity, whether we're<br> logged-in to any VPNs, whether avahi-daemon is running...) and whether<br> they're met.<br><br> Also, always FALSE if the stored params are no longer enough
<br> to make the CM happy, or if we have some stored params that the CM<br> no longer supports (CM-specific UI code can either perform a migration<br> automatically, or require user input; the best a UI can do in the<br>
absence of CM-specific knowledge is to notify the user and disable the<br> account until they've fixed it)<br><br>nullable o: Connection (either it has one or it doesn't)<br><br>u (Connection_Status): Connection status
<br> Might not actually need this, it can probably be implicit from whether<br> there's a connection, what the presence type is, and whether MC ought<br> to be trying to connect?<br><br>u (Connection_Presence_Type): Connection presence
<br> Always Connection_Presence_Type_Offline unless connected.<br><br>Account Group<br>=============<br><br>There seem to be two sorts of "group" floating around:<br><br>* user-assigned groups (personal and work accounts)
<br><br>* automatic capability-based grouping (accounts that need a network connection,<br> accounts that can run all the time like Salut, accounts that should only try<br> to connect when explicitly requested like gnome-phone-manager)
<br><br>I think the term "account group" should only apply to the user-assigned<br>groups. Magical groups that the user can't assign should be something<br>separate; above, I suggest a way to deal with these.
<br><br>UIs and business rules will tend to be impossibly complex if this isn't<br>exclusive, so perhaps we can declare that each account is in exactly one<br>group, defaulting to the special default group "" (which UIs can render as
<br>_("(no group set)") or something).<br><br>This can just be a shortcut for setting the "desired status" attribute<br>on all Accounts in the group, probably? In that way, it's just a special<br>case of setting status on individual accounts.
<br>-----BEGIN PGP SIGNATURE-----<br><br>iD8DBQFHmfWHWSc8zVUw7HYRAvLHAKDGektbrO47fJQWLzQw8ooqo2+JUwCg1yen<br>w1XVU9NJ6zhlvS20Yim0WWU=<br>=E9mv<br>-----END PGP SIGNATURE-----<br>_______________________________________________
<br>Telepathy mailing list<br><a href="mailto:Telepathy@lists.freedesktop.org">Telepathy@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/telepathy">http://lists.freedesktop.org/mailman/listinfo/telepathy
</a><br></blockquote></div><br>