[Bug 52231] Storage plugins should be able to create new accounts

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jul 19 00:50:36 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=52231

--- Comment #5 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-07-18 15:50:36 PDT ---
(In reply to comment #4)
> _delete_all() already exists as _delete() the NULL key, no?

Slightly unintuitive, but documented... good to know.

> I think it is plugin's responsability to ensure uniqueness, either by using
> mcp_account_manager_get_unique_name() or by having its own prefix (e.g. "goa_")
> + an internal identifier. If the unique_name given by a plugin already exists,
> MC will already warn and discard that account, IIRC that's somewhere in
> McdAccount.

If plugins are expected to avoid collisions, please document how they can do
so. Identifiers of the form goa_234 are not sufficient, because an account name
created by MC could conceivably collide with that (e.g. the fifth account with
parameters { "account":  "goa#" } would collide with goa_234, because '#' is
0x23).

Identifiers containing a double-underscore are currently safe, so you could use
goa__234. Or, implement mcp_account_manager_account_exists (you can factor it
out of get_unique_name) and document that plugins that generate their own IDs
are responsible for using that to avoid collisions.

-- 
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