From 8ca34303f29d8d27e2d9e101d2be144a5b4d291a Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Mon, 12 Nov 2018 13:59:26 +0100
Subject: [PATCH] lib: Transform fp_img_driver flags into a FpiImgDriverFlags
 enum

And document it.
---
 doc/libfprint-sections.txt |  2 +-
 libfprint/fpi-core.h       | 14 +++++++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/doc/libfprint-sections.txt b/doc/libfprint-sections.txt
index 525c4c0..94899a2 100644
--- a/doc/libfprint-sections.txt
+++ b/doc/libfprint-sections.txt
@@ -234,7 +234,7 @@ fp_driver_type
 <SECTION>
 <INCLUDE>fpi-core.h</INCLUDE>
 <FILE>fpi-core-img</FILE>
-FP_IMGDRV_SUPPORTS_UNCONDITIONAL_CAPTURE
+FpiImgDriverFlags
 fp_img_driver
 </SECTION>
 
diff --git a/libfprint/fpi-core.h b/libfprint/fpi-core.h
index cbc2255..7cf0e57 100644
--- a/libfprint/fpi-core.h
+++ b/libfprint/fpi-core.h
@@ -55,12 +55,20 @@ struct fp_driver {
 	int (*capture_stop)(struct fp_dev *dev);
 };
 
-/* flags for fp_img_driver.flags */
-#define FP_IMGDRV_SUPPORTS_UNCONDITIONAL_CAPTURE (1 << 0)
+/**
+ * FpiImgDriverFlags:
+ * @FP_IMGDRV_SUPPORTS_UNCONDITIONAL_CAPTURE: Whether the driver supports
+ *   unconditional image capture. No driver currently does.
+ *
+ * Flags used in the #fp_img_driver to advertise the capabilities of drivers.
+ */
+typedef enum {
+	FP_IMGDRV_SUPPORTS_UNCONDITIONAL_CAPTURE = 1 << 0
+} FpiImgDriverFlags;
 
 struct fp_img_driver {
 	struct fp_driver driver;
-	uint16_t flags;
+	FpiImgDriverFlags flags;
 	int img_width;
 	int img_height;
 	int bz3_threshold;