[Bug 54010] Plugins should have async API to create accounts
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Aug 28 12:10:51 CEST 2012
https://bugs.freedesktop.org/show_bug.cgi?id=54010
--- Comment #4 from Xavier Claessens <xclaesse at gmail.com> 2012-08-28 10:10:51 UTC ---
(In reply to comment #2)
> I feel as though if anything is async, committing ought to be async
> (intuitively, it's the thing that ought to take time and be failable).
Yep, even independently to this bug, I think commit_async() is a good thing.
> On the other hand, for your usage in UOA, you can't return the object-path tail
> synchronously... so account creation can't usefully be sync either?
Actually in my case I can. The problem I have is the identifier returned by
tp_account_get_storage_identifier() is known only after the account has been
stored. So if CreateAccount returns too early and client gets the storage
identifier it will be 0 instead of a real identifier.
I didn't though about this when writing the patch above, but actually just
making commit_async() and make sure CreateAccount does not return before
commit_async is done is enough to fix my case.
> There is also the issue that UOA is currently the only thing overriding
> create() (true?), which makes create() rather useless. I wish we'd thought
> about this before merging create().
With RH ignoring what Canonical does, I think they'll soon come with the same
kid of storage in GOA.
> I'm tempted to merge a branch I'm working on (which combines McdStorage into
> McdPluginAccountManager) before this one, so that you don't have to write so
> much boilerplate...
Oh yes please do!
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the telepathy-bugs
mailing list