CAPS Universe documentation  1.0.4
All you need to know to be successful
Callback printer_adaptions()

Its called after the command line parameter parsing is done and all kind of information is available.

  • parameter you get
    • framework handle
    • your private data hint (if already set in Callback init(), else it is NULL)
  • you can expect as already done
    • all INI files are already read in and you can use to query all settings
    • the communication to the printer is established and configured (refer Feature: printing data buffer_size)
    • but there is still no established connection to the printing coordinator!
  • what you can do
    • you can allocate your private memory and register it for the other callbacks via caps_drv_private_set() (if not already done, yet)
    • you can query all INI file based settings via the setup API and adapt your own settings, mostly to setup your own printer description (refer caps_ppd_base)
    • on demand configure your printer device somwhow
    • setup tweaks for your printer device if nessesary (note: no supported yet this way, refer Feature: control printer monitoring instead)
  • what you must do
  • values you should return
    • 0 everything is okay, the framework can continue
    • -ENODEV It isn't the expected printing device or something else is bad with this device and the framework should terminate

Functions related to this state:

Note
This callback is optional.