Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scanning: Scanner object, driver Interface, etc. #130

Open
13 tasks
michaelrsweet opened this issue Jan 18, 2021 · 3 comments
Open
13 tasks

Scanning: Scanner object, driver Interface, etc. #130

michaelrsweet opened this issue Jan 18, 2021 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@michaelrsweet
Copy link
Owner

In order to support multi-function devices and standalone scanners, PAPPL should provide APIs, interfaces, and objects for scanning, with the goal of providing IPP Scan and/or eSCL protocol endpoints (eSCL is used for AirPrint and Mopria, IPP Scan is a published but otherwise unused standard that has the needed semantics/data elements) that can be linked to a printer object and/or used separately.

Specific sub-tasks:

  • Implement pappl_scanner_t object based on pappl_printer_t (adapted to the needs of scanning - 90% duplication here)
  • Update pappl_job_t object to support print or scan jobs (add a pointer to pappl_scanner_t)
  • Implement pappl_sc_driver_data_t structure based on pappl_pr_driver_data_t, with corresponding callback functions using the pappl_sc_ prefix. For the purposes of PAPPL scanning, do not support vendor options.
  • Implement pappl_sc_options_t structure based on pappl_pr_options_t. For the purposes of PAPPL scanning, do not support vendor options.
  • Add scanner.h header with public API and scanner-private.h header with private API using appropriately-named header guard macros. These can be patterned after the corresponding printer headers.
  • Add scanner.c file that provides the scanner object constructor and destructor.
  • Add scanner-accessors.c file that provides the scanner object accessor (get/set) functions, patterned on printer-accessors.c
  • Add scanner-driver.c file that provides the scan driver interfaces and attributes, patterned on printer-driver.c.
  • Add scanner-webif.c file that provides scan-specific web pages.
  • Add job-scan.c file that provides scan job processing functions.
  • Add papplPrinterSetScanner API to set the scanner associated with a printer
  • Add papplSystemSetScannerDrivers API to set the list of scanner drivers, callback, etc.
  • Add pappl_sc_autoadd_cb_t, pappl_sc_create_cb_t, pappl_sc_driver_cb_t, and pappl_scanner_cb_t callbacks to system.h.

Need to think about how to auto-associate scanners in printers.

@Kappuccino111
Copy link

@michaelrsweet @tillkamppeter new PR opened : #349

Commit 7190a0b solves:

  • Implement pappl_scanner_t object based on pappl_printer_t (adapted to the needs of scanning - 90% duplication here)
  • Implement pappl_sc_driver_data_t structure based on pappl_pr_driver_data_t, with corresponding callback functions using the pappl_sc_ prefix. For the purposes of PAPPL scanning, do not support vendor options.
  • Implement pappl_sc_options_t structure based on pappl_pr_options_t. For the purposes of PAPPL scanning, do not support vendor options.
  • Add scanner.h header with public API and scanner-private.h header with private API using appropriately-named header guard macros. These can be patterned after the corresponding printer headers.

Please review the above in detail.

@Kappuccino111
Copy link

Commit e24d9e3 marks this as done

  • Update pappl_job_t object to support print or scan jobs (add a pointer to pappl_scanner_t)

@Kappuccino111
Copy link

Commit 317300f marks this as done

  • Add scanner-accessors.c file that provides the scanner object accessor (get/set) functions, patterned on printer-accessors.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants