[Bug 71384] improve account storage GInterface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Feb 6 05:38:32 PST 2014


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

--- Comment #21 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
The things I would be tempted to change before releasing this API as 5.17.0
are:

* If get_attribute, get_parameter return NULL, should they raise a GError?
  There are two reasons they can fail: either that key isn't stored,
  or that key's stored value is not something they can coerce into @type.
  I think perhaps they should raise a GError: "not stored" should not
  invalidate an account (unless the parameter is mandatory) but "cannot coerce"
  maybe should?

* The same for set_attribute, set_parameter. I think these should be
  documented to raise an error of the caller's choice, typically a TP_ERROR.

* commit should be async, but it's easy to add a commit_async() later,
  with a default implementation in terms of commit(), so we can skip this
  if it turns out to be Hard™.

* Either list should be async, or there should be some sort of async-init
  that happens first; but in the worst case, plugins can implement list()
  as "start the async list process, return NULL, and when we get
  results back, signal them as new accounts" like the GOA plugin does.
  Unless we consider it to be important for callers to be able to know
  when all plugins are ready and we have as many accounts as we're going
  to get?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list