We have lots of fallback code that none of our CMs needs anymore. For example contact attributes and dbus properties should be mandatory everywhere now IMO. Since we released 0.16.0 stable branch, now is a good time to remove a bit of legacy code and raise the minimum expected from our CMs, IMO. That would make this more maintainable, I think.
Here is a branch already removing ~3500 lines of code: http://cgit.collabora.com/git/user/xclaesse/telepathy-glib.git/log/?h=cleanup
Could also remove fallback in TpChannel and make properties mandatory there. But there were recent spec changes there that are not yet in tp-python...
The branch now makes properties mandatory for CORE and GROUP features of TpChannel. It also makes MembersChangedDetailed mandatory (otherwise, TpChannel fails to prepare). Those are supported by all CMs as far as I know. I'm pondering making TpConnection fail to prepare if it does not have immortal handles, but that would make definitely break python CMs, right?
(In reply to comment #3) > I'm pondering making TpConnection fail to prepare if it does not have immortal > handles, but that would make definitely break python CMs, right? Now done
+ if (!tp_proxy_has_interface_by_id (context->connection, + TP_IFACE_QUARK_CONNECTION_INTERFACE_CONTACTS)) + { + GError *error = g_error_new_literal (TP_ERRORS, + TP_ERROR_SOFTWARE_UPGRADE_REQUIRED, + "Connection does not implement CONTACTS interface. Legacy CM " + "are not supported anymore"); + + WARNING ("%s", error->message); + contacts_context_fail (context, error); + g_clear_error (&error); + } (Thanks Firefox or whoever for removing indentation.) Should this not return from the function after g_clear_error? Also, "CMs" please. PROP_ACCOUNT = 1, - PROP_BREAK_PROPS = 2, PROP_DBUS_STATUS = 3, N_PROPS Probably not a problem, but still. + * return FALSE will invalidate the proxy. */ "returning FALSE" (sorry for the nit-pick) Other than these, this branch looks fine. I assume the tests all pass again given your work on them? I'm just thinking about where this branch should end up, master or next.
Fixed all comments, rebased on master, and unit tests still pass. master or next is a good question though.
Branch merged into next.
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.