telepathy-mission-control: McdStorage: watch and proxy plugins' change-notification signals

Simon McVittie smcv at kemper.freedesktop.org
Thu Feb 6 05:06:51 PST 2014


Module: telepathy-mission-control
Branch: master
Commit: e3748958037ac74bd6b89e6ea2439378e91b3b89
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=e3748958037ac74bd6b89e6ea2439378e91b3b89

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Wed Feb  5 13:24:45 2014 +0000

McdStorage: watch and proxy plugins' change-notification signals

This lets us get rid of the "ready" vfunc on plugins: we now
connect to each plugin's signals only after we have called
mcp_account_storage_list(), so we won't get double-notification for
accounts that are both present in the initial list and signalled.

This means we can remove a queue of delayed signal emissions from the
test D-Bus plugin (and when it's ported to this API, from Empathy's
libaccounts/UOA plugin). As far as I can see, list() and ready() happen
within the same main-loop iteration anyway, so I don't think it was
even possible to receive notification of a new account in that window.

Empathy's GNOME Online Accounts plugin never really implemented this:
in theory, it was incorrect, since any account that happened to be
added between list() and ready() would be lost altogether. However,
list() and ready() seem to happen in the same main-loop iteration,
so this might never have been a practical concern.

Rather than "fixing" Empathy's GOA plugin, it seems better to remove
the difficult case altogether.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=74581
Reviewed-by: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>

---

 mission-control-plugins/account-storage.c |   60 +--------
 mission-control-plugins/account-storage.h |    6 -
 src/mcd-account-manager.c                 |  134 ++++++-------------
 src/mcd-storage.c                         |  191 +++++++++++++++++++++++----
 tests/twisted/dbus-account-plugin.c       |  204 +++++------------------------
 5 files changed, 246 insertions(+), 349 deletions(-)

Diff:   http://cgit.freedesktop.org/telepathy/telepathy-mission-control/diff/?id=e3748958037ac74bd6b89e6ea2439378e91b3b89


More information about the telepathy-commits mailing list