atm a simple handler that just wants to catch its channels without preparing a full TpAccountManager have to do: dbus = tp_dbus_daemon_dup(NULL); factory = tp_automatic_client_factory_new (dbus); handler = tp_simple_handler_new_with_factory (factory, ...); ... g_object_unref (dbus); g_object_unref (factory); g_object_unref (handler); IMO this is a bit too much, the only thing TpBaseClient really needs is a factory, all the rest is just legacy or constructor helpers. Since we are going to break API in "next" branch, let's sort this out. What I suggest: 1) tp_simple_handler_new (TpSimpleClientFactory *factory, ...); if factory is NULL, then internally it does dbus = tp_dbus_daemon_dup(); self->priv->factory = tp_automatic_client_factory_new(dbus); 2) tp_simple_handler_new_with_am (TpAccountManager *am, ...){return tp_simple_handler_new (tp_proxy_get_factory (am), ...);} this is a trivial helper in the case the user already has an IM. Like this, the example above strips down to: handler = tp_simple_handler_new (NULL, ...); ... g_object_unref (handler);
Of course this apply to every TpBaseClient subclasses: approvers and observers as well. Here is a branch I've started but trying to keep ABI, it could serve as base: http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/log/?h=base-client
Yeah this branch looks alright so far. Just two documentation points: > + * Since Since 0.UNRELEASED @dbus can be %NULL in which case Double "Since". + * instead create a new #TpAutomaticClientFactory. If user already have a s/have/has/
Branch updated with typos fixed. Do you think this small behavior change can be pushed to master, or do you prefer only 'next' ?
(In reply to comment #3) > Branch updated with typos fixed. > > Do you think this small behavior change can be pushed to master, or do you > prefer only 'next' ? I think it'd be better with just 'next'.
Ok, merged into next. Thanks.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.