vnc: use enum for features

Use an enum for the vnc feature bits.  That way they are enumerated
automatically and we don't have to do that manually when adding or
removing features.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20201208115737.18581-4-kraxel@redhat.com
This commit is contained in:
Gerd Hoffmann 2020-12-08 12:57:31 +01:00
parent 5c4b107f88
commit b0c693faa9

View File

@ -438,18 +438,20 @@ enum {
*
*****************************************************************************/
#define VNC_FEATURE_RESIZE 0
#define VNC_FEATURE_HEXTILE 1
#define VNC_FEATURE_POINTER_TYPE_CHANGE 2
#define VNC_FEATURE_WMVI 3
#define VNC_FEATURE_TIGHT 4
#define VNC_FEATURE_ZLIB 5
#define VNC_FEATURE_COPYRECT 6
#define VNC_FEATURE_RICH_CURSOR 7
#define VNC_FEATURE_TIGHT_PNG 8
#define VNC_FEATURE_ZRLE 9
#define VNC_FEATURE_ZYWRLE 10
#define VNC_FEATURE_LED_STATE 11
enum VncFeatures {
VNC_FEATURE_RESIZE,
VNC_FEATURE_HEXTILE,
VNC_FEATURE_POINTER_TYPE_CHANGE,
VNC_FEATURE_WMVI,
VNC_FEATURE_TIGHT,
VNC_FEATURE_ZLIB,
VNC_FEATURE_COPYRECT,
VNC_FEATURE_RICH_CURSOR,
VNC_FEATURE_TIGHT_PNG,
VNC_FEATURE_ZRLE,
VNC_FEATURE_ZYWRLE,
VNC_FEATURE_LED_STATE,
};
#define VNC_FEATURE_RESIZE_MASK (1 << VNC_FEATURE_RESIZE)
#define VNC_FEATURE_HEXTILE_MASK (1 << VNC_FEATURE_HEXTILE)