#include <stdint.h>
#include <sane/sane.h>
+/*******************************************************************************
+ * option bitmasks
+ ******************************************************************************/
+
+#define EXISTS_OPTION (group, option_bit) group >> option_bit & 1
+
+#define BIT_SCAN_SOURCE 0
+#define BIT_COLOR_MODE 1
+#define BIT_DPI 2
+#define BIT_SCAN_SIDE 3
+
+#define BIT_CROPPING_MODE 0
+#define BIT_CROPPING_IMAGE 1
+#define BIT_IMAGE_OFFSET_X 2
+#define BIT_IMAGE_OFFSET_Y 3
+#define BIT_IMAGE_WIDTH 4
+#define BIT_IMAGE_HEIGHT 5
+
+#define BIT_FOREGROUND_BOLDNESS_MODE 0
+#define BIT_FOREGROUND_BOLDNESS_AGGRESSIVENESS 1
+#define BIT_BACKGROUND_SMOOTHING_MODE 2
+#define BIT_BACKGROUND_SMOOTHING_AGGRESSIVENESS 3
+
+#define BIT_COLOR_DROP_OUT 0
+#define BIT_COLOR_DROP_OUT_AGGRESSIVENESS 1
+#define BIT_COLOR_AUTO_BRIGHTNESS_MODE 2
+#define BIT_COLOR_BRIGHTNESS 3
+#define BIT_COLOR_CONTRAST 4
+#define BIT_COLOR_BALANCE_MODE 5
+#define BIT_COLOR_BALANCE_AGGRESSIVENESS 6
+#define BIT_COLOR_BALANCE_RED 7
+#define BIT_COLOR_BALANCE_GREEN 8
+#define BIT_COLOR_BALANCE_BLUE 9
+#define BIT_COLOR_SHARPEN 10
+#define BIT_BINARIZATION_CONTRAST 11
+#define BIT_RESET 12
+
+#define BIT_SKIP_BLANK_PAGES 0
+#define BIT_SKIP_BLANK_PAGES_CONTENT 1
+#define BIT_HOLE_FILL 2
+#define BIT_POST_SCAN_ROTATION 3
+#define BIT_EDGE_FILL 4
+#define BIT_IMAGE_BORDER 5
+#define BIT_JPEG_QUALITY 6
+
+#define BIT_AUTOSTART 0
+#define BIT_MAX_DOCUMENT_LENGTH 1
+#define BIT_TRANSPORT_HANDLING 2
+#define BIT_MULTIFEED_SENSITIVITY 3
+#define BIT_MULTIFEED_RESPONSE 4
+#define BIT_DOCUMENT_FEEDER_TIMEOUT 5
+#define BIT_DOCUMENT_FEEDER_TIMEOUT_RESPONSE 6
+
+/*******************************************************************************
+ * option names
+ ******************************************************************************/
+
#define OPTION_COUNT "OptionCount"
#define STANDARD_GROUP "StandardGroup"
#define DOCUMENT_FEEDER_TIMEOUT "DocumentFeederTimeout"
#define DOCUMENT_FEEDER_TIMEOUT_RESPONSE "DocumentFeederTimeoutResponse"
+/*******************************************************************************
+ * methods
+ ******************************************************************************/
+
typedef enum {
PROFILE_MIN,
PROFILE_230802_V1_0_36,