Bug 19423 - Generate stringification functions for enums
Summary: Generate stringification functions for enums
Status: NEW
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: low enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-06 07:37 UTC by Will Thompson
Modified: 2010-05-10 08:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.