This is based on (and includes unchanged) Auke Booij's patch to protocol.xml to add enum type information. This ignores whether an enumeration is a bitmap, but that seems to be clear from the summary text.