[Bug 49371] [next] rethink what features should be set on TpAutomaticClientFactory

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed May 2 13:05:33 CEST 2012


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

--- Comment #4 from Xavier Claessens <xclaesse at gmail.com> 2012-05-02 04:05:33 PDT ---
(In reply to comment #3)
> (In reply to comment #0)
> > Note
> > that it is super easy for applications to add their own features on the
> > factory.
> 
> Is this equally true for the formerly-Simple base class? For instance, if MC
> wants to prepare GROUP on Channels even though it's no longer flagged as
> always-prepared, is that a one-line change?

Was thinking about MC case in bug #49372 too...

My guess is that MC currently do:

new_conn = tp_connection_new(path);
tp_proxy_prepare_async(new_conn, NULL, cb);

My suggestions would be to have a TpClientFactory singleton in MC, then
creating a connection/channel is:

factory = mc_factory_dup_singleton();
new_conn = tp_client_factory_ensure_connection(factory, path);
features = tp_client_factory_dup_connection_features(factory);
tp_proxy_prepare_async (new_conn, features, cb);
g_object_unref (factory);
g_array_unref (features):

I was already thinking about adding tp_client_factory_ensure_*_async() that
does the extra prepare. That would already make it a little bit nicer.

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