I need to detect available/connected printers using CUPS and allow the user to add them, basically replicating the "Add printer" functionality in the CUPS Web interface (localhost:631). I have already tried:
cups_dest_t *dests;
int num_dests = cupsGetDests(&dests);
but I only get the printers that are already installed/configured!
Is this at all possible with the API ? If, not is there a way to view the web interface source code to see how they did it ?
Thanks!
Edit1:
I'am still stuck on the same problem. During my research I found out that CUPS has an extra low level API (https://www.cups.org/documentation.php/doc-2.0/api-httpipp.html) and using the "cupsDoRequest()" it should be possible to get what I want, at least in theory. The programming Manual I'am currently reading is: http://uw714doc.sco.com/en/cups/spm.html. If I get to something I will post it here, nevertheless any help/hint is very appreciated.