remove imgdev abstraction from public API

Make it easier for application developers, don't have to care about this
level of abstraction which we're intending to make superfluous to them.
This commit is contained in:
Daniel Drake
2007-11-02 17:04:19 +00:00
parent fc77786e46
commit 7e6f25908b
6 changed files with 61 additions and 21 deletions

View File

@@ -43,7 +43,6 @@ int main(void)
struct fp_dscv_dev *ddev;
struct fp_dscv_dev **discovered_devs;
struct fp_dev *dev;
struct fp_img_dev *imgdev;
struct fp_img *img = NULL;
r = fp_init();
@@ -71,16 +70,14 @@ int main(void)
exit(1);
}
imgdev = fp_dev_to_img_dev(dev);
if (!imgdev) {
fprintf(stderr, "could not get image dev, is this an imaging "
"device?\n");
if (!fp_dev_supports_imaging(dev)) {
fprintf(stderr, "this device does not have imaging capabilities.\n");
goto out_close;
}
printf("Opened device. It's now time to scan your finger.\n\n");
r = fp_imgdev_capture(imgdev, 0, &img);
r = fp_dev_img_capture(dev, 0, &img);
if (r) {
fprintf(stderr, "image capture failed, code %d\n", r);
goto out_close;