KDK_PRINTER_GET_LIST(3) Library Functions Manual KDK_PRINTER_GET_LIST(3) NAME kdk_printer_get_list - () SYNOPSIS #include extern char** kdk_printer_get_list(); Link with -lkyprinter. Detailed Description The main function of the interface is to obtain all printers locally (both available and unavailable). RETURN VALUE On success, returns a list of printer names of type char**, ending with a NULL string; Generated by alloc and needs to be recycled by kdk_printer_freeall On error, return NULL. EXAMPLES #include "libkyprinter.h" #include int main() { int index = 0; // char **printers = kdk_printer_get_list(); while (printers[index]) { int status = kdk_printer_get_status(printers[index]); printf("%zd: %s , %d0, index + 1, printers[index], status); index++; } kdk_printer_freeall(printers); // index = 0; char **available_printers = kdk_printer_get_available_list(); while (available_printers[index]) { int status = kdk_printer_get_status(available_printers[index]); printf("%zd: %s , %d0, index + 1, available_printers[index], status); index++; } kdk_printer_freeall(available_printers); return 0; } CONFORMING TO These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_printer_get_available_list(), kdk_printer_set_options(), kdk_printer_print_download_remote_file(), kdk_printer_print_local_file(), kdk_printer_cancel_all_jobs(), kdk_printer_get_status(), kdk_printer_get_job_status(), kdk_printer_get_filename() and kdk_printer_freeall(). SEE ALSO kdk_printer_get_available_list(3), kdk_printer_set_options(3), kdk_printer_print_download_remote_file(3), kdk_printer_print_local_file(3), kdk_printer_cancel_all_jobs(3), kdk_printer_get_status(3), kdk_printer_get_job_status(3), kdk_printer_get_filename(3) and kdk_printer_freeall(3). Linux Programmer's Manual Fri Aug 25 2023 KDK_PRINTER_GET_LIST(3)