[Telepathy] Announcing Telepathy 0.99.6
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue Jan 21 04:30:32 PST 2014
On 20/01/14 17:35, David Edmundson wrote:
> In TpQt we autogenerate structs from the spec then make nice wrappers
> round things.
If the autogenerated structs live in the same namespace as the "more OO"
wrappers, you're going to get this problem. In telepathy-glib, we used
various informal sub-namespaces:
* TP_HASH_TYPE_*, TP_STRUCT_TYPE_*, TP_ARRAY_TYPE_* for GType names,
where GObject convention would normally use TP_TYPE_*
* TP_IFACE_*, TP_IFACE_QUARK_* for interface names
* tp_cli_*, tp_svc_*, etc. for client- and service-side functions
We do use "unadorned" types for enums and flags. I thought about this
when planning Telepathy 1.0, and my conclusion was that not exposing
enums and flags from the spec as "first class" API is just too painful -
we'd end up wrapping them all in a handwritten type that's effectively
identical. So I'd be inclined to say the spec effectively has stronger
API guarantees for enums and flags than it does for everything else.
> In a bodge commit I made to move forwards I patch the specification so
> that the autogenerated structure is still called SimplePresence.
Short-term: perhaps you could patch that special case into the
code-generation tools instead?
Long-term: as Xavier said, I would recommend moving the autogenerated
struct/array types into another namespace, and aiming to have enough
high-level API coverage to avoid them in "most" KDE-Telepathy code.
S
More information about the telepathy
mailing list