<br><br><div><span class="gmail_quote">2008/1/25, Simon McVittie &lt;<a href="mailto:simon.mcvittie@collabora.co.uk">simon.mcvittie@collabora.co.uk</a>&gt;:</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>&nbsp;&nbsp;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>&nbsp;&nbsp;by those given by the account)<br><br>Also worth considering:<br><br>* capability info<br>&nbsp;&nbsp;- e.g. we know ahead of time that all GTalk accounts have the same server
<br>&nbsp;&nbsp;&nbsp;&nbsp;features - we can use this to pre-seed the Account&#39;s capabilities<br>&nbsp;&nbsp;- CM protocol implementations have this too, though<br><br>* the displayed name of the preset (localizable somehow)<br>&nbsp;&nbsp;- can probably also be used as (part of?) the default displayed name
<br>&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;&nbsp;e.g. for the gtalk preset (which uses gabble) for the jabber protocol, use<br>&nbsp;&nbsp;telepathy-jabber-gabble-gtalk falling back to telepathy-jabber-gabble<br>&nbsp;&nbsp;and telepathy-jabber?
<br>&nbsp;&nbsp;(Should the CM be part of the calculation or not? If so, it should be<br>&nbsp;&nbsp;less &quot;important&quot; than the protocol - users care about XMPP vs MSN<br>&nbsp;&nbsp;rather than Gabble vs Haze)</blockquote><div><br>I think it could just provide an icon name and if it&#39;s not available in the icon theme it&#39;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 &quot;out of band&quot; by the UIs (e.g. accounts-plugin-gabble<br>knows how to handle gtalk specially, but that&#39;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>&nbsp;&nbsp;User-selected. Account creation UI is responsible for picking a default<br>&nbsp;&nbsp;value appropriate for the user&#39;s locale - something like
<br>&nbsp;&nbsp;g_strdup_printf (_(&quot;Google Talk (%s)&quot;), my_jid) would be reasonable<br><br>u (Connection_Presence_Type): Desired status<br>&nbsp;&nbsp;The status MC is or should be trying to achieve *when this account<br>&nbsp;&nbsp;is able to connect*.
<br><br>&nbsp;&nbsp;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;">&nbsp;&nbsp;If you call methods to set this, MC acts on it, but only if the account is
<br>&nbsp;&nbsp;able to connect.<br><br>&nbsp;&nbsp;(Rationale: if we define this to be &quot;when able to connect&quot;, we don&#39;t<br>&nbsp;&nbsp;have to change it in response to network connectivity - MC can use some<br>&nbsp;&nbsp;other mechanism to know which accounts can connect when - and we can
<br>&nbsp;&nbsp;remember presence across connectivity changes)<br><br>&nbsp;&nbsp;(TODO: Possibly we should store desired presence (the finer-grained<br>&nbsp;&nbsp;string one) and status message, per account, too? They probably don&#39;t<br>&nbsp;&nbsp;make sense globally, but they do make sense per account)
<br><br>&nbsp;&nbsp;(TODO: The Nokia UI also has a concept of &quot;whatever you need to do to<br>&nbsp;&nbsp;make this account go online, try to make it happen&quot;. The API will need<br>&nbsp;&nbsp;some sort of support for that - but that should be global or
<br>&nbsp;&nbsp;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>&nbsp;&nbsp;Must be nullable somehow, for what used to be called &quot;vanilla profiles&quot;
<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>&nbsp;&nbsp;To be uploaded to services that don&#39;t have server-stored avatars
<br>&nbsp;&nbsp;- how can we tell? For the moment we have to assume they don&#39;t<br><br>s: Nickname<br>&nbsp;&nbsp;To be set as an alias once per connect on services that don&#39;t have<br>&nbsp;&nbsp;server-stored aliases<br>&nbsp;&nbsp;- same comments as Avatar
<br>&nbsp;&nbsp;- terminology change in preparation for splitting the &quot;petname set by me&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;and &quot;nickname set by them&quot; functionality of Aliasing into separate<br>&nbsp;&nbsp;&nbsp;&nbsp;PetNames and Nicknames interfaces, which is a change we should make in
<br>&nbsp;&nbsp;&nbsp;&nbsp;the Telepathy spec - see <a href="http://www.xmpp.org/extensions/xep-0165.html">http://www.xmpp.org/extensions/xep-0165.html</a><br>&nbsp;&nbsp;&nbsp;&nbsp;ยง2.2 &#39;The Roster as a Petname System&#39;<br><br>Also worth considering:<br>
<br>* server capabilities (save capabilities so we know which accounts are<br>&nbsp;&nbsp;capable of doing what, even while offline, so UIs can present appropriate<br>&nbsp;&nbsp;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>&nbsp;&nbsp;Determined dynamically by requirements of the CM/protocol (some
<br>&nbsp;&nbsp;possibilities: whether we have network connectivity, whether we&#39;re<br>&nbsp;&nbsp;logged-in to any VPNs, whether avahi-daemon is running...) and whether<br>&nbsp;&nbsp;they&#39;re met.<br><br>&nbsp;&nbsp;Also, always FALSE if the stored params are no longer enough
<br>&nbsp;&nbsp;to make the CM happy, or if we have some stored params that the CM<br>&nbsp;&nbsp;no longer supports (CM-specific UI code can either perform a migration<br>&nbsp;&nbsp;automatically, or require user input; the best a UI can do in the<br>
&nbsp;&nbsp;absence of CM-specific knowledge is to notify the user and disable the<br>&nbsp;&nbsp;account until they&#39;ve fixed it)<br><br>nullable o: Connection (either it has one or it doesn&#39;t)<br><br>u (Connection_Status): Connection status
<br>&nbsp;&nbsp;Might not actually need this, it can probably be implicit from whether<br>&nbsp;&nbsp;there&#39;s a connection, what the presence type is, and whether MC ought<br>&nbsp;&nbsp;to be trying to connect?<br><br>u (Connection_Presence_Type): Connection presence
<br>&nbsp;&nbsp;Always Connection_Presence_Type_Offline unless connected.<br><br>Account Group<br>=============<br><br>There seem to be two sorts of &quot;group&quot; floating around:<br><br>* user-assigned groups (personal and work accounts)
<br><br>* automatic capability-based grouping (accounts that need a network connection,<br>&nbsp;&nbsp;accounts that can run all the time like Salut, accounts that should only try<br>&nbsp;&nbsp;to connect when explicitly requested like gnome-phone-manager)
<br><br>I think the term &quot;account group&quot; should only apply to the user-assigned<br>groups. Magical groups that the user can&#39;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&#39;t<br>exclusive, so perhaps we can declare that each account is in exactly one<br>group, defaulting to the special default group &quot;&quot; (which UIs can render as
<br>_(&quot;(no group set)&quot;) or something).<br><br>This can just be a shortcut for setting the &quot;desired status&quot; attribute<br>on all Accounts in the group, probably? In that way, it&#39;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>