[Bug 71384] improve account storage GInterface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Feb 6 05:30:22 PST 2014


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

Simon McVittie <simon.mcvittie at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW

--- Comment #20 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
(In reply to comment #0)
> This removes mcp_account_storage_commit() because it is redundant with
> mcp_account_storage_commit_one (plugin, am, NULL);

This happened.

> This removes mcp_account_storage_owns() because an account is now
> owned by one and only one storage plugin and MC now keeps track of
> which storage plugin each account comes from.

So did this.

> Finally this adds default implementation on most iface methods to
> make read-only plugins easier to implement. Only _get() and _list()
> and mandatory.

This expanded a bit, because I wanted to make the plugin API more sensible
while we were breaking API anyway. Mandatory methods are now:

* list
* get_attribute
* get_parameter
* list_typed_parameters
* list_untyped_parameters

and optional ones:

* delete_async, delete_finish
* commit
* get_identifier
* get_additional_info
* get_restrictions
* create
* set_attribute
* set_parameter
* get_flags

(In reply to comment #7)
> (In reply to comment #2)
> > Do you have an Empathy branch that updates the GOA and UOA plugins?
> 
> Not yet, but I'll surely do UOA.

I'd be happy to review this, but I can't test it.

> IIRC GOA had issues because when I wrote it I didn't fully understand the
> API, like for example it does not queue signals until _ready() is called.
> Maybe you can take a look at it to check if it's all fine?

It wasn't, except maybe in practice it was, because I don't think we actually
re-entered the main loop between list() and ready()...

... but in any case, I decided ready was stupid, and removed the need for it
(Bug #74581). So now the GOA plugin is correct :-)

> > While you're breaking API anyway, I would be very tempted to turn
> > commit[_one]() into an async/finish pair (Bug #29563), even if all its call
> > sites initially just call it with a no-op callback and hope it worked.
> 
> Let's keep that out-of-scope here, but indeed bug #29563 can follow once
> this lands.

I don't think we need to do this as part of the API break. We can easily make
the default implementation of commit_async() be "just call commit()". Both of
the callers of mcp_account_storage_commit() ignore what it returns anyway, and
mcd_storage_commit() returns void :'-(

> > This calling convention is also pretty insane - McdStorageAccount should be
> > a simple "view" of the plugin, and not have any storage of its own

I fixed this.

> Sorry, I reverted your MC patches, because the tests now fail
...
> There's a long patch series on
> <https://bugs.freedesktop.org/show_bug.cgi?id=27727>. I think it covers
> everything I reverted.

All merged.

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


More information about the telepathy-bugs mailing list