Bug 19423

Summary: Generate stringification functions for enums
Product: Telepathy Reporter: Will Thompson <will>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED MOVED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: low    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2009-01-06 07:37:50 UTC
The group mixin has some code to stringify TpChannelGroupFlags, which was out of sync with the present (it only had cases for the first eight flags, and ignored the others).  It'd make for easier writing of debug output if the codegen produced string constants for each enum member, and a stringification function.
Comment 1 Simon McVittie 2010-05-10 08:56:56 UTC
For the record: the reason we can't have a GEnum or GFlags type for D-Bus things is that putting unrecognised values in these is considered to be a programming error, whereas our enum/flags annotations on D-Bus are merely advisory and we have to be prepared to receive whatever the other end sends us.

At the D-Bus level, it's just an integer of the appropriate type - Telepathy usually uses unsigned 32-bit, but Geoclue uses signed 32-bit, and the Telepathy DTMF interface uses an unsigned byte.

In particular, the other end might be using a version of telepathy-python that implements a newer spec than we do, so its in-range values might be out-of-range from our perspective.
Comment 2 GitLab Migration User 2019-12-03 19:23:10 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-glib/issues/11.

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.