libflashrom: add querying functions with meson integration

Work based on lukasz.dmitrowski@gmail.com code

Change-Id: I49041b8fa5700dabe59fef0d2337339d34cd6c6f
Signed-off-by: Artur Raglis <artur.raglis@3mdeb.com>
Signed-off-by: Lukasz Dmitrowski <lukasz.dmitrowski@gmail.com>
Signed-off-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/34363
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/libflashrom.h b/libflashrom.h
index 38c95d2..a0da6df 100644
--- a/libflashrom.h
+++ b/libflashrom.h
@@ -37,6 +37,50 @@
 typedef int(flashrom_log_callback)(enum flashrom_log_level, const char *format, va_list);
 void flashrom_set_log_callback(flashrom_log_callback *);
 
+/** @ingroup flashrom-query */
+enum flashrom_test_state {
+	FLASHROM_TESTED_OK  = 0,
+	FLASHROM_TESTED_NT  = 1,
+	FLASHROM_TESTED_BAD = 2,
+	FLASHROM_TESTED_DEP = 3,
+	FLASHROM_TESTED_NA  = 4,
+};
+
+struct flashrom_flashchip_info {
+	const char *vendor;
+	const char *name;
+	unsigned int total_size;
+	struct flashrom_tested {
+		enum flashrom_test_state probe;
+		enum flashrom_test_state read;
+		enum flashrom_test_state erase;
+		enum flashrom_test_state write;
+	} tested;
+};
+
+struct flashrom_board_info {
+	const char *vendor;
+	const char *name;
+	enum flashrom_test_state working;
+};
+
+struct flashrom_chipset_info {
+	const char *vendor;
+	const char *chipset;
+	uint16_t vendor_id;
+	uint16_t chipset_id;
+	enum flashrom_test_state status;
+};
+
+const char *flashrom_version_info(void);
+void flashrom_system_info(void);
+const char **flashrom_supported_programmers(void);
+struct flashrom_flashchip_info *flashrom_supported_flash_chips(void);
+struct flashrom_board_info *flashrom_supported_boards(void);
+struct flashrom_chipset_info *flashrom_supported_chipsets(void);
+int flashrom_data_free(void *const p);
+
+/** @ingroup flashrom-prog */
 struct flashrom_programmer;
 int flashrom_programmer_init(struct flashrom_programmer **, const char *prog_name, const char *prog_params);
 int flashrom_programmer_shutdown(struct flashrom_programmer *);