summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-27 16:35:06 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-27 16:35:06 +0000
commit6861ea448041942cb26ca22854d1d34907682a4f (patch)
tree1589bc1df1a30f6a9b9a05e1e36d09ebe406d8b5 /libjava
parent4e2db0ad8a2a1ead055c58c5adbe586a817caa25 (diff)
downloadgcc-6861ea448041942cb26ca22854d1d34907682a4f.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158789 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/classpath/ChangeLog10
-rw-r--r--libjava/classpath/gnu/javax/print/ipp/IppPrintService.java11
-rw-r--r--libjava/classpath/gnu/javax/print/ipp/IppRequest.java8
-rw-r--r--libjava/classpath/gnu/javax/print/ipp/IppResponse.java11
-rw-r--r--libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.classbin20186 -> 20439 bytes
-rw-r--r--libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.classbin9227 -> 9426 bytes
-rw-r--r--libjava/classpath/lib/gnu/javax/print/ipp/IppRequest.classbin8604 -> 8604 bytes
-rw-r--r--libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.classbin13156 -> 13186 bytes
-rw-r--r--libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.classbin2476 -> 2476 bytes
9 files changed, 35 insertions, 5 deletions
diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog
index 71db5159ff7..f98d1c95b1e 100644
--- a/libjava/classpath/ChangeLog
+++ b/libjava/classpath/ChangeLog
@@ -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>
* HACKING: Update required Automake version.
diff --git a/libjava/classpath/gnu/javax/print/ipp/IppPrintService.java b/libjava/classpath/gnu/javax/print/ipp/IppPrintService.java
index ce3ef9e1538..56a41381fb6 100644
--- a/libjava/classpath/gnu/javax/print/ipp/IppPrintService.java
+++ b/libjava/classpath/gnu/javax/print/ipp/IppPrintService.java
@@ -356,8 +356,17 @@ public class IppPrintService implements PrintService
// 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
Set uris = getPrinterAttributeSet(PrinterUriSupported.class);
printerUris = new ArrayList(uris.size());
diff --git a/libjava/classpath/gnu/javax/print/ipp/IppRequest.java b/libjava/classpath/gnu/javax/print/ipp/IppRequest.java
index 3de88715a68..869f8224be9 100644
--- a/libjava/classpath/gnu/javax/print/ipp/IppRequest.java
+++ b/libjava/classpath/gnu/javax/print/ipp/IppRequest.java
@@ -434,6 +434,8 @@ public class IppRequest
PrinterURI printerUri = (PrinterURI) attributes.get(PrinterURI.class);
JobUri jobUri = (JobUri) attributes.get(JobUri.class);
JobId jobId = (JobId) attributes.get(JobId.class);
+ RequestedAttributes reqAttrs
+ = (RequestedAttributes)attributes.get(RequestedAttributes.class);
if (printerUri != null && jobId == null && jobUri == null)
{
write(printerUri);
@@ -467,6 +469,12 @@ public class IppRequest
logger.log(Component.IPP, "Attribute: Name: <" + jobUri.getCategory()
.getName() + "> Value: <" + jobUri.toString() + ">");
}
+ else if (reqAttrs != null)
+ {
+ write(reqAttrs);
+ attributes.remove(RequestedAttributes.class);
+ logger.log(Component.IPP, "RequestedAttributes: <" + reqAttrs + ">");
+ }
else
{
throw new IppException("Unknown target operation attribute combination.");
diff --git a/libjava/classpath/gnu/javax/print/ipp/IppResponse.java b/libjava/classpath/gnu/javax/print/ipp/IppResponse.java
index 21784d0f076..81a1eb47b03 100644
--- a/libjava/classpath/gnu/javax/print/ipp/IppResponse.java
+++ b/libjava/classpath/gnu/javax/print/ipp/IppResponse.java
@@ -302,11 +302,14 @@ public class IppResponse
// out-of-band values
case IppValueTag.UNSUPPORTED:
case IppValueTag.UNKNOWN:
- case IppValueTag.NO_VALUE:
// TODO implement out-of-band handling
- // We currently throw an exception to see when it occurs - not yet :-)
- throw new IppException(
- "Unexpected name value for out-of-band value tag");
+ // We currently throw an exception to see when it occurs - not yet :-)
+ throw new IppException(
+ "Unexpected name value for out-of-band value tag " + tag);
+ case IppValueTag.NO_VALUE:
+ attribute = null;
+
+ break;
case IppValueTag.INTEGER:
int intValue = IppUtilities.convertToInt(value);
attribute = IppUtilities.getIntegerAttribute(name, intValue);
diff --git a/libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class b/libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class
index c44e1cf7f15..7ec693ef159 100644
--- a/libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class
+++ b/libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class
Binary files differ
diff --git a/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class b/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class
index c4e62948ad1..a7697f9415a 100644
--- a/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class
+++ b/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class
Binary files differ
diff --git a/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest.class b/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest.class
index aadef6cb135..039067c89a4 100644
--- a/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest.class
+++ b/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest.class
Binary files differ
diff --git a/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class b/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class
index 2d0d8045d7e..89113302b68 100644
--- a/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class
+++ b/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class
Binary files differ
diff --git a/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class b/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class
index 0653dc80c97..995c0e1441f 100644
--- a/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class
+++ b/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class
Binary files differ