[Bug 13422] Add nice API for channel creation

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Aug 6 13:56:57 CEST 2010


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

--- Comment #23 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-08-06 04:56:57 PDT ---
Over in Bug #29218 I wondered whether this API needs to be encapsulated as an
object (which would essentially be the RequestCtx, turned into a public boxed
object or GObject); if we introduce TpChannel subclasses, we need somewhere to
put the desired GType. Similarly, if we add API to TpBaseClient for "don't
bother giving me channels until they have FEATURE_FOO prepared", this API in
its current form will get left behind.

Straw man:

    TpAccountChannelRequest *tp_account_channel_request_new (TpAccount *,
        GHashTable *);
    void tp_account_channel_request_set_desired_type (TpAccountChannelRequest
*,
        GType);
    void tp_account_channel_request_require_feature (TpAccountChannelRequest *,
        GQuark);

    void tp_account_channel_request_ensure_async (... async stuff here ...);

    /* usage */
    acr = tp_account_channel_request_new (account, asv);
    tp_account_channel_request_set_desired_type (acr,
MY_TYPE_CHANNEL_SUBCLASS);
    tp_account_channel_request_require_feature (acr, TP_CHANNEL_FEATURE_BEES);
    tp_account_channel_request_require_feature (acr, MY_CHANNEL_FEATURE_GOATS);
    tp_account_channel_request_ensure_async (...); /* off we go! */

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the telepathy-bugs mailing list