[Bug 31583] Expose TpProxyFeature in the API

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 15 18:53:30 CET 2010


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

--- Comment #7 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-12-15 09:53:30 PST ---
(In reply to comment #5)
> > Features that don't need CONNECTED, but grow more functionality after CONNECTED
> > (of which there aren't any yet, but SimplePresence would be one such) need to
> > be able to delay CONNECTED state, which currently means they need to be able to
> > call into the object-specific introspection pipeline.
> 
> I'm not sure to understand this. Why is SimplePresence special?

Before the D-Bus status becomes CONNECTED, enabling SimplePresence should call
GetAll and look at the properties.

When the D-Bus status becomes CONNECTED, the SimplePresence properties may have
changed. telepathy-qt4 has the useful guarantee that the change to CONNECTED is
not signalled up to API users until each feature has had a chance to sort
itself out: in this case we'd call GetAll again, and not allow the CONNECTED
feature to become ready until that feature had finished.

I think we could probably do this with a structure more like this (pseudocode):

ProxyFeature
{
  Quark name;

  /* If TRUE, every non-core feature in this class depends on this one,
   * and every feature (core or not) in subclasses depends on this one. */
  boolean core;

  /* If TRUE, allow retrying prep of this feature even if it failed once
   * already. ConnectionManager.CORE needs this. */
  boolean can_retry;

  /* Other dependencies */
  Quark[] depends_on;

  /* D-Bus interfaces without which preparation just fails */
  Quark[] interfaces_needed;

  /* Guaranteed not to be called until every feature this depends on was
   * prepared successfully. If any of them failed, this fails too.
   *
   * If this is the core feature, the error is equivalent to
   * tp_proxy_invalidate, unless can_retry is true, in which case
   * it's equivalent to _tp_proxy_set_features_failed.
   *
   * If !can_retry, this will never be called again.
   */
  async void prepare() throws GError;

  /* As above but for before CONNECTED; only relevant to Connection. */
  async void prepare_after_connected() throws GError;
}

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