lib: Move fp_dev helpers to fpi-dev.h from fpi-core.h

This commit is contained in:
Bastien Nocera 2018-09-28 13:41:43 +02:00
parent d3aaebb352
commit 5b9f81fb46
4 changed files with 27 additions and 23 deletions

View file

@ -528,25 +528,6 @@ API_EXPORTED int fp_dev_supports_dscv_print(struct fp_dev *dev,
0, print->driver_id, print->devtype, 0); 0, print->driver_id, print->devtype, 0);
} }
libusb_device_handle *
fpi_dev_get_usb_dev(struct fp_dev *dev)
{
return dev->udev;
}
void
fpi_dev_set_nr_enroll_stages(struct fp_dev *dev,
int nr_enroll_stages)
{
dev->nr_enroll_stages = nr_enroll_stages;
}
struct fp_print_data *
fpi_dev_get_verify_data(struct fp_dev *dev)
{
return dev->verify_data;
}
/** /**
* fp_driver_get_name: * fp_driver_get_name:
* @drv: the driver * @drv: the driver

View file

@ -20,7 +20,3 @@
#include <libusb.h> #include <libusb.h>
#include <fprint.h> #include <fprint.h>
libusb_device_handle *fpi_dev_get_usb_dev(struct fp_dev *dev);
void fpi_dev_set_nr_enroll_stages(struct fp_dev *dev,
int nr_enroll_stages);
struct fp_print_data *fpi_dev_get_verify_data(struct fp_dev *dev);

View file

@ -96,3 +96,22 @@ FP_INSTANCE_DATA (struct fp_dev *dev)
return dev->instance_data; return dev->instance_data;
} }
libusb_device_handle *
fpi_dev_get_usb_dev(struct fp_dev *dev)
{
return dev->udev;
}
void
fpi_dev_set_nr_enroll_stages(struct fp_dev *dev,
int nr_enroll_stages)
{
dev->nr_enroll_stages = nr_enroll_stages;
}
struct fp_print_data *
fpi_dev_get_verify_data(struct fp_dev *dev)
{
return dev->verify_data;
}

View file

@ -20,6 +20,9 @@
#ifndef __FPI_DEV_H__ #ifndef __FPI_DEV_H__
#define __FPI_DEV_H__ #define __FPI_DEV_H__
#include <libusb.h>
#include <fprint.h>
struct fp_dev; struct fp_dev;
/** /**
@ -37,4 +40,9 @@ void fp_dev_set_instance_data (struct fp_dev *dev,
void *instance_data); void *instance_data);
void *FP_INSTANCE_DATA (struct fp_dev *dev); void *FP_INSTANCE_DATA (struct fp_dev *dev);
libusb_device_handle *fpi_dev_get_usb_dev(struct fp_dev *dev);
void fpi_dev_set_nr_enroll_stages(struct fp_dev *dev,
int nr_enroll_stages);
struct fp_print_data *fpi_dev_get_verify_data(struct fp_dev *dev);
#endif #endif