6

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.

luffy
  • 2,246
  • 3
  • 22
  • 28
  • 1
    `If, not is there a way to view the web interface source code to see how they did it ?` Of course, https://www.cups.org/software.php – deviantfan Feb 11 '15 at 12:43
  • Thanks. But I really need to be sure that the API can't get me anywhere before diving into uncommented source code :p – luffy Feb 11 '15 at 12:48

0 Answers0