]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2010-04-27 Andrew Haley <aph@redhat.com>
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Apr 2010 16:35:06 +0000 (16:35 +0000)
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 27 Apr 2010 16:35:06 +0000 (16:35 +0000)
        * 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

libjava/classpath/ChangeLog
libjava/classpath/gnu/javax/print/ipp/IppPrintService.java
libjava/classpath/gnu/javax/print/ipp/IppRequest.java
libjava/classpath/gnu/javax/print/ipp/IppResponse.java
libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class
libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class
libjava/classpath/lib/gnu/javax/print/ipp/IppRequest.class
libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class
libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class

index 71db5159ff756a159b7d415f1bfe58225478c889..f98d1c95b1e85ca0c3bb7d1c318361d1c050c392 100644 (file)
@@ -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.
index ce3ef9e15386cf6587c8710cfd8b2ba804e9676d..56a41381fb65c05f2b9353dd5ec834611ca11ee1 100644 (file)
@@ -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());
index 3de88715a6807ac3096d5a27e0750480bef1e755..869f8224be9f77c68d3d94c892fb69f9f891dc64 100644 (file)
@@ -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.");
index 21784d0f07623f8b27de48d501aed13b2b4ba485..81a1eb47b0309a556ca8193358eb29997096c7f0 100644 (file)
@@ -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);
index c44e1cf7f15803a7d346d926ac3fda023c8cd260..7ec693ef159c1e0b0c181039742b3a780ada1838 100644 (file)
Binary files a/libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class and b/libjava/classpath/lib/gnu/javax/print/ipp/IppPrintService.class differ
index c4e62948ad1aeb5773ba53c213b52e8675bbfb82..a7697f9415a210e041dd0f1d8f00683fefd5fb72 100644 (file)
Binary files a/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class and b/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest$RequestWriter.class differ
index aadef6cb135604c20c441c52872401eb0862b19d..039067c89a4649593976f9034ec723967824a6df 100644 (file)
Binary files a/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest.class and b/libjava/classpath/lib/gnu/javax/print/ipp/IppRequest.class differ
index 2d0d8045d7e2f5e016627ab35470ce059e002c5d..89113302b6839d6ffe8c910a80d8a57f67983e1c 100644 (file)
Binary files a/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class and b/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse$ResponseReader.class differ
index 0653dc80c975eb095cba899c9dedc83988d57ee1..995c0e1441fb500f6b06adf7219cfde0cc433693 100644 (file)
Binary files a/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class and b/libjava/classpath/lib/gnu/javax/print/ipp/IppResponse.class differ