michaelrsweet / pappl

PAPPL - Printer Application Framework
https://www.msweet.org/pappl
Apache License 2.0
309 stars 49 forks source link

Need API access to printer->uriname #97

Closed tillkamppeter closed 3 years ago

tillkamppeter commented 3 years ago

Describe the solution you'd like As already described in issue #90 I want to add an extra web interface page to the printers for the "Installable options and, unfortunately, I got stuck again. With that issue being resolved I want to add code like

    snprintf(path, sizeof(path), "%s/installable", printer->uriname);
    papplSystemAddResourceCallback(system, path, "text/html", (pappl_resource_cb_t)ps_printer_web_installable, printer);
    papplPrinterAddLink(printer, "Installable Options", path, true);

to the new printer create callback. The callback gets the printer data structure, but the internal structure of it is private, so the shown code in my printer application does not work. There is also no accessor function for printer->uriname. Could you access one?

michaelrsweet commented 3 years ago

[master 9671a84] Add papplPrinterGetPath API (Issue #97)