CUPS seems to now be requiring a http_t* http; variable in cupsGetDests(&dests); method and right now I don't know what to do since I haven't found any reference online yet.
I already did some search and got some code:
#include "assets/cups/cups.h"
#include <iostream>
void list_printers(){
cups_dest_t* dests;
int num_dests = cupsGetDests(&dests);
for(int i=0; i<num_dests; i++){
std::cout << dests[i].name << endl;
}
}
But this code does not include the http variable in the cupsGetDests() method and I wasn't able to find any other code snippet featuring this. Thanks!
As explained in CUPS Programming Manual:
You want to use the
cupsGetDests2function: