You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ml...@apache.org on 2006/10/09 07:33:21 UTC

svn commit: r454289 [18/22] - in /incubator/harmony/enhanced/classlib/trunk/modules/H-1609: ./ modules/ modules/applet/ modules/applet/src/ modules/applet/src/main/ modules/applet/src/main/java/ modules/applet/src/main/java/java/ modules/applet/src/mai...

Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/PSInterpreter.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/PSInterpreter.java?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/PSInterpreter.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/PSInterpreter.java Sun Oct  8 22:33:09 2006
@@ -0,0 +1,597 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/** 
+ * @author Aleksei V. Ivaschenko 
+ * @version $Revision: 1.3 $ 
+ */ 
+
+package org.apache.harmony.x.print;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+
+import javax.print.DocFlavor;
+import javax.print.PrintException;
+import javax.print.attribute.PrintRequestAttributeSet;
+import javax.print.attribute.standard.MediaSize;
+import javax.print.attribute.standard.MediaSizeName;
+import javax.print.attribute.standard.OrientationRequested;
+
+/*
+ * This class implements PostScript interpreter, which
+ * converts PostScript instructions to GDI function calls.
+ * Renders to specified printer's device context. 
+ */
+public class PSInterpreter {
+
+    private GDIClient client = null;
+    private String service = null;
+    private int serviceID = -1;
+    private PrintRequestAttributeSet attributes = null;
+    
+    private BufferedReader source = null;
+    private ArrayList queue = new ArrayList();
+    private String currentLine = null;
+    private int lineIndex = 0;
+    private int searchingIndex = 0;
+
+    private int translateX = 0, translateY = 0;
+    private int scaleWidth = -1, scaleHeight = -1;
+    private double scaleX = 1.0, scaleY = 1.0;
+    private boolean pathOpened = false;
+    private boolean closedPathExists = false;
+    private int logWidth = 0;
+    private int logHeight = 0;
+    
+    private static final int COMMAND_MOVETO = 0;
+    private static final int COMMAND_LINETO = 1;
+    private static final int COMMAND_SETRGBCOLOR = 2;
+    private static final int COMMAND_STROKE = 3;
+    private static final int COMMAND_COLORIMAGE = 4;
+    private static final int COMMAND_TRANSLATE = 5;
+    private static final int COMMAND_SCALE = 6;
+    private static final int COMMAND_ARC = 7;
+    private static final int COMMAND_SHOW = 8;
+    private static final int COMMAND_NEWPATH = 9;
+    private static final int COMMAND_CLOSEPATH = 10;
+    private static final int COMMAND_FILL = 11;
+    private static final int COMMAND_FINDFONT = 12;
+    private static final int COMMAND_SCALEFONT = 13;
+    private static final int COMMAND_SETFONT = 14;
+    private static final int COMMAND_ROTATE = 15;
+    private static final int COMMAND_CLIP = 16;
+    
+    private static final String hexLetters = "0123456789abcdef";
+    
+    private static final String[] commands = {
+        "moveto",
+        "lineto",
+        "setrgbcolor",
+        "stroke",
+        "colorimage",
+        "translate",
+        "scale",
+        "arc",
+        "show",
+        "newpath",
+        "closepath",
+        "fill",
+        "findfont",
+        "scalefont",
+        "setfont",
+        "rotate",
+        "clip"
+    };
+
+    private static final int[] commandsParams = {
+        2, 2, 3, 0, 7, 2, 2, 5, 1, 0, 0, 0, 1, 1, 1, 0, 0
+    };
+
+    /*
+     * Constructs new PSInterpreter instance.
+     */
+    public PSInterpreter(InputStream source, String service, GDIClient client,
+            PrintRequestAttributeSet attributes) {
+        this.source = new BufferedReader(new InputStreamReader(source));
+        this.service = service;
+        this.client = client;
+        this.attributes = attributes;
+        if (service != null) {
+            getPaperDimensions(attributes);
+            serviceID = obtainServiceID(service, logWidth, logHeight);
+        }
+    }
+    
+    /*
+     * Sets up print service. Further rendering is made
+     * to new print service's device context.
+     */
+    public void setPrintService(String service) {
+        this.service = service;
+        if (serviceID >= 0) {
+            releaseServiceID(serviceID);
+            serviceID = -1;
+        }
+        if (service != null) {
+            getPaperDimensions(attributes);
+            serviceID = obtainServiceID(service, logWidth, logHeight);
+        }
+    }
+    
+    /*
+     * Starts parsing of source postscript and rendering
+     * to print service's device context.
+     */
+    public void interpret() throws PrintException {
+        if (serviceID < 0) {
+            throw new PrintException(
+                    "Unrecoverable internal error in GDI client.");
+        }
+        try {
+            currentLine = source.readLine();
+            while (currentLine != null) {
+                if (currentLine.startsWith("%%EOF")) {
+//                    /*
+//                     * Code for debug. Prints additional page.
+//                     */
+//                    startPage(serviceID);
+//                    setRGBColor(serviceID, 0.5, 0.5, 0.5);
+//                    moveTo(serviceID, 50, 50);
+//                    drawText(serviceID, "TEXT TEXT TEXT");
+//                    endPage(serviceID);
+                    if (!endDocument(serviceID)) {
+                        releaseServiceID(serviceID);
+                        serviceID = -1;
+                        throw new PrintException(
+                                "Unable to finish document printing.");
+                    }
+                    releaseServiceID(serviceID);
+                    serviceID = -1;
+                    return;
+                } else if (currentLine.startsWith("%%")) {
+                    interpretComment();
+                } else if (currentLine.startsWith("%") ||
+                           currentLine.startsWith("/")) {
+                    // Nothing to do - simple comment.
+                } else {
+                    String lexem = getNextLexem();
+                    while (lexem != null) {
+//                        System.out.println("Lexem: " + lexem);
+                        queue.add(lexem);
+                        for (int i = 0; i < commands.length; i++) {
+                            if (lexem.equals(commands[i])) {
+                                interpretCommand(i);
+                            }
+                        }
+                        lexem = getNextLexem();
+                    }
+                }
+                currentLine = source.readLine();
+                lineIndex = 0;
+            }
+            endDocument(serviceID);
+        } catch (IOException ioe) {
+            throw new PrintException(
+                    "Unrecoverable internal error in GDI client.");
+        }
+    }
+    
+    private String getNextLexem() throws IOException {
+        String lexem = getNextLexem(currentLine, lineIndex);
+        if (lexem.endsWith(")") || lexem.endsWith("]")) {
+            currentLine = source.readLine();
+            lineIndex = 0;
+            String prefix = (lexem.endsWith(")")) ? "( " : "[ ";
+            String endOfLexem = getNextLexem(prefix + currentLine, lineIndex);
+            if (lexem.length() == 1) {
+                lexem = endOfLexem;
+            } else {
+                lexem = lexem.substring(0, lexem.length() - 1) + endOfLexem;
+            }
+            lineIndex = searchingIndex - 2;
+        } else if (lexem.equals("}")) {
+            while (lexem.equals("}")) {
+                currentLine = source.readLine();
+                lineIndex = 0;
+                lexem = getNextLexem("{" + currentLine, lineIndex);
+                lineIndex = searchingIndex;
+            }
+        } else {
+            lineIndex = searchingIndex;
+            if (lexem.equals("") && lineIndex >= currentLine.length()) {
+                return null;
+            }
+        }
+        return lexem;
+    }
+
+    private String getNextLexem(String line, int index) {
+        String lexem = "";
+        if (index < line.length()) {
+            String character = line.substring(index++, index);
+            while (index < line.length() && character.equals(" ")) {
+                character = line.substring(index++, index);
+            }
+            if (!character.equals(" ")) {
+                if (character.equals("%")) {
+                    searchingIndex = line.length();
+                    return lexem;
+                } else if (character.equals("(")) {
+                    if (index >= line.length()) {
+                        searchingIndex = index;
+                        return ")";
+                    }
+                    character = line.substring(index++, index);
+                    while (!character.equals(")")) {
+                        lexem += character;
+                        if (index < line.length()) {
+                            character = line.substring(index++, index);
+                        } else {
+                            lexem += ")";
+                            break;
+                        }
+                    }
+                } else if (character.equals("[")) {
+                    if (index >= line.length()) {
+                        searchingIndex = index;
+                        return "]";
+                    }
+                    character = line.substring(index++, index);
+                    while (!character.equals("]")) {
+                        lexem += character;
+                        if (index < line.length()) {
+                            character = line.substring(index++, index);
+                        } else {
+                            lexem += "]";
+                            break;
+                        }
+                    }
+                } else if (character.equals("{")) {
+                    if (index >= line.length()) {
+                        searchingIndex = index;
+                        return "}";
+                    }
+                    character = line.substring(index++, index);
+                    while (!character.equals("}")) {
+                        if (index < line.length()) {
+                            character = line.substring(index++, index);
+                        } else {
+                            lexem = "}";
+                            break;
+                        }
+                    }
+                } else {
+                    if (index >= line.length()) {
+                        searchingIndex = index;
+                        return character;
+                    }
+                    while (!character.equals(" ")) {
+                        lexem += character;
+                        if (index < line.length()) {
+                            character = line.substring(index++, index);
+                        } else {
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+        searchingIndex = index;
+        return lexem;
+    }
+
+    private String getNextHexLetter() throws IOException {
+        String hex = null;
+        if (lineIndex < currentLine.length()) {
+            String character =
+                currentLine.substring(lineIndex++, lineIndex).toLowerCase();
+            while (hexLetters.indexOf(character) < 0) {
+                if (lineIndex < currentLine.length()) {
+                    character =
+                        currentLine.substring(lineIndex++,
+                                              lineIndex).toLowerCase();
+                } else {
+                    currentLine = source.readLine();
+                    lineIndex = 0;
+                    return getNextHexLetter();
+                }
+            }
+            hex = character;
+        } else {
+            currentLine = source.readLine();
+            lineIndex = 0;
+            return getNextHexLetter();
+        }
+        return hex;
+    }
+
+    private String getNextHex() throws IOException {
+        return getNextHexLetter() + getNextHexLetter();
+    }
+    
+    private int hex2decimal(String hex) {
+        int multiplier = 1;
+        int decimal = 0;
+        for (int i = hex.length() - 1; i >= 0; i--) {
+            decimal += hexLetters.indexOf(hex.substring(i, i + 1)) * multiplier;
+            multiplier *= 16; 
+        }
+        return decimal;
+    }
+    
+    private void interpretComment() throws PrintException {
+        if (currentLine.startsWith("%%Page:")) {
+            try {
+                String pageName = getNextLexem(currentLine, 7);
+                String pageNumber = getNextLexem(currentLine, searchingIndex);
+                int number = Integer.parseInt(pageNumber);
+                if (!startPage(serviceID)) {
+                    endDocument(serviceID);
+                    throw new PrintException("Unable to start page printing.");
+                }
+            } catch (NumberFormatException nfe) {
+                System.out.println("NumberFormatException occured: " + nfe);
+                nfe.printStackTrace(System.out);
+            }
+        } else if (currentLine.startsWith("%%EndPage:")) {
+            try {
+                String pageName = getNextLexem(currentLine, 10);
+                String pageNumber = getNextLexem(currentLine, searchingIndex);
+                int number = Integer.parseInt(pageNumber);
+                if (pathOpened) {
+                    closePath(serviceID);
+                    pathOpened = false;
+                }
+                endPage(serviceID);
+            } catch (NumberFormatException nfe) {
+                System.out.println("NumberFormatException occured: " + nfe);
+                nfe.printStackTrace(System.out);
+            }
+        } else if (currentLine.startsWith("%%EndSetup") ||
+                   currentLine.startsWith("%%EndComments")) {
+            if (!startDocument(service, serviceID, client.convertAttributes(
+                    attributes,
+                    new DocFlavor.INPUT_STREAM("INTERNAL/postscript")),
+                    client.getJobName(attributes),
+                    client.getDestination(attributes))) {
+                throw new PrintException("Unable to start document printing.");
+            }
+        }
+    }
+
+    private void interpretCommand(int command) throws IOException {
+        if (queue.size() < commandsParams[command] + 1) {
+            System.out.println("Not enough parameters for PS command "
+                    + commands[command]);
+            return;
+        }
+        queue.remove(queue.size() - 1);
+        switch (command) {
+            case COMMAND_MOVETO:
+                try {
+                    double x, y;
+                    y = Double.parseDouble(extractQueueLast());
+                    x = Double.parseDouble(extractQueueLast());
+                    if (!pathOpened) {
+                        beginPath(serviceID);
+                        pathOpened = true;
+                    }
+                    moveTo(serviceID, x, y);
+                } catch (NumberFormatException nfe) {
+                    System.out.println("NumberFormatException occured: " + nfe);
+                    nfe.printStackTrace(System.out);
+                }
+                break;
+            case COMMAND_LINETO:
+                try {
+                    double x, y;
+                    y = Double.parseDouble(extractQueueLast());
+                    x = Double.parseDouble(extractQueueLast());
+                    if (!pathOpened) {
+                        beginPath(serviceID);
+                        pathOpened = true;
+                    }
+                    lineTo(serviceID, x, y);
+                } catch (NumberFormatException nfe) {
+                    System.out.println("NumberFormatException occured: " + nfe);
+                    nfe.printStackTrace(System.out);
+                }
+                break;
+            case COMMAND_SETRGBCOLOR:
+                try {
+                    double r, g, b;
+                    b = Double.parseDouble(extractQueueLast());
+                    g = Double.parseDouble(extractQueueLast());
+                    r = Double.parseDouble(extractQueueLast());
+                    setRGBColor(serviceID, r, g, b);
+                } catch (NumberFormatException nfe) {
+                    System.out.println("NumberFormatException occured: " + nfe);
+                    nfe.printStackTrace(System.out);
+                }
+                break;
+            case COMMAND_NEWPATH:
+                beginPath(serviceID);
+                pathOpened = true;
+                break;
+            case COMMAND_CLOSEPATH:
+                if (pathOpened) {
+                    closePath(serviceID);
+                    pathOpened = false;
+                    closedPathExists = true;
+                }
+                break;
+            case COMMAND_STROKE:
+                if (pathOpened) {
+                    closePath(serviceID);
+                    strokePath(serviceID);
+                    pathOpened = false;
+                } else if (closedPathExists) {
+                    strokePath(serviceID);
+                    closedPathExists = false;
+                }
+                break;
+            case COMMAND_FILL:
+                if (pathOpened) {
+                    closePath(serviceID);
+                    fillPath(serviceID);
+                    pathOpened = false;
+                } else if (closedPathExists) {
+                    fillPath(serviceID);
+                    closedPathExists = false;
+                }
+                break;
+            case COMMAND_COLORIMAGE:
+                if (extractQueueLast().equals("3") &&
+                    extractQueueLast().equals("false")) {
+                    try {
+                        extractQueueLast(); // removing reading procedure
+                        String imageParams = extractQueueLast();
+                        int depth = Integer.parseInt(extractQueueLast());
+                        int height = Integer.parseInt(extractQueueLast());
+                        int width = Integer.parseInt(extractQueueLast());
+                        if (depth == 8) {
+                            int[] imageData = new int[width * height];
+                            for (int j = 0; j < height; j++) {
+                                for (int i = 0; i < width; i++) {
+                                    int color = hex2decimal(getNextHex() +
+                                                            getNextHex() +
+                                                            getNextHex());
+                                    imageData[j * width + i] = color;
+                                }
+                            }
+                            if (scaleWidth < 0 || scaleHeight < 0) {
+                                drawImage(serviceID, translateX, translateY,
+                                       width * scaleX, height * scaleY,
+                                       imageData, width, height);
+                            } else {
+                                drawImage(serviceID, translateX, translateY,
+                                        scaleWidth, scaleHeight,
+                                        imageData, width, height);
+                            }
+                        }
+                    } catch (NumberFormatException nfe) {
+                        System.out.println("NumberFormatException occured: " +
+                                nfe);
+                        nfe.printStackTrace(System.out);
+                    }
+                }
+                break;
+            case COMMAND_TRANSLATE:
+                try {
+                    translateY = Integer.parseInt(extractQueueLast());
+                    translateX = Integer.parseInt(extractQueueLast());
+                } catch (NumberFormatException nfe) {
+                    System.out.println("NumberFormatException occured: " + nfe);
+                    nfe.printStackTrace(System.out);
+                }
+                break;
+            case COMMAND_SCALE:
+                try {
+                    scaleY = Double.parseDouble(extractQueueLast());
+                    scaleX = Double.parseDouble(extractQueueLast());
+                } catch (NumberFormatException nfe) {
+                    System.out.println("NumberFormatException occured: " + nfe);
+                    nfe.printStackTrace(System.out);
+                }
+                break;
+            case COMMAND_ARC:
+                try {
+                    double x, y, r, a, b;
+                    b = Double.parseDouble(extractQueueLast());
+                    a = Double.parseDouble(extractQueueLast());
+                    r = Double.parseDouble(extractQueueLast());
+                    y = Double.parseDouble(extractQueueLast());
+                    x = Double.parseDouble(extractQueueLast());
+                    if (!pathOpened) {
+                        beginPath(serviceID);
+                        pathOpened = true;
+                    }
+                    drawArc(serviceID, x, y, r, a, b);
+                } catch (NumberFormatException nfe) {
+                    System.out.println("NumberFormatException occured: " + nfe);
+                    nfe.printStackTrace(System.out);
+                }
+                break;
+            case COMMAND_SHOW:
+                String text = extractQueueLast();
+                drawText(serviceID, text);
+                break;
+            default:
+        }
+    }
+
+    private String extractQueueLast() {
+        String lexem = (String)queue.get(queue.size() - 1);
+        queue.remove(queue.size() - 1);
+        return lexem;
+    }
+
+    private void getPaperDimensions(PrintRequestAttributeSet attrs) {
+        MediaSize size = null;
+        if (attrs != null) {
+            if (attrs.containsKey(MediaSize.class)) {
+                size = (MediaSize) attrs.get(MediaSize.class);
+            } else if (attrs.containsKey(MediaSizeName.class)) {
+                MediaSizeName name =
+                    (MediaSizeName)attrs.get(MediaSizeName.class);
+                size = MediaSize.getMediaSizeForName(name);
+            } else {
+                size = MediaSize.getMediaSizeForName(MediaSizeName.ISO_A4);
+            }
+        } else {
+            size = MediaSize.getMediaSizeForName(MediaSizeName.ISO_A4);
+        }
+        logWidth = (int) (size.getX(MediaSize.INCH) * 72.0);
+        logHeight = (int) (size.getY(MediaSize.INCH) * 72.0);
+        if (attributes != null) {
+            if (attributes.containsValue(
+                    OrientationRequested.LANDSCAPE)) {
+                int temp = logWidth;
+                logWidth = logHeight;
+                logHeight = temp;
+            }
+        }
+    }
+    
+    private synchronized static native int obtainServiceID(String name,
+            int width, int height);
+    private synchronized static native void releaseServiceID(int serviceID);
+    private static native boolean startDocument(String name, int serviceID,
+            int[] attributes, String jobName, String destination);
+    private static native boolean startPage(int serviceID);
+    private static native boolean endPage(int serviceID);
+    private static native boolean endDocument(int serviceID);
+    
+    private static native boolean setRGBColor(int serviceID, double red,
+            double green, double blue);
+    private static native boolean moveTo(int serviceID, double x, double y);
+    private static native boolean lineTo(int serviceID, double x, double y);
+    private static native boolean drawArc(int serviceID, double x, double y,
+            double r, double a, double b);
+    private static native boolean drawText(int serviceID, String text);
+    private static native boolean drawImage(int serviceID, double x, double y,
+            double scalew, double scaleh, int[] image, int w, int h);
+    private static native boolean beginPath(int serviceID);
+    private static native boolean closePath(int serviceID);
+    private static native boolean strokePath(int serviceID);
+    private static native boolean fillPath(int serviceID);
+    private static native boolean clipPath(int serviceID);
+    private static native boolean rotate(int serviceID, double alpha);
+    private static native boolean setFont(int serviceID, String font);
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/PSInterpreter.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/Win32PrintServiceProvider.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/Win32PrintServiceProvider.java?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/Win32PrintServiceProvider.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/Win32PrintServiceProvider.java Sun Oct  8 22:33:09 2006
@@ -0,0 +1,173 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/** 
+ * @author Aleksei V. Ivaschenko 
+ * @version $Revision: 1.2 $ 
+ */ 
+
+package org.apache.harmony.x.print;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import javax.print.DocFlavor;
+import javax.print.MultiDocPrintService;
+import javax.print.PrintService;
+import javax.print.PrintServiceLookup;
+import javax.print.attribute.AttributeSet;
+
+import org.apache.harmony.x.print.DefaultPrintService;
+
+/*
+ * Print service provider for windows. Loads native library,
+ * searches printers and creates GDI clients for them.
+ */
+public class Win32PrintServiceProvider extends PrintServiceLookup {
+
+    private static boolean libraryLoaded = false; 
+    
+    static {
+        Object result = AccessController.doPrivileged(new PrivilegedAction() {
+            public Object run() {
+                try {
+                    System.loadLibrary("print");
+                    return new Boolean(true);
+                } catch (SecurityException se) {
+                    // SecurityManager doesn't permit library loading.
+                } catch (UnsatisfiedLinkError ule) {
+                    // Can't find library.
+                }
+                return new Boolean(false);
+            }
+        });
+        libraryLoaded = ((Boolean)result).booleanValue();
+    }
+
+    private static ArrayList services = new ArrayList(); 
+    
+    /*
+     * Default public constructor.
+     */
+    public Win32PrintServiceProvider() {
+        super();
+    }
+
+    /*
+     * Searches default printer connected to current host.
+     * @see javax.print.PrintServiceLookup#getDefaultPrintService()
+     */
+    public PrintService getDefaultPrintService() {
+        if (libraryLoaded) {
+            String defaultService = findDefaultPrintService();
+            if (defaultService != null) {
+                PrintService service = getServiceStored(defaultService);
+                if (service != null) {
+                    return service;
+                }
+                GDIClient client = new GDIClient(defaultService);
+                service = new DefaultPrintService(defaultService, client);
+                services.add(service);
+                return service;
+            }
+        }
+        return null;
+    }
+
+    /*
+     * Searches all printers connected to current host.
+     * @see javax.print.PrintServiceLookup#getPrintServices()
+     */
+    public PrintService[] getPrintServices() {
+        if (!libraryLoaded) {
+            return new PrintService[0];
+        }
+        String[] serviceNames = findPrintServices();
+        if (serviceNames == null || serviceNames.length == 0) {
+            services.clear();
+            return new PrintService[0]; 
+        }
+        ArrayList newServices = new ArrayList();
+        for (int i = 0; i < serviceNames.length; i++) {
+            PrintService service = getServiceStored(serviceNames[i]);
+            if (service != null) {
+                newServices.add(service);
+            } else {
+                GDIClient client = new GDIClient(serviceNames[i]);
+                service = new DefaultPrintService(serviceNames[i], client);
+                newServices.add(service);
+            }
+        }
+        services.clear();
+        services = newServices;
+        return (services.size() == 0) ? new PrintService[0] :
+            (PrintService[])services.toArray(new PrintService[0]);
+    }
+    
+    private PrintService getServiceStored(String serviceName) {
+        for (int i = 0; i < services.size(); i++) {
+            PrintService service = (PrintService)services.get(i);
+            if (service.getName().equals(serviceName)) {
+                return service;
+            }
+        }
+        return null;
+    }
+
+    /*
+     * Searches printers connected to current host, which match
+     * requested doc's flavor and attributes. 
+     * @see javax.print.PrintServiceLookup#getPrintServices(
+     * javax.print.DocFlavor, javax.print.attribute.AttributeSet)
+     */
+    public PrintService[] getPrintServices(DocFlavor flavor,
+            AttributeSet attributes) {
+        PrintService[] services = getPrintServices();
+        if (flavor == null && attributes == null) {
+            return services;
+        }
+        ArrayList requestedServices = new ArrayList();
+        for (int i = 0; i < services.length; i++) {
+            
+            try {
+                AttributeSet unsupportedSet =
+                    services[i].getUnsupportedAttributes(flavor, attributes);
+                if (unsupportedSet == null && (flavor == null ||
+                        services[i].isDocFlavorSupported(flavor))) {
+                    requestedServices.add(services[i]);
+                }
+            } catch (IllegalArgumentException iae) {
+                // DocFlavor not supported by service, skiping.
+            }
+        }
+        return (requestedServices.size() == 0) ? new PrintService[0] :
+            (PrintService[])requestedServices.toArray(new PrintService[0]);
+    }
+
+    /*
+     * Searches printers connected to current host, which are able
+     * to print multidocs and match requested doc's flavor and attributes. 
+     * @see javax.print.PrintServiceLookup#getMultiDocPrintServices(
+     * javax.print.DocFlavor[], javax.print.attribute.AttributeSet)
+     */
+    public MultiDocPrintService[] getMultiDocPrintServices(DocFlavor[] flavors,
+            AttributeSet attributes) {
+        // No multidoc print services available.
+        return new MultiDocPrintService[0];
+    }
+
+    private static native String[] findPrintServices();
+    private static native String findDefaultPrintService();
+}

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/Win32PrintServiceProvider.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/javax.print.PrintServiceLookup
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/javax.print.PrintServiceLookup?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/javax.print.PrintServiceLookup (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/javax.print.PrintServiceLookup Sun Oct  8 22:33:09 2006
@@ -0,0 +1,2 @@
+org.apache.harmony.x.print.Win32PrintServiceProvider
+org.apache.harmony.x.print.cups.CUPSPrintServiceProvider

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/java/windows/org/apache/harmony/x/print/javax.print.PrintServiceLookup
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_GDIClient.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_GDIClient.h?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_GDIClient.h (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_GDIClient.h Sun Oct  8 22:33:09 2006
@@ -0,0 +1,216 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/*
+ * THE FILE HAS BEEN AUTOGENERATED BY INTEL IJH TOOL.
+ * Please be aware that all changes made to this file manually
+ * will be overwritten by the tool if it runs again.
+ */
+/** 
+ * @author Alexey A. Petrenko 
+ * @version $Revision: 1.3 $ 
+ */ 
+
+#include <jni.h>
+
+
+/* Header for class org.apache.harmony.x.print.GDIClient */
+
+#ifndef _ORG_APACHE_HARMONY_X_PRINT_GDICLIENT_H
+#define _ORG_APACHE_HARMONY_X_PRINT_GDICLIENT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Static final fields */
+
+#undef org_apache_harmony_x_print_GDIClient_MAX_BUFFER_SIZE
+#define org_apache_harmony_x_print_GDIClient_MAX_BUFFER_SIZE 10240L
+
+#undef org_apache_harmony_x_print_GDIClient_ATTRIBUTES_ARRAY_SIZE
+#define org_apache_harmony_x_print_GDIClient_ATTRIBUTES_ARRAY_SIZE 8L
+
+#undef org_apache_harmony_x_print_GDIClient_COPIES_INDEX
+#define org_apache_harmony_x_print_GDIClient_COPIES_INDEX 0L
+
+#undef org_apache_harmony_x_print_GDIClient_SIDES_INDEX
+#define org_apache_harmony_x_print_GDIClient_SIDES_INDEX 1L
+
+#undef org_apache_harmony_x_print_GDIClient_PAPER_ID_INDEX
+#define org_apache_harmony_x_print_GDIClient_PAPER_ID_INDEX 2L
+
+#undef org_apache_harmony_x_print_GDIClient_COLLATE_INDEX
+#define org_apache_harmony_x_print_GDIClient_COLLATE_INDEX 3L
+
+#undef org_apache_harmony_x_print_GDIClient_CHROMATICITY_INDEX
+#define org_apache_harmony_x_print_GDIClient_CHROMATICITY_INDEX 4L
+
+#undef org_apache_harmony_x_print_GDIClient_ORIENTATION_INDEX
+#define org_apache_harmony_x_print_GDIClient_ORIENTATION_INDEX 5L
+
+#undef org_apache_harmony_x_print_GDIClient_XRESOLUTION_INDEX
+#define org_apache_harmony_x_print_GDIClient_XRESOLUTION_INDEX 6L
+
+#undef org_apache_harmony_x_print_GDIClient_YRESOLUTION_INDEX
+#define org_apache_harmony_x_print_GDIClient_YRESOLUTION_INDEX 7L
+
+#undef org_apache_harmony_x_print_GDIClient_NOT_STANDARD_MEDIA
+#define org_apache_harmony_x_print_GDIClient_NOT_STANDARD_MEDIA 1000L
+
+
+/* Native methods */
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.checkPostScript(Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_GDIClient_checkPostScript(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getColorSupported(Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getColorSupported(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getPagesPerMinute(Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getPagesPerMinute(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getPagesPerMinuteColor(Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getPagesPerMinuteColor(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getPrinterIsAcceptingJobs(Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getPrinterIsAcceptingJobs(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getPrinterLocation(Ljava/lang/String;)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getPrinterLocation(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getQueuedJobCount(Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getQueuedJobCount(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getCopiesSupported(Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getCopiesSupported(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getSidesSupported(Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getSidesSupported(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getMediaSizesSupported(Ljava/lang/String;)[[I
+ */
+JNIEXPORT jobjectArray JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getMediaSizesSupported(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getMediaIDs(Ljava/lang/String;)[I
+ */
+JNIEXPORT jintArray JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getMediaIDs(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getMediaNames(Ljava/lang/String;)[Ljava/lang/String;
+ */
+JNIEXPORT jobjectArray JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getMediaNames(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getMediaTraysSupported(Ljava/lang/String;)[I
+ */
+JNIEXPORT jintArray JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getMediaTraysSupported(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getResolutionsSupported(Ljava/lang/String;)[I
+ */
+JNIEXPORT jintArray JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getResolutionsSupported(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getOrientationSupported(Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getOrientationSupported(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.getCollateSupported(Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_GDIClient_getCollateSupported(JNIEnv *, jclass, 
+    jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.startDocPrinter(Ljava/lang/String;[ILjava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_apache_harmony_x_print_GDIClient_startDocPrinter(JNIEnv *, jclass, 
+    jstring, jintArray, jstring, jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.writePrinter([BII)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_GDIClient_writePrinter(JNIEnv *, jclass, 
+    jbyteArray, jint, jint);
+
+/*
+ * Method: org.apache.harmony.x.print.GDIClient.endDocPrinter(I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_GDIClient_endDocPrinter(JNIEnv *, jclass, 
+    jint);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ORG_APACHE_HARMONY_X_PRINT_GDICLIENT_H */
+

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_GDIClient.h
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_PSInterpreter.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_PSInterpreter.h?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_PSInterpreter.h (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_PSInterpreter.h Sun Oct  8 22:33:09 2006
@@ -0,0 +1,234 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/*
+ * THE FILE HAS BEEN AUTOGENERATED BY INTEL IJH TOOL.
+ * Please be aware that all changes made to this file manually
+ * will be overwritten by the tool if it runs again.
+ */
+/** 
+ * @author Alexey A. Petrenko 
+ * @version $Revision: 1.3 $ 
+ */ 
+
+#include <jni.h>
+
+
+/* Header for class org.apache.harmony.x.print.PSInterpreter */
+
+#ifndef _ORG_APACHE_HARMONY_X_PRINT_PSINTERPRETER_H
+#define _ORG_APACHE_HARMONY_X_PRINT_PSINTERPRETER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Static final fields */
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_MOVETO
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_MOVETO 0L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_LINETO
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_LINETO 1L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_SETRGBCOLOR
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_SETRGBCOLOR 2L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_STROKE
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_STROKE 3L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_COLORIMAGE
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_COLORIMAGE 4L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_TRANSLATE
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_TRANSLATE 5L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_SCALE
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_SCALE 6L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_ARC
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_ARC 7L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_SHOW
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_SHOW 8L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_NEWPATH
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_NEWPATH 9L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_CLOSEPATH
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_CLOSEPATH 10L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_FILL
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_FILL 11L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_FINDFONT
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_FINDFONT 12L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_SCALEFONT
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_SCALEFONT 13L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_SETFONT
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_SETFONT 14L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_ROTATE
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_ROTATE 15L
+
+#undef org_apache_harmony_x_print_PSInterpreter_COMMAND_CLIP
+#define org_apache_harmony_x_print_PSInterpreter_COMMAND_CLIP 16L
+
+
+/* Native methods */
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.obtainServiceID(Ljava/lang/String;II)I
+ */
+JNIEXPORT jint JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_obtainServiceID(JNIEnv *, jclass, 
+    jstring, jint, jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.releaseServiceID(I)V
+ */
+JNIEXPORT void JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_releaseServiceID(JNIEnv *, jclass, 
+    jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.startDocument(Ljava/lang/String;I[ILjava/lang/String;Ljava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_startDocument(JNIEnv *, jclass, 
+    jstring, jint, jintArray, jstring, jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.startPage(I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_startPage(JNIEnv *, jclass, 
+    jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.endPage(I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_endPage(JNIEnv *, jclass, 
+    jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.endDocument(I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_endDocument(JNIEnv *, jclass, 
+    jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.setRGBColor(IDDD)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_setRGBColor(JNIEnv *, jclass, 
+    jint, jdouble, jdouble, jdouble);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.moveTo(IDD)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_moveTo(JNIEnv *, jclass, 
+    jint, jdouble, jdouble);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.lineTo(IDD)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_lineTo(JNIEnv *, jclass, 
+    jint, jdouble, jdouble);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.drawArc(IDDDDD)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_drawArc(JNIEnv *, jclass, 
+    jint, jdouble, jdouble, jdouble, jdouble, jdouble);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.drawText(ILjava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_drawText(JNIEnv *, jclass, 
+    jint, jstring);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.drawImage(IDDDD[III)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_drawImage(JNIEnv *, jclass, 
+    jint, jdouble, jdouble, jdouble, jdouble, jintArray, jint, jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.beginPath(I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_beginPath(JNIEnv *, jclass, 
+    jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.closePath(I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_closePath(JNIEnv *, jclass, 
+    jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.strokePath(I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_strokePath(JNIEnv *, jclass, 
+    jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.fillPath(I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_fillPath(JNIEnv *, jclass, 
+    jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.clipPath(I)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_clipPath(JNIEnv *, jclass, 
+    jint);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.rotate(ID)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_rotate(JNIEnv *, jclass, 
+    jint, jdouble);
+
+/*
+ * Method: org.apache.harmony.x.print.PSInterpreter.setFont(ILjava/lang/String;)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_org_apache_harmony_x_print_PSInterpreter_setFont(JNIEnv *, jclass, 
+    jint, jstring);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ORG_APACHE_HARMONY_X_PRINT_PSINTERPRETER_H */
+

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_PSInterpreter.h
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_Win32PrintServiceProvider.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_Win32PrintServiceProvider.h?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_Win32PrintServiceProvider.h (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_Win32PrintServiceProvider.h Sun Oct  8 22:33:09 2006
@@ -0,0 +1,59 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/*
+ * THE FILE HAS BEEN AUTOGENERATED BY INTEL IJH TOOL.
+ * Please be aware that all changes made to this file manually
+ * will be overwritten by the tool if it runs again.
+ */
+/** 
+ * @author Alexey A. Petrenko 
+ * @version $Revision: 1.3 $ 
+ */ 
+
+#include <jni.h>
+
+
+/* Header for class org.apache.harmony.x.print.Win32PrintServiceProvider */
+
+#ifndef _ORG_APACHE_HARMONY_X_PRINT_WIN32PRINTSERVICEPROVIDER_H
+#define _ORG_APACHE_HARMONY_X_PRINT_WIN32PRINTSERVICEPROVIDER_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Native methods */
+
+/*
+ * Method: org.apache.harmony.x.print.Win32PrintServiceProvider.findPrintServices()[Ljava/lang/String;
+ */
+JNIEXPORT jobjectArray JNICALL
+Java_org_apache_harmony_x_print_Win32PrintServiceProvider_findPrintServices(JNIEnv *, jclass);
+
+/*
+ * Method: org.apache.harmony.x.print.Win32PrintServiceProvider.findDefaultPrintService()Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL
+Java_org_apache_harmony_x_print_Win32PrintServiceProvider_findDefaultPrintService(JNIEnv *, jclass);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ORG_APACHE_HARMONY_X_PRINT_WIN32PRINTSERVICEPROVIDER_H */
+

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_Win32PrintServiceProvider.h
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_awt_PSPrinterJob.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_awt_PSPrinterJob.h?view=auto&rev=454289
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_awt_PSPrinterJob.h (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_awt_PSPrinterJob.h Sun Oct  8 22:33:09 2006
@@ -0,0 +1,54 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/*
+ * THE FILE HAS BEEN AUTOGENERATED BY INTEL IJH TOOL.
+ * Please be aware that all changes made to this file manually
+ * will be overwritten by the tool if it runs again.
+ */
+/** 
+ * @author Alexey A. Petrenko 
+ * @version $Revision: 1.3 $ 
+ */ 
+
+#include <jni.h>
+
+
+/* Header for class org.apache.harmony.x.print.awt.PSPrinterJob */
+
+#ifndef _ORG_APACHE_HARMONY_X_PRINT_AWT_PSPRINTERJOB_H
+#define _ORG_APACHE_HARMONY_X_PRINT_AWT_PSPRINTERJOB_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Native methods */
+
+/*
+ * Method: org.apache.harmony.x.print.awt.PSPrinterJob.getPrinter(Ljava/lang/String;I)Ljava/lang/String;
+ */
+JNIEXPORT jstring JNICALL
+Java_org_apache_harmony_x_print_awt_PSPrinterJob_getPrinter(JNIEnv *, jobject, 
+    jstring, jint);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ORG_APACHE_HARMONY_X_PRINT_AWT_PSPRINTERJOB_H */
+

Propchange: incubator/harmony/enhanced/classlib/trunk/modules/H-1609/modules/print/src/main/native/print/windows/org_apache_harmony_x_print_awt_PSPrinterJob.h
------------------------------------------------------------------------------
    svn:executable = *