-CHANGES.txt - 2.1b1 - 2015-01-26
+CHANGES.txt - 2.1b1 - 2015-01-27
--------------------------------
CHANGES IN CUPS V2.1b1
- The IPP backend now sends the job-pages-per-set attribute when
printing multiple copy jobs with finishings
(<rdar://problem/16792757>)
+ - The IPP backend now updates the cupsMandatory values when the printer
+ configuration changes (<rdar://problem/18126570>)
- No longer install banner files since third-party banner filters now
supply their own (STR #4518)
"printer-alert",
"printer-alert-description",
"printer-is-accepting-jobs",
+ "printer-mandatory-job-attributes",
"printer-state",
"printer-state-message",
"printer-state-reasons"
static cups_array_t *state_reasons; /* Array of printe-state-reasons keywords */
static char tmpfilename[1024] = "";
/* Temporary spool file name */
+static char mandatory_attrs[1024] = "";
+ /* cupsMandatory value */
/*
* Load the PPD file and generate PWG attribute mapping information...
*/
+ ppd_attr_t *mandatory; /* cupsMandatory value */
+
ppd = ppdOpenFile(getenv("PPD"));
pc = _ppdCacheCreateWithPPD(ppd);
ppdMarkDefaults(ppd);
cupsMarkOptions(ppd, num_options, options);
+
+ if ((mandatory = ppdFindAttr(ppd, "cupsMandatory", NULL)) != NULL)
+ strlcpy(mandatory_attrs, mandatory->value, sizeof(mandatory_attrs));
}
}
else
{
ipp_attribute_t *pa, /* printer-alert */
*pam, /* printer-alert-message */
+ *pmja, /* printer-mandatory-job-attributes */
*psm, /* printer-state-message */
*reasons, /* printer-state-reasons */
*marker; /* marker-* attributes */
IPP_TAG_TEXT)) != NULL)
report_attr(pam);
+ if ((pmja = ippFindAttribute(ipp, "printer-mandatory-job-attributes", IPP_TAG_KEYWORD)) != NULL)
+ {
+ int i, /* Looping var */
+ count = ippGetCount(pmja); /* Number of values */
+
+ for (i = 0, valptr = value; i < count; i ++, valptr += strlen(valptr))
+ {
+ if (i)
+ snprintf(valptr, sizeof(value) - (size_t)(valptr - value), " %s", ippGetString(pmja, i, NULL));
+ else
+ strlcpy(value, ippGetString(pmja, i, NULL), sizeof(value));
+ }
+
+ if (strcmp(value, mandatory_attrs))
+ {
+ strlcpy(mandatory_attrs, value, sizeof(mandatory_attrs));
+ fprintf(stderr, "PPD: cupsMandatory=\"%s\"\n", value);
+ }
+ }
+
if ((psm = ippFindAttribute(ipp, "printer-state-message",
IPP_TAG_TEXT)) != NULL)
{