The TpConnectionManager struct seems to have several public fields. That's ugly. There should really be nice get/set functions, and the struct's implementation should be hidden. That would make the API clearer and safer.
> There should really be nice get/set functions
Getters would be sufficient, all the public fields are (documented to be) read-only.
> and the struct's implementation should be hidden
We can't hide it in terms of API (that would be an API break), but we can hide it from the docs and deprecate access to it.
Maybe GSEAL can be used here?
G_SEAL() is a way to deprecate use of API that you can't break. But as far as I know telepathy-glib is not really API-stable anyway, so we can just hide the struct implementation.
telepathy-glib is API- and ABI-stable in the sense that we do not break existing functionality.
It's unstable in the sense that new functionality is frequently *added*.
Is there no plan to do a parallel-install version eventually? Has that been ruled out?
(In reply to comment #5)
> Is there no plan to do a parallel-install version eventually?
The operative word is "eventually". We do not plan to break ABI soon.
Since this bug was filed, function-based accessors have been added for various struct members (although possibly not all of them). My wip-seal branch contains some unfinished work: adding a TP_SEAL macro, and starting to use it for structs.
(Simon removed his branch.)
Setting a blocking tp-glib 1.0 meta bug, should we consider removing all fields from public structs like gtk3 did?
(In reply to comment #8)
> Setting a blocking tp-glib 1.0 meta bug, should we consider removing all fields
> from public structs like gtk3 did?
Of the GObject structs, I think this just means TpProxy and TpConnectionManager.
Among non-GObjects, TpConnectionManagerProtocol can be deprecated entirely, TpConnectionManagerParam should be sealed (and get a shorter typedef!), and I think the rest are deliberately public (but I'll check through them).
The branch depends on my branch from Bug #49384, for _TP_COMPILATION.
I don't think we want to seal parent and priv fields of GObject struct, since sealed fields are to be removed in 'next'.
TpBaseConnection has also fields to seal.
Merged Simon's seal-more branch into master. With few changes:
- Skipped unrelated "Deprecate tp_list_connection_managers" and "TpConnectionManagerProtocol: deprecate in favour of TpProtocol" for now because tp-glib itself is still using those APIs.
- Squashed "Don't _TP_SEAL parent or priv" into relevant commits.
- Added "Since: 0.UNRELEASED" to new functions and added them into the doc.
(In reply to comment #13)
> - Skipped unrelated "Deprecate tp_list_connection_managers" and
> "TpConnectionManagerProtocol: deprecate in favour of TpProtocol" for now
> because tp-glib itself is still using those APIs.
I've made the fix to stop using them internally and pushed them as well now.