mirror of git://gcc.gnu.org/git/gcc.git
IppResponse.java (parseAttributes): Handle IppValueTag.UNKNOWN.
2010-04-27 Andrew Haley <aph@redhat.com>
* gnu/javax/print/ipp/IppResponse.java (parseAttributes): Handle
IppValueTag.UNKNOWN.
* gnu/javax/print/ipp/IppRequest.java (writeOperationAttributes):
Handle RequestedAttributes.
* gnu/javax/print/ipp/IppPrintService.java (processResponse): Add
DocFlavor.SERVICE_FORMATTED.PAGEABLE and
DocFlavor.SERVICE_FORMATTED.PRINTABLE.
From-SVN: r158789
This commit is contained in:
parent
e65bb9be49
commit
b656968688
|
|
@ -1,3 +1,13 @@
|
||||||
|
2010-04-27 Andrew Haley <aph@redhat.com>
|
||||||
|
|
||||||
|
* gnu/javax/print/ipp/IppResponse.java (parseAttributes): Handle
|
||||||
|
IppValueTag.UNKNOWN.
|
||||||
|
* gnu/javax/print/ipp/IppRequest.java (writeOperationAttributes):
|
||||||
|
Handle RequestedAttributes.
|
||||||
|
* gnu/javax/print/ipp/IppPrintService.java (processResponse): Add
|
||||||
|
DocFlavor.SERVICE_FORMATTED.PAGEABLE and
|
||||||
|
DocFlavor.SERVICE_FORMATTED.PRINTABLE.
|
||||||
|
|
||||||
2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
2010-04-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||||
|
|
||||||
* HACKING: Update required Automake version.
|
* HACKING: Update required Automake version.
|
||||||
|
|
|
||||||
|
|
@ -356,8 +356,17 @@ public class IppPrintService implements PrintService
|
||||||
// should not happen, all fields are public
|
// should not happen, all fields are public
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.getClass()
|
||||||
|
.isAssignableFrom(gnu.javax.print.CupsPrintService.class))
|
||||||
|
{
|
||||||
|
// CUPS always provides filters to convert from Postscript.
|
||||||
|
// This logic looks odd, but it's what OpenJDK does.
|
||||||
|
flavors.add(DocFlavor.SERVICE_FORMATTED.PAGEABLE);
|
||||||
|
flavors.add(DocFlavor.SERVICE_FORMATTED.PRINTABLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// printer uris
|
// printer uris
|
||||||
Set uris = getPrinterAttributeSet(PrinterUriSupported.class);
|
Set uris = getPrinterAttributeSet(PrinterUriSupported.class);
|
||||||
printerUris = new ArrayList(uris.size());
|
printerUris = new ArrayList(uris.size());
|
||||||
|
|
|
||||||
|
|
@ -434,6 +434,8 @@ public class IppRequest
|
||||||
PrinterURI printerUri = (PrinterURI) attributes.get(PrinterURI.class);
|
PrinterURI printerUri = (PrinterURI) attributes.get(PrinterURI.class);
|
||||||
JobUri jobUri = (JobUri) attributes.get(JobUri.class);
|
JobUri jobUri = (JobUri) attributes.get(JobUri.class);
|
||||||
JobId jobId = (JobId) attributes.get(JobId.class);
|
JobId jobId = (JobId) attributes.get(JobId.class);
|
||||||
|
RequestedAttributes reqAttrs
|
||||||
|
= (RequestedAttributes)attributes.get(RequestedAttributes.class);
|
||||||
if (printerUri != null && jobId == null && jobUri == null)
|
if (printerUri != null && jobId == null && jobUri == null)
|
||||||
{
|
{
|
||||||
write(printerUri);
|
write(printerUri);
|
||||||
|
|
@ -467,6 +469,12 @@ public class IppRequest
|
||||||
logger.log(Component.IPP, "Attribute: Name: <" + jobUri.getCategory()
|
logger.log(Component.IPP, "Attribute: Name: <" + jobUri.getCategory()
|
||||||
.getName() + "> Value: <" + jobUri.toString() + ">");
|
.getName() + "> Value: <" + jobUri.toString() + ">");
|
||||||
}
|
}
|
||||||
|
else if (reqAttrs != null)
|
||||||
|
{
|
||||||
|
write(reqAttrs);
|
||||||
|
attributes.remove(RequestedAttributes.class);
|
||||||
|
logger.log(Component.IPP, "RequestedAttributes: <" + reqAttrs + ">");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new IppException("Unknown target operation attribute combination.");
|
throw new IppException("Unknown target operation attribute combination.");
|
||||||
|
|
|
||||||
|
|
@ -302,11 +302,14 @@ public class IppResponse
|
||||||
// out-of-band values
|
// out-of-band values
|
||||||
case IppValueTag.UNSUPPORTED:
|
case IppValueTag.UNSUPPORTED:
|
||||||
case IppValueTag.UNKNOWN:
|
case IppValueTag.UNKNOWN:
|
||||||
case IppValueTag.NO_VALUE:
|
|
||||||
// TODO implement out-of-band handling
|
// TODO implement out-of-band handling
|
||||||
// We currently throw an exception to see when it occurs - not yet :-)
|
// We currently throw an exception to see when it occurs - not yet :-)
|
||||||
throw new IppException(
|
throw new IppException(
|
||||||
"Unexpected name value for out-of-band value tag");
|
"Unexpected name value for out-of-band value tag " + tag);
|
||||||
|
case IppValueTag.NO_VALUE:
|
||||||
|
attribute = null;
|
||||||
|
|
||||||
|
break;
|
||||||
case IppValueTag.INTEGER:
|
case IppValueTag.INTEGER:
|
||||||
int intValue = IppUtilities.convertToInt(value);
|
int intValue = IppUtilities.convertToInt(value);
|
||||||
attribute = IppUtilities.getIntegerAttribute(name, intValue);
|
attribute = IppUtilities.getIntegerAttribute(name, intValue);
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue