[Bug 31583] Expose TpProxyFeature in the API

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 17 13:22:28 CET 2011


--- Comment #11 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2011-01-17 04:22:27 PST ---
(In reply to comment #7)
> 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;

Does that mean that if we have MY_CHANNEL_CORE_FEATURE, we shouldn't call its
prepare function while TP_CHANNEL_CORE hasn't be prepared? We don't do that

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

How so? TP_CONNECTION_MANAGER_FEATURE_CORE is never explicitely prepared by
the user (it doesn't have a prepare function).

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

I made good progess in this branch (based on smcv's work):

So far I've done the following changes:
- Make feature preparation async
- Add depends_on
- Add interfaces_needed
+ tests

Still missing:
- Improve CORE dependencies (see above) ?
- Add can_retry
- add prepare_after_connected()
- Make the API public

This branch is already pretty big, so do you prefer reviewing/merging this
first before continuing the refactoring?
It shouldn't introduce any regression comparing to the existing code.

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