Lines Matching refs:printer

74 printer_name(papi_printer_t printer)
76 papi_attribute_t **attributes = papiPrinterGetAttributeList(printer);
81 "printer-name", &result);
97 char *req[] = { "printer-name", NULL };
104 printf(gettext("system default printer: %s\n"), name);
165 "printer-info", &str);
168 * If no printer-info is read then
169 * by default the printer-info is <printer-name>@<server>
176 "printer-uri-supported", &uri);
196 static char *report_device_keys[] = { "printer-name", "printer-uri-supported",
200 report_device(papi_service_t svc, char *name, papi_printer_t printer,
204 papi_attribute_t **attrs = papiPrinterGetAttributeList(printer);
211 "printer-name", &name);
214 "printer-uri-supported", &name);
221 "printer-uri-supported", &uri);
246 static char *report_accepting_keys[] = { "printer-name",
247 "printer-uri-supported", "printer-is-accepting-jobs",
248 "printer-up-time", "printer-state-time",
252 report_accepting(papi_service_t svc, char *name, papi_printer_t printer,
256 papi_attribute_t **attrs = papiPrinterGetAttributeList(printer);
262 "printer-name", &name);
265 "printer-uri-supported", &name);
271 "printer-is-accepting-jobs", &boolean);
274 "printer-up-time", &curr);
276 "printer-state-time", &curr);
296 static char *report_class_keys[] = { "printer-name", "printer-uri-supported",
300 report_class(papi_service_t svc, char *name, papi_printer_t printer,
304 papi_attribute_t **attrs = papiPrinterGetAttributeList(printer);
315 "printer-name", &name);
318 "printer-uri-supported", &name);
342 "printer-uri-supported", &uri);
367 static char *report_printer_keys[] = { "printer-name",
368 "printer-uri-supported", "printer-state",
369 "printer-up-time", "printer-state-time",
370 "lpsched-disable-date", "printer-state-reasons",
374 report_printer(papi_service_t svc, char *name, papi_printer_t printer,
378 papi_attribute_t **attrs = papiPrinterGetAttributeList(printer);
391 "printer-name", &name);
394 "printer-uri-supported", &name);
399 printf(gettext("printer %s "), name);
402 "printer-state", &pstat);
469 case 0x07: /* faulted printer */
485 "printer-up-time", &curr);
487 "printer-state-time", &curr);
500 "printer-state-reasons", &reason);
533 /* Display the printer description */
539 "lpsched-printer-type", &str);
664 /* Display printer description */
691 * The for loop executes once for every printer
704 gettext("%s: unknown printer\n"),
728 papi_printer_t printer = NULL;
746 NULL, &printer);
749 "Failed to get printer info for %s: %s\n"),
756 if (printer != NULL)
757 result += report(svc, name, printer, verbose,
760 papiPrinterFree(printer);
790 report_job(char *printer, papi_job_t job, int show_rank, int verbose)
806 static char *puri = NULL; /* printer-uri */
807 static char *pname = NULL; /* printer-name */
821 * called multiple times with different printer-names.
832 * Read the attribute "job-printer-uri"
836 "job-printer-uri", &uri);
838 if (printer != NULL) {
840 * Set pname to the printer that is being
845 pname = printer;
850 * Set puri so that "job-printer-uri" corresponding
851 * to a particular printer can be used later when
852 * lpstat is queried for the same printer as
853 * "job-printer-uri" for a printer is read just once.
863 if (printer != NULL) {
864 if (strcasecmp(pname, printer) != 0) {
866 * Read the job-printer-uri as
872 NULL, "job-printer-uri", &uri);
873 pname = printer;
880 * Same printer queried twice
884 * For the same printer 'job-printer-uri'
894 /* Check if it is local printer or remote printer */
918 * It's a remote printer.
928 * If attribute "job-printer-uri"
962 "job-printer-uri", &destination);
964 "printer-name", &destination);
971 snprintf(request, sizeof (request), "%s-%d", printer, id);
1034 char *printer = request;
1041 status = papiServiceCreate(&svc, printer, NULL, NULL,
1044 if ((status == PAPI_OK) && (printer != NULL))
1047 /* <name>-# printer name does not exist */
1056 get_printer_id(printer, &printer, &id);
1058 status = papiServiceCreate(&svc, printer, NULL, NULL,
1064 (printer ? printer : "all"),
1070 if (printer == NULL) { /* all */
1080 } else if (id == -1) { /* a printer */
1083 status = papiPrinterListJobs(svc, printer, NULL,
1097 result += report(printer,
1113 id = job_to_be_queried(svc, printer, id);
1116 status = papiJobQuery(svc, printer, id,
1134 result = report(printer, job,
1142 get_printer_id(printer, &printer, &id);