• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/netatalk-2.2.5/etc/papd/

Lines Matching refs:printer

50 #include "printer.h"
65 static int cups_mangle_printer_name ( struct printer *pr, struct printer *printers);
66 static void cups_free_printer ( struct printer *pr);
92 * 'cups_printername_ok()' - Verify supplied printer name is a valid cups printer
95 int /* O - 1 if printer name OK */
96 cups_printername_ok(char *name) /* I - Name of printer */
102 char uri[HTTP_MAX_URI]; /* printer-uri attribute */
129 * printer-uri
146 "requested-attributes", NULL, "printer-uri");
151 "printer-uri", NULL, uri);
159 LOG(log_error, logtype_papd, "Unable to get printer status for %s - %s", name,
169 LOG(log_error, logtype_papd, "Unable to get printer status for %s - %s", name,
191 cups_get_printer_status (struct printer *pr)
199 char uri[HTTP_MAX_URI]; /* printer-uri attribute */
202 static const char *pattrs[] = /* Requested printer attributes */
204 "printer-state",
205 "printer-state-message",
206 "printer-is-accepting-jobs"
227 * Generate the printer URI...
241 * printer-uri
263 "printer-uri", NULL, uri);
271 LOG(log_error, logtype_papd, "Unable to get printer status for %s - %s", pr->p_printer,
279 LOG(log_error, logtype_papd, "Unable to get printer status for %s - %s", pr->p_printer,
287 * Get the current printer status and convert it to the status values.
292 if ((attr = ippFindAttribute(response, "printer-state", IPP_TAG_ENUM)) != NULL)
302 if ((attr = ippFindAttribute(response, "printer-is-accepting-jobs", IPP_TAG_BOOLEAN)) != NULL)
310 if ((attr = ippFindAttribute(response, "printer-state-message", IPP_TAG_TEXT)) != NULL)
360 LOG(log_error, logtype_papd, "Unable to print job '%s' (%s) to printer '%s' for user '%s' - CUPS error : '%s'", job, filepath, name, username, ippErrorString(cupsLastError()));
362 LOG(log_info, logtype_papd, "Job '%s' queued to printer '%s' with id '%d'", job, name, jobid);
371 struct printer *
372 cups_autoadd_printers ( struct printer *defprinter, struct printer *printers)
374 struct printer *pr;
386 if (( pr = (struct printer *)malloc( sizeof( struct printer ))) == NULL ) {
391 memcpy( pr, defprinter, sizeof( struct printer ) );
411 /* set printer flags */
455 * Mangles the printer name if two CUPS printer provide the same Chooser Name
460 static int cups_mangle_printer_name ( struct printer *pr, struct printer *printers)
566 * check if a printer with this name already exists.
567 * if yes, and replace = 1 the existing printer is replaced with
568 * the new one. This allows to overwrite printer settings
572 int cups_check_printer ( struct printer *pr, struct printer *printers, int replace)
574 struct printer *listptr, *listprev;
581 if ( pr->p_flags & P_CUPS_AUTOADDED ) { /* Check if printer has been autoadded */
585 return (1); /* Never replace a hand edited printer with auto one */
589 /* Replace printer */
614 cups_free_printer ( struct printer *pr)
624 * so if the printer is autoadded we won't free them.