[Bug 31583] Expose TpProxyFeature in the API

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 10 10:40:21 CET 2011


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

Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|patch                       |

--- Comment #8 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2011-01-10 01:40:20 PST ---
Removing 'patch' keyword as this branch is not ready yet. Are you planning to
implement your proposed design?

(In reply to comment #7)
> (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 see.

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

IIRC, core features are also automatically prepared when creating the proxy.

> 
>   /* 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;
> }

This design sounds good to me.

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