Export scan type for each driver

For each driver, export the scan type supported by the devices it
handles. This allows front-ends to direct the user better.
This commit is contained in:
Bastien Nocera
2008-11-20 14:40:01 +00:00
committed by Daniel Drake
parent 1fd247ecd7
commit 29044d9ca9
12 changed files with 31 additions and 0 deletions

View File

@@ -710,6 +710,16 @@ API_EXPORTED uint16_t fp_driver_get_driver_id(struct fp_driver *drv)
return drv->id;
}
/** \ingroup drv
* Retrieves the scan type for the devices associated with the driver.
* \param drv the driver
* \returns the scan type
*/
API_EXPORTED enum fp_scan_type fp_driver_get_scan_type(struct fp_driver *drv)
{
return drv->scan_type;
}
static struct fp_img_dev *dev_to_img_dev(struct fp_dev *dev)
{
if (dev->drv->type != DRIVER_IMAGING)