CAPS Universe documentation  1.0.4
All you need to know to be successful
Functions
Define the printer device capabilities

Printer Device Capabilities helper functions. More...

Functions

void caps_drv_printer_desc_set (struct caps_drv *cdrv, const struct caps_ppd_base *desc)
 

Detailed Description

Function Documentation

◆ caps_drv_printer_desc_set()

void caps_drv_printer_desc_set ( struct caps_drv cdrv,
const struct caps_ppd_base desc 
)

Setup the main printer description

Parameters
[in]cdrvlibcapsdriver handle
[in]descThe main printer description

This is an important call to introduce your printer device to the whole CAPS universe.

Note
It can be called more than once in the run-time of your driver. For example if your driver can detect changes at the printer's side (different paper loaded, different local settings) you can call this function again, to make it public (assumption is, you have adapted the printer description in desc as well).
Precondition
Can be used in the caps_generic_driver::printer_adaptions() callback (and any later callbacks, in caps_generic_driver::printer_monitor() for example)
Bug:
It copies the main structure, but it isn't a deep copy. Thus, changing the content of the external resources will result into undefined behaviour.