On Wed, 2010-08-25 at 14:23 +0100, Alberto Mardegan wrote: > Hi all, > I hope I won't annoy you too much if I shortly introduce myself. :-) > I'm a developer from the Nokia Accounts&SSO team, which developed the > libaccounts and libsignon components now available in MeeGo core. > Unfortunately so far we have not been active in the MeeGo (and earlier, > Maemo) community, that's why I don't expect many people here to know > what Accounts&SSO is about; but I hope this is going to change, and with > time (and public docs) we'll eventually get to present us better.
Welcome Alberto! Good to see you here. Despite our (brief) discussions around what Accounts&SSO is (and isn't - see http://bugs.meego.com/show_bug.cgi?id=5017), I still have the problem that I haven't used any of the Accounts&SSO APIs and do not fully understand it. Is there now some design document or component overview of Accounts&SSO available? > Now, to the point. Our current APIs in libaccounts-glib and > libaccounts-qt for accessing account service settings could be much > simpler to use than how they are now, so I've sketched some API of a new > AccountService class and I'd like to be informed of any dislike, before > we start implementing it. Again, a laudable move :-) > For those who don't know the current API: our Account object holds all > the settings for an account; there are some global settings (such as > username, display name) and service-specific settings (for e-mail, IM, > calendar,...) which are all accessible on the same Account object, by > first selecting the service one needs to work with. In pseudo-code, this > shows like this: > > ======== > // get the username from the global settings > username = account->value("username"); > enabled = account->enabled(); Can you take a step back and explain how "accounts" are created and identified? Not relevant for the suggestion below, but for using Accounts&SSO in general. > // get some e-mail settings > account->selectService(Service("gmail")); > imapServer = account->value("server"); > imapPort = account->value("port"); > emailEnabled = account->enabled(); > > // get some IM settings > account->selectService(Service("google-talk")); > jabberServer = account->value("server"); > jabberPort = account->value("port"); > imEnabled = account->enabled(); > ======== > > This approach carries the risk that if clients forget calling > selectService(), they can easily get wrong data out of the account. > > The new proposed classes for libaccounts-glib [1] and libaccounts-qt [2] > aim at solving this, by introducing an AccountService object which > represents an account configuration always selected on the given service: > > ======== > accountService = new AccountService(account, Service("gmail")); > imapServer = accountService->value("server"); > imapPort = accountService->value("port"); > // the next line returns true only if the account is enabled *and* the > // "gmail" service is enabled on it > emailEnabled = accountService->enabled(); > ======== > > Feel free to add your comments on the gitorious web interface or here in > the mailing-list. Looks like a useful and straight-forward API improvement to me - even without knowing much about the design. -- Best Regards, Patrick Ohly The content of this message is my personal opinion only and although I am an employee of Intel, the statements I make here in no way represent Intel's position on the issue, nor am I authorized to speak on behalf of Intel on this matter. _______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev
