Import CUPS 1.4svn-r7356.
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 28 Feb 2008 23:00:58 +0000 (23:00 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Thu, 28 Feb 2008 23:00:58 +0000 (23:00 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@647 a1ca3aef-8c08-0410-bb20-df032aa958be

152 files changed:
CHANGES-1.3.txt
CHANGES.txt
backend/Dependencies
backend/Makefile
backend/backend-private.h
backend/betest.c [deleted file]
backend/parallel.c
backend/runloop.c
backend/snmp-supplies.c [new file with mode: 0644]
backend/snmp.c
backend/socket.c
backend/testbackend.c [new file with mode: 0644]
backend/testsupplies.c [new file with mode: 0644]
backend/usb-darwin.c
backend/usb-unix.c
config-scripts/cups-common.m4
config-scripts/cups-compiler.m4
config-scripts/cups-defaults.m4
cups/Makefile
cups/api-cups.shtml
cups/auth.c
cups/dest.c
cups/encode.c
cups/getputfile.c
cups/http.c
cups/ipp.c
cups/notify.c
cups/request.c
cups/snmp.c
cups/snmp.h
cups/tempfile.c
cups/testsnmp.c
cups/usersys.c
cups/util.c
doc/Makefile
doc/cups-printable.css
doc/cups.css
doc/help/api-array.html
doc/help/api-cups.html
doc/help/api-filedir.html
doc/help/api-filter.html
doc/help/api-httpipp.html
doc/help/api-overview.html
doc/help/api-ppd.html
doc/help/ref-cupsd-conf.html.in
filter/image-jpeg.c
man/lppasswd.man
packaging/cups.list.in
scheduler/cups-driverd.c
scheduler/dirsvc.c
scheduler/ipp.c
scripting/java/CUPSPrinter.java [deleted file]
scripting/java/classes/com/easysw/cups/Cups.class [deleted file]
scripting/java/classes/com/easysw/cups/CupsJob.class [deleted file]
scripting/java/classes/com/easysw/cups/CupsPrinter.class [deleted file]
scripting/java/classes/com/easysw/cups/IPP.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPAttribute.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPBase64Encoder.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPCalendar.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPDefs.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPError.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPHttp.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPMD5.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPRequest.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPStatus.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPURLConnection.class [deleted file]
scripting/java/classes/com/easysw/cups/IPPValue.class [deleted file]
scripting/java/cups.jar [deleted file]
scripting/java/docs/allclasses-frame.html [deleted file]
scripting/java/docs/com/easysw/cups/Cups.html [deleted file]
scripting/java/docs/com/easysw/cups/CupsJob.html [deleted file]
scripting/java/docs/com/easysw/cups/CupsPrinter.html [deleted file]
scripting/java/docs/com/easysw/cups/IPP.html [deleted file]
scripting/java/docs/com/easysw/cups/IPPAttribute.html [deleted file]
scripting/java/docs/com/easysw/cups/IPPDefs.html [deleted file]
scripting/java/docs/com/easysw/cups/IPPError.html [deleted file]
scripting/java/docs/com/easysw/cups/IPPHttp.html [deleted file]
scripting/java/docs/com/easysw/cups/IPPRequest.html [deleted file]
scripting/java/docs/com/easysw/cups/IPPStatus.html [deleted file]
scripting/java/docs/com/easysw/cups/IPPURLConnection.html [deleted file]
scripting/java/docs/com/easysw/cups/IPPValue.html [deleted file]
scripting/java/docs/deprecated-list.html [deleted file]
scripting/java/docs/help-doc.html [deleted file]
scripting/java/docs/index-all.html [deleted file]
scripting/java/docs/index.html [deleted file]
scripting/java/docs/overview-tree.html [deleted file]
scripting/java/docs/package-list [deleted file]
scripting/java/docs/packages.html [deleted file]
scripting/java/docs/serialized-form.html [deleted file]
scripting/java/docs/stylesheet.css [deleted file]
scripting/java/example/GLP.class [deleted file]
scripting/java/example/GLP.java [deleted file]
scripting/java/example/GLPcolors.class [deleted file]
scripting/java/example/GLPcolors.java [deleted file]
scripting/java/example/GLPdetail.class [deleted file]
scripting/java/example/GLPdetail.java [deleted file]
scripting/java/example/GLPjobList.class [deleted file]
scripting/java/example/GLPjobList.java [deleted file]
scripting/java/example/GLPjobTableModel.class [deleted file]
scripting/java/example/GLPjobTableModel.java [deleted file]
scripting/java/example/GLPoptions$1.class [deleted file]
scripting/java/example/GLPoptions$MyTextListener.class [deleted file]
scripting/java/example/GLPoptions.class [deleted file]
scripting/java/example/GLPoptions.java [deleted file]
scripting/java/example/GLPprinterDetail.class [deleted file]
scripting/java/example/GLPprinterDetail.java [deleted file]
scripting/java/example/GLPprinters.class [deleted file]
scripting/java/example/GLPprinters.java [deleted file]
scripting/java/example/GLPsearch.class [deleted file]
scripting/java/example/GLPsearch.java [deleted file]
scripting/java/example/GLPsearchProgressPanel$1.class [deleted file]
scripting/java/example/GLPsearchProgressPanel$2.class [deleted file]
scripting/java/example/GLPsearchProgressPanel$ButtonListener.class [deleted file]
scripting/java/example/GLPsearchProgressPanel.class [deleted file]
scripting/java/example/GLPsearchProgressPanel.java [deleted file]
scripting/java/example/GLPserver.class [deleted file]
scripting/java/example/GLPserver.java [deleted file]
scripting/java/example/GLPtabs$1.class [deleted file]
scripting/java/example/GLPtabs.class [deleted file]
scripting/java/example/GLPtabs.java [deleted file]
scripting/java/example/GLPvars.class [deleted file]
scripting/java/example/GLPvars.java [deleted file]
scripting/java/example/buildit [deleted file]
scripting/java/example/class.list [deleted file]
scripting/java/example/images/left.gif [deleted file]
scripting/java/example/images/print-test-page.gif [deleted file]
scripting/java/example/images/printer-idle.gif [deleted file]
scripting/java/example/images/printer-stopped.gif [deleted file]
scripting/java/example/images/restart-job.gif [deleted file]
scripting/java/example/images/show-active.gif [deleted file]
scripting/java/example/images/show-completed.gif [deleted file]
scripting/java/example/runit [deleted file]
scripting/java/src/com/easysw/cups/Base64Coder.java [deleted file]
scripting/java/src/com/easysw/cups/Cups.java [deleted file]
scripting/java/src/com/easysw/cups/CupsJob.java [deleted file]
scripting/java/src/com/easysw/cups/CupsPrinter.java [deleted file]
scripting/java/src/com/easysw/cups/IPP.java [deleted file]
scripting/java/src/com/easysw/cups/IPPAttribute.java [deleted file]
scripting/java/src/com/easysw/cups/IPPCalendar.java [deleted file]
scripting/java/src/com/easysw/cups/IPPDefs.java [deleted file]
scripting/java/src/com/easysw/cups/IPPError.java [deleted file]
scripting/java/src/com/easysw/cups/IPPHttp.java [deleted file]
scripting/java/src/com/easysw/cups/IPPMD5.java [deleted file]
scripting/java/src/com/easysw/cups/IPPRequest.java [deleted file]
scripting/java/src/com/easysw/cups/IPPStatus.java [deleted file]
scripting/java/src/com/easysw/cups/IPPURLConnection.java [deleted file]
scripting/java/src/com/easysw/cups/IPPValue.java [deleted file]
scripting/java/src/com/easysw/cups/buildit [deleted file]
scripting/java/src/com/easysw/cups/class.list [deleted file]
scripting/java/src/com/easysw/cups/cups.nfo [deleted file]
systemv/Makefile
templates/Makefile

index 2117b7a..6ec8412 100644 (file)
@@ -1,6 +1,17 @@
 CHANGES-1.3.txt
 ---------------
 
+CHANGES IN CUPS V1.3.7
+
+       - The image filters did not work with some CMYK JPEG files
+         produced by Adobe applications (STR #2727)
+       - The Mac OS X USB backend did not work with printers that
+         did not report a make or model.
+       - The job-sheets option was not encoded properly (STR #2715)
+       - The scheduler incorrectly complained about missing LSB
+         PPD directories.
+
+
 CHANGES IN CUPS V1.3.6
 
        - Documentation updates (STR #2646, STR #2647, STR #2649)
index 5d31aea..0490562 100644 (file)
@@ -1,8 +1,13 @@
-CHANGES.txt - 2008-01-30
+CHANGES.txt - 2008-02-26
 ------------------------
 
 CHANGES IN CUPS V1.4b1
 
+       - The scheduler now manages ICC color profiles on Mac OS X.
+       - The network backends (ipp, lpd, socket) now support
+         SNMP-based supply and page count monitoring (STR #1655)
+       - The lppasswd program is no longer installed setuid to
+         root to make the default installation more secure.
        - Added a new ppdLocalizeMarkerName() function to get
          the localized version of a marker-names value.
        - The scheduler now provides the printer-dns-sd-name
index fd10e6a..26652c8 100644 (file)
@@ -1,6 +1,5 @@
 # DO NOT DELETE THIS LINE -- make depend depends on it.
 
-betest.o: ../cups/string.h ../config.h
 ipp.o: ../cups/http-private.h ../config.h ../cups/http.h ../cups/versioning.h
 ipp.o: ../cups/md5.h ../cups/ipp-private.h ../cups/ipp.h ../cups/backend.h
 ipp.o: ../cups/cups.h ../cups/ppd.h ../cups/array.h ../cups/file.h
@@ -46,6 +45,16 @@ test1284.o: ../cups/backend.h ../cups/versioning.h ../cups/sidechannel.h
 test1284.o: ../cups/cups.h ../cups/ipp.h ../cups/http.h ../cups/ppd.h
 test1284.o: ../cups/array.h ../cups/file.h ../cups/language.h ../cups/debug.h
 test1284.o: ../cups/i18n.h ../cups/transcode.h ../cups/snmp.h
+testbackend.o: ../cups/string.h ../config.h ../cups/cups.h ../cups/ipp.h
+testbackend.o: ../cups/http.h ../cups/versioning.h ../cups/ppd.h
+testbackend.o: ../cups/array.h ../cups/file.h ../cups/language.h
+testbackend.o: ../cups/sidechannel.h
+testsupplies.o: backend-private.h ../cups/backend.h ../cups/versioning.h
+testsupplies.o: ../cups/sidechannel.h ../cups/cups.h ../cups/ipp.h
+testsupplies.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
+testsupplies.o: ../cups/language.h ../cups/debug.h ../cups/i18n.h
+testsupplies.o: ../cups/transcode.h ../cups/snmp.h ../cups/string.h
+testsupplies.o: ../config.h
 usb.o: ../cups/backend.h ../cups/versioning.h ../cups/cups.h ../cups/ipp.h
 usb.o: ../cups/http.h ../cups/ppd.h ../cups/array.h ../cups/file.h
 usb.o: ../cups/language.h ../cups/string.h ../config.h ../cups/i18n.h
index 3dccd1a..a2bb162 100644 (file)
@@ -19,10 +19,11 @@ include ../Makedefs
 
 RBACKENDS =    ipp lpd
 UBACKENDS =    $(PAP) $(LEGACY_BACKENDS) serial snmp socket usb
-TARGETS        =       betest test1284 libbackend.a $(RBACKENDS) $(UBACKENDS)
-LIBOBJS        =       ieee1284.o runloop.o
-OBJS   =       betest.o ipp.o lpd.o pap.o parallel.o scsi.o \
-               serial.o snmp.o socket.o test1284.o usb.o
+TARGETS        =       test1284 testbackend testsupplies \
+               libbackend.a $(RBACKENDS) $(UBACKENDS)
+LIBOBJS        =       ieee1284.o runloop.o snmp-supplies.o
+OBJS   =       ipp.o lpd.o pap.o parallel.o scsi.o serial.o snmp.o socket.o \
+               test1284.o testbackend.o testsupplies.o usb.o
 
 
 #
@@ -84,24 +85,35 @@ uninstall:
 
 
 #
-# betest
+# test1284
 #
 
-betest:        betest.o ../cups/$(LIBCUPS)
+test1284:      test1284.o ../cups/libcups.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o betest betest.o $(LIBS)
+       $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
+               $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
 #
-# test1284
+# testbackend
 #
 
-test1284:      test1284.o ../cups/libcups.a
+testbackend:   testbackend.o ../cups/libcups.a
        echo Linking $@...
-       $(CC) $(LDFLAGS) -o test1284 test1284.o ../cups/libcups.a \
+       $(CC) $(LDFLAGS) -o testbackend testbackend.o ../cups/libcups.a \
                $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
 
 
+#
+# testsupplies
+#
+
+testsupplies:  testsupplies.o libbackend.a ../cups/libcups.a
+       echo Linking $@...
+       $(CC) $(LDFLAGS) -o testsupplies testsupplies.o libbackend.a \
+               ../cups/libcups.a $(LIBGSSAPI) $(SSLLIBS) $(COMMONLIBS) $(LIBZ)
+
+
 #
 # libbackend.a
 #
index cd5aaaf..9bbfa1e 100644 (file)
@@ -97,8 +97,8 @@ extern "C" {
 #define CUPS_OID_prtMarkerSuppliesType         CUPS_OID_prtMarkerSuppliesEntry,5
 #define CUPS_OID_prtMarkerSuppliesDescription  CUPS_OID_prtMarkerSuppliesEntry,6
 #define CUPS_OID_prtMarkerSuppliesSupplyUnit   CUPS_OID_prtMarkerSuppliesEntry,7
-#define CUPS_OID_prtMarkerSuppliesMaxCapacity  CUPS_OID_prtMarkerSupliesEntry,8
-#define CUPS_OID_prtMarkerSuppliesLevel                CUPS_OID_prtMarkerSupliesEntry,9
+#define CUPS_OID_prtMarkerSuppliesMaxCapacity  CUPS_OID_prtMarkerSuppliesEntry,8
+#define CUPS_OID_prtMarkerSuppliesLevel                CUPS_OID_prtMarkerSuppliesEntry,9
 
 #define CUPS_OID_prtMarkerColorant             CUPS_OID_printmib,12
 #define CUPS_OID_prtMarkerColorantTable                CUPS_OID_prtMarkerColorant,1
@@ -211,10 +211,15 @@ extern int        backendGetDeviceID(int fd, char *device_id, int device_id_size,
                                   const char *scheme, char *uri, int uri_size);
 extern int     backendGetMakeModel(const char *device_id, char *make_model,
                                    int make_model_size);
-extern ssize_t backendRunLoop(int print_fd, int device_fd, int use_bc,
-                              void (*side_cb)(int print_fd, int device_fd,
-                                              int use_bc));
-
+extern void    backendNetworkSideCB(int print_fd, int device_fd, int snmp_fd,
+                                    http_addr_t *addr, int use_bc);
+extern ssize_t backendRunLoop(int print_fd, int device_fd, int snmp_fd,
+                              http_addr_t *addr, int use_bc,
+                              void (*side_cb)(int print_fd, int device_fd,
+                                              int snmp_fd, http_addr_t *addr,
+                                              int use_bc));
+extern int     backendSNMPSupplies(int snmp_fd, http_addr_t *addr,
+                                   int *page_count, int *printer_state);
 
 #  ifdef __cplusplus
 }
diff --git a/backend/betest.c b/backend/betest.c
deleted file mode 100644 (file)
index ae73a1f..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * "$Id: betest.c 6649 2007-07-11 21:46:42Z mike $"
- *
- *   Backend test program for the Common UNIX Printing System (CUPS).
- *
- *   Copyright 2007 by Apple Inc.
- *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
- *
- *   These coded instructions, statements, and computer programs are the
- *   property of Apple Inc. and are protected by Federal copyright
- *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
- *   "LICENSE" which should have been included with this file.  If this
- *   file is missing or damaged, see the license at "http://www.cups.org/".
- *
- *   This file is subject to the Apple OS-Developed Software exception.
- *
- * Contents:
- *
- *   main() - Run the named backend.
- */
-
-/*
- * Include necessary headers.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <cups/string.h>
-#include <unistd.h>
-
-
-/*
- * 'main()' - Run the named backend.
- *
- * Usage:
- *
- *    betest device-uri job-id user title copies options [file]
- */
-
-int                    /* O - Exit status */
-main(int  argc,                /* I - Number of command-line arguments (7 or 8) */
-     char *argv[])     /* I - Command-line arguments */
-{
-  char         backend[255];   /* Method in URI */
-
-
-  if (argc < 7 || argc > 8)
-  {
-    fputs("Usage: betest device-uri job-id user title copies options [file]\n",
-          stderr);
-    return (1);
-  }
-
- /*
-  * Extract the method from the device-uri - that's the program we want to
-  * execute.
-  */
-
-  if (sscanf(argv[1], "%254[^:]", backend) != 1)
-  {
-    fputs("betest: Bad device-uri - no colon!\n", stderr);
-    return (1);
-  }
-
- /*
-  * Execute and return
-  */
-
-  execl(backend, argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7],
-        NULL);
-
-  return (1);
-}
-
-
-/*
- * End of "$Id: betest.c 6649 2007-07-11 21:46:42Z mike $".
- */
index 121f9f4..84addcb 100644 (file)
@@ -59,7 +59,8 @@
  */
 
 static void    list_devices(void);
-static void    side_cb(int print_fd, int device_fd, int use_bc);
+static void    side_cb(int print_fd, int device_fd, int snmp_fd,
+                       http_addr_t *addr, int use_bc);
 
 
 /*
@@ -283,7 +284,7 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
       lseek(print_fd, 0, SEEK_SET);
     }
 
-    tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb);
+    tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb);
 
     if (print_fd != 0 && tbytes >= 0)
       _cupsLangPrintf(stderr,
@@ -609,9 +610,11 @@ list_devices(void)
  */
 
 static void
-side_cb(int print_fd,                  /* I - Print file */
-        int device_fd,                 /* I - Device file */
-       int use_bc)                     /* I - Using back-channel? */
+side_cb(int         print_fd,          /* I - Print file */
+        int         device_fd,         /* I - Device file */
+        int         snmp_fd,           /* I - SNMP socket (unused) */
+       http_addr_t *addr,              /* I - Device address (unused) */
+       int         use_bc)             /* I - Using back-channel? */
 {
   cups_sc_command_t    command;        /* Request command */
   cups_sc_status_t     status;         /* Request/response status */
@@ -619,6 +622,9 @@ side_cb(int print_fd,                       /* I - Print file */
   int                  datalen;        /* Request/response data size */
 
 
+  (void)snmp_fd;
+  (void)addr;
+
   datalen = sizeof(data);
 
   if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
index 5af3d77..bbf565d 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "backend-private.h"
+#include <limits.h>
 #ifdef __hpux
 #  include <sys/time.h>
 #else
@@ -135,16 +136,84 @@ backendDrainOutput(int print_fd,  /* I - Print file descriptor */
 }
 
 
+/*
+ * 'backendNetworkSideCB()' - Handle common network side-channel commands.
+ */
+
+void
+backendNetworkSideCB(
+    int         print_fd,              /* I - Print file or -1 */
+    int         device_fd,             /* I - Device file or -1 */
+    int         snmp_fd,               /* I - SNMP socket */
+    http_addr_t *addr,                 /* I - Address of device */
+    int         use_bc)                        /* I - Use back-channel data? */
+{
+  cups_sc_command_t    command;        /* Request command */
+  cups_sc_status_t     status;         /* Request/response status */
+  char                 data[2048];     /* Request/response data */
+  int                  datalen;        /* Request/response data size */
+  const char           *device_id;     /* 1284DEVICEID env var */
+
+
+  datalen = sizeof(data);
+
+  if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
+  {
+    _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
+    return;
+  }
+
+  switch (command)
+  {
+    case CUPS_SC_CMD_DRAIN_OUTPUT :
+       /*
+        * Our sockets disable the Nagle algorithm and data is sent immediately.
+       */
+
+        if (backendDrainOutput(print_fd, device_fd))
+         status = CUPS_SC_STATUS_IO_ERROR;
+       else 
+          status = CUPS_SC_STATUS_OK;
+
+       datalen = 0;
+        break;
+
+    case CUPS_SC_CMD_GET_BIDI :
+        data[0] = use_bc;
+        datalen = 1;
+        break;
+
+    case CUPS_SC_CMD_GET_DEVICE_ID :
+        if ((device_id = getenv("1284DEVICEID")) != NULL)
+       {
+         strlcpy(data, device_id, sizeof(data));
+         datalen = (int)strlen(data);
+         break;
+       }
+
+    default :
+        status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
+       datalen = 0;
+       break;
+  }
+
+  cupsSideChannelWrite(command, status, data, datalen, 1.0);
+}
+
+
 /*
  * 'backendRunLoop()' - Read and write print and back-channel data.
  */
 
 ssize_t                                        /* O - Total bytes on success, -1 on error */
 backendRunLoop(
-    int  print_fd,                     /* I - Print file descriptor */
-    int  device_fd,                    /* I - Device file descriptor */
-    int  use_bc,                       /* I - Use back-channel? */
-    void (*side_cb)(int, int, int))    /* I - Side-channel callback */
+    int         print_fd,              /* I - Print file descriptor */
+    int         device_fd,             /* I - Device file descriptor */
+    int         snmp_fd,               /* I - SNMP socket or -1 if none */
+    http_addr_t *addr,                 /* I - Address of device */
+    int         use_bc,                        /* I - Use back-channel? */
+    void        (*side_cb)(int, int, int, http_addr_t *, int))
+                                       /* I - Side-channel callback */
 {
   int          nfds;                   /* Maximum file descriptor value + 1 */
   fd_set       input,                  /* Input set for reading */
@@ -158,15 +227,18 @@ backendRunLoop(
   char         print_buffer[8192],     /* Print data buffer */
                *print_ptr,             /* Pointer into print data buffer */
                bc_buffer[1024];        /* Back-channel data buffer */
+  struct timeval timeout;              /* Timeout for select() */
+  time_t       curtime,                /* Current time */
+               snmp_update = 0;
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction action;             /* Actions for POSIX signals */
 #endif /* HAVE_SIGACTION && !HAVE_SIGSET */
 
 
   fprintf(stderr,
-          "DEBUG: backendRunLoop(print_fd=%d, device_fd=%d, use_bc=%d, "
-         "side_cb=%p)\n",
-          print_fd, device_fd, use_bc, side_cb);
+          "DEBUG: backendRunLoop(print_fd=%d, device_fd=%d, snmp_fd=%d, "
+         "addr=%p, use_bc=%d, side_cb=%p)\n",
+          print_fd, device_fd, snmp_fd, addr, use_bc, side_cb);
 
  /*
   * If we are printing data from a print driver on stdin, ignore SIGTERM
@@ -221,7 +293,10 @@ backendRunLoop(
 
     if (use_bc || side_cb)
     {
-      if (select(nfds, &input, &output, NULL, NULL) < 0)
+      timeout.tv_sec  = 5;
+      timeout.tv_usec = 0;
+
+      if (select(nfds, &input, &output, NULL, &timeout) < 0)
       {
        /*
        * Pause printing to clear any pending errors...
@@ -250,7 +325,7 @@ backendRunLoop(
     */
 
     if (side_cb && FD_ISSET(CUPS_SC_FD, &input))
-      (*side_cb)(print_fd, device_fd, use_bc);
+      (*side_cb)(print_fd, device_fd, snmp_fd, addr, use_bc);
 
    /*
     * Check if we have back-channel data ready...
@@ -363,6 +438,18 @@ backendRunLoop(
        total_bytes += bytes;
       }
     }
+
+   /*
+    * Do SNMP updates periodically...
+    */
+
+    if (snmp_fd >= 0 && time(&curtime) >= snmp_update)
+    {
+      if (backendSNMPSupplies(snmp_fd, addr, NULL, NULL))
+        snmp_update = INT_MAX;
+      else
+        snmp_update = curtime + 5;
+    }
   }
 
  /*
diff --git a/backend/snmp-supplies.c b/backend/snmp-supplies.c
new file mode 100644 (file)
index 0000000..806b67f
--- /dev/null
@@ -0,0 +1,688 @@
+/*
+ * "$Id$"
+ *
+ *   SNMP supplies functions for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2008 by Apple Inc.
+ *
+ *   These coded instructions, statements, and computer programs are the
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   "LICENSE" which should have been included with this file.  If this
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
+ *
+ *   This file is subject to the Apple OS-Developed Software exception.
+ *
+ * Contents:
+ *
+ *   backendSNMPSupplies()   - Get the current supplies for a device.
+ *   backend_init_supplies() - Initialize the supplies list.
+ *   backend_walk_cb()       - Interpret the supply value responses...
+ */
+
+/*
+ * Include necessary headers.
+ */
+
+#include "backend-private.h"
+#include <cups/array.h>
+
+
+/*
+ * Local constants...
+ */
+
+#define CUPS_MAX_SUPPLIES      32      /* Maximum number of supplies for a printer */
+
+
+/*
+ * Local structures...
+ */
+
+typedef struct
+{
+  char name[CUPS_SNMP_MAX_STRING],     /* Name of supply */
+       color[8];                       /* Color: "#RRGGBB" or "none" */
+  int  colorant,                       /* Colorant index */
+       type,                           /* Supply type */
+       max_capacity,                   /* Maximum capacity */
+       level;                          /* Current level value */
+} backend_supplies_t;
+
+
+/*
+ * Local globals...
+ */
+
+static http_addr_t     current_addr;   /* Current address */
+static int             num_supplies = 0;
+                                       /* Number of supplies found */
+static backend_supplies_t supplies[CUPS_MAX_SUPPLIES];
+                                       /* Supply information */
+
+static const int       hrDeviceDescr[] =
+                       { CUPS_OID_hrDeviceDescr, 1, -1 };
+                                       /* Device description OID */
+static const int       hrPrinterStatus[] =
+                       { CUPS_OID_hrPrinterStatus, 1, -1 };
+                                       /* Current state OID */
+static const int       hrPrinterDetectedErrorState[] =
+                       { CUPS_OID_hrPrinterDetectedErrorState, 1, -1 };
+                                       /* Current printer state bits OID */
+static const int       prtMarkerColorantValue[] =
+                       { CUPS_OID_prtMarkerColorantValue, -1 },
+                                       /* Colorant OID */
+                       prtMarkerColorantValueOffset =
+                       (sizeof(prtMarkerColorantValue) /
+                        sizeof(prtMarkerColorantValue[0]));
+                                       /* Offset to colorant index */
+static const int       prtMarkerLifeCount[] =
+                       { CUPS_OID_prtMarkerLifeCount, 1, 1, -1 };
+                                       /* Page counter OID */
+static const int       prtMarkerSuppliesEntry[] =
+                       { CUPS_OID_prtMarkerSuppliesEntry, -1 };
+                                       /* Supplies OID */
+static const int       prtMarkerSuppliesColorantIndex[] =
+                       { CUPS_OID_prtMarkerSuppliesColorantIndex, -1 },
+                                       /* Colorant index OID */
+                       prtMarkerSuppliesColorantIndexOffset =
+                       (sizeof(prtMarkerSuppliesColorantIndex) /
+                        sizeof(prtMarkerSuppliesColorantIndex[0]));
+                                       /* Offset to supply index */
+static const int       prtMarkerSuppliesDescription[] =
+                       { CUPS_OID_prtMarkerSuppliesDescription, -1 },
+                                       /* Description OID */
+                       prtMarkerSuppliesDescriptionOffset =
+                       (sizeof(prtMarkerSuppliesDescription) /
+                        sizeof(prtMarkerSuppliesDescription[0]));
+                                       /* Offset to supply index */
+static const int       prtMarkerSuppliesLevel[] =
+                       { CUPS_OID_prtMarkerSuppliesLevel, -1 },
+                                       /* Level OID */
+                       prtMarkerSuppliesLevelOffset =
+                       (sizeof(prtMarkerSuppliesLevel) /
+                        sizeof(prtMarkerSuppliesLevel[0]));
+                                       /* Offset to supply index */
+static const int       prtMarkerSuppliesMaxCapacity[] =
+                       { CUPS_OID_prtMarkerSuppliesMaxCapacity, -1 },
+                                       /* Max capacity OID */
+                       prtMarkerSuppliesMaxCapacityOffset =
+                       (sizeof(prtMarkerSuppliesMaxCapacity) /
+                        sizeof(prtMarkerSuppliesMaxCapacity[0]));
+                                       /* Offset to supply index */
+static const int       prtMarkerSuppliesType[] =
+                       { CUPS_OID_prtMarkerSuppliesType, -1 },
+                                       /* Type OID */
+                       prtMarkerSuppliesTypeOffset =
+                       (sizeof(prtMarkerSuppliesType) /
+                        sizeof(prtMarkerSuppliesType[0]));
+                                       /* Offset to supply index */
+
+
+/*
+ * Local functions...
+ */
+
+static void    backend_init_supplies(int snmp_fd, http_addr_t *addr);
+static void    backend_walk_cb(cups_snmp_t *packet, void *data);
+
+
+/*
+ * 'backendSNMPSupplies()' - Get the current supplies for a device.
+ */
+
+int                                    /* O - 0 on success, -1 on error */
+backendSNMPSupplies(
+    int         snmp_fd,               /* I - SNMP socket */
+    http_addr_t *addr,                 /* I - Printer address */
+    int         *page_count,           /* O - Page count */
+    int         *printer_state)                /* O - Printer state */
+{
+  if (!httpAddrEqual(addr, &current_addr))
+    backend_init_supplies(snmp_fd, addr);
+  else if (num_supplies > 0)
+    cupsSNMPWalk(snmp_fd, &current_addr, CUPS_SNMP_VERSION_1,
+                cupsSNMPDefaultCommunity(), prtMarkerSuppliesLevel, 500,
+                backend_walk_cb, NULL);
+
+  if (page_count)
+    *page_count = -1;
+
+  if (printer_state)
+    *printer_state = -1;
+
+  if (num_supplies > 0)
+  {
+    int                i;                      /* Looping var */
+    char       value[CUPS_MAX_SUPPLIES * 4],
+                                       /* marker-levels value string */
+               *ptr;                   /* Pointer into value string */
+    cups_snmp_t        packet;                 /* SNMP response packet */
+
+
+   /*
+    * Generate the marker-levels value string...
+    */
+
+    for (i = 0, ptr = value; i < num_supplies; i ++, ptr += strlen(ptr))
+    {
+      if (i)
+        *ptr++ = ',';
+
+      sprintf(ptr, "%d", 100 * supplies[i].level / supplies[i].max_capacity);
+    }
+
+    fprintf(stderr, "ATTR: marker-levels=%s\n", value);
+
+   /*
+    * Get the current printer status bits...
+    */
+
+    if (!cupsSNMPWrite(snmp_fd, addr, CUPS_SNMP_VERSION_1,
+                       cupsSNMPDefaultCommunity(), CUPS_ASN1_GET_REQUEST, 1,
+                       hrPrinterDetectedErrorState))
+      return (-1);
+
+    if (!cupsSNMPRead(snmp_fd, &packet, 500) ||
+        packet.object_type != CUPS_ASN1_OCTET_STRING)
+      return (-1);
+
+    i = ((packet.object_value.string[0] & 255) << 8) |
+        (packet.object_value.string[1] & 255);
+
+    if (i & CUPS_TC_lowPaper)
+      fputs("STATE: +media-low-warning\n", stderr);
+    else
+      fputs("STATE: -media-low-warning\n", stderr);
+
+    if (i & (CUPS_TC_noPaper | CUPS_TC_inputTrayEmpty))
+      fputs("STATE: +media-empty-error\n", stderr);
+    else
+      fputs("STATE: -media-empty-error\n", stderr);
+
+    if (i & CUPS_TC_lowToner)
+      fputs("STATE: +toner-low-warning\n", stderr);
+    else
+      fputs("STATE: -toner-low-warning\n", stderr);
+
+    if (i & CUPS_TC_noToner)
+      fputs("STATE: +toner-empty-error\n", stderr);
+    else
+      fputs("STATE: -toner-empty-error\n", stderr);
+
+    if (i & CUPS_TC_doorOpen)
+      fputs("STATE: +door-open-report\n", stderr);
+    else
+      fputs("STATE: -door-open-report\n", stderr);
+
+    if (i & CUPS_TC_jammed)
+      fputs("STATE: +media-jam-error\n", stderr);
+    else
+      fputs("STATE: -media-jam-error\n", stderr);
+
+    if (i & CUPS_TC_offline)
+      fputs("STATE: +offline-report\n", stderr);
+    else
+      fputs("STATE: -offline-report\n", stderr);
+
+    if (i & (CUPS_TC_serviceRequested | CUPS_TC_overduePreventMaint))
+      fputs("STATE: +service-needed-error\n", stderr);
+    else
+      fputs("STATE: -service-needed-error\n", stderr);
+
+    if (i & CUPS_TC_inputTrayMissing)
+      fputs("STATE: +input-tray-missing-error\n", stderr);
+    else
+      fputs("STATE: -input-tray-missing-error\n", stderr);
+
+    if (i & CUPS_TC_outputTrayMissing)
+      fputs("STATE: +output-tray-missing-error\n", stderr);
+    else
+      fputs("STATE: -output-tray-missing-error\n", stderr);
+
+    if (i & CUPS_TC_markerSupplyMissing)
+      fputs("STATE: +marker-supply-missing-error\n", stderr);
+    else
+      fputs("STATE: -marker-supply-missing-error\n", stderr);
+
+    if (i & CUPS_TC_outputNearFull)
+      fputs("STATE: +output-area-almost-full-warning\n", stderr);
+    else
+      fputs("STATE: -output-area-almost-full-warning\n", stderr);
+
+    if (i & CUPS_TC_outputFull)
+      fputs("STATE: +output-area-full-error\n", stderr);
+    else
+      fputs("STATE: -output-area-full-error\n", stderr);
+
+   /*
+    * Get the current printer state...
+    */
+
+    if (printer_state)
+    {
+      if (!cupsSNMPWrite(snmp_fd, addr, CUPS_SNMP_VERSION_1,
+                        cupsSNMPDefaultCommunity(), CUPS_ASN1_GET_REQUEST, 1,
+                        hrPrinterStatus))
+       return (-1);
+
+      if (!cupsSNMPRead(snmp_fd, &packet, 500) ||
+         packet.object_type != CUPS_ASN1_INTEGER)
+       return (-1);
+
+      *printer_state = packet.object_value.integer;
+    }
+
+   /*
+    * Get the current page count...
+    */
+
+    if (page_count)
+    {
+      if (!cupsSNMPWrite(snmp_fd, addr, CUPS_SNMP_VERSION_1,
+                        cupsSNMPDefaultCommunity(), CUPS_ASN1_GET_REQUEST, 1,
+                        prtMarkerLifeCount))
+       return (-1);
+
+      if (!cupsSNMPRead(snmp_fd, &packet, 500) ||
+         packet.object_type != CUPS_ASN1_COUNTER)
+       return (-1);
+
+      *page_count = packet.object_value.counter;
+    }
+
+    return (0);
+  }
+  else
+    return (-1);
+}
+
+
+/*
+ * 'backend_init_supplies()' - Initialize the supplies list.
+ */
+
+static void
+backend_init_supplies(
+    int         snmp_fd,               /* I - SNMP socket */
+    http_addr_t *addr)                 /* I - Printer address */
+{
+  int          i,                      /* Looping var */
+               type;                   /* Current marker type */
+  cups_file_t  *cachefile;             /* Cache file */
+  const char   *cachedir;              /* CUPS_CACHEDIR value */
+  char         addrstr[1024],          /* Address string */
+               cachefilename[1024],    /* Cache filename */
+               description[CUPS_SNMP_MAX_STRING],
+                                       /* Device description string */
+               value[CUPS_MAX_SUPPLIES * (CUPS_SNMP_MAX_STRING * 2 + 3)],
+                                       /* Value string */
+               *ptr,                   /* Pointer into value string */
+               *name_ptr;              /* Pointer into name string */
+  cups_snmp_t  packet;                 /* SNMP response packet */
+  static const char * const types[] =  /* Supply types */
+               {
+                 "other",
+                 "unknown",
+                 "toner",
+                 "wasteToner",
+                 "ink",
+                 "inkCartridge",
+                 "inkRibbon",
+                 "wasteInk",
+                 "opc",
+                 "developer",
+                 "fuserOil",
+                 "solidWax",
+                 "ribbonWax",
+                 "wasteWax",
+                 "fuser",
+                 "coronaWire",
+                 "fuserOilWick",
+                 "cleanerUnit",
+                 "fuserCleaningPad",
+                 "transferUnit",
+                 "tonerCartridge",
+                 "fuserOiler",
+                 "water",
+                 "wasteWater",
+                 "glueWaterAdditive",
+                 "wastePaper",
+                 "bindingSupply",
+                 "bandingSupply",
+                 "stitchingWire",
+                 "shrinkWrap",
+                 "paperWrap",
+                 "staples",
+                 "inserts",
+                 "covers"
+               };
+
+
+ /*
+  * Reset state information...
+  */
+
+  current_addr = *addr;
+  num_supplies = -1;
+
+  memset(supplies, 0, sizeof(supplies));
+
+ /*
+  * Get the device description...
+  */
+
+  if (!cupsSNMPWrite(snmp_fd, addr, CUPS_SNMP_VERSION_1,
+                    cupsSNMPDefaultCommunity(), CUPS_ASN1_GET_REQUEST, 1,
+                    hrDeviceDescr))
+    return;
+
+  if (!cupsSNMPRead(snmp_fd, &packet, 500) ||
+      packet.object_type != CUPS_ASN1_OCTET_STRING)
+  {
+    strlcpy(description, "Unknown", sizeof(description));
+    num_supplies = 0;
+  }
+  else
+    strlcpy(description, packet.object_value.string, sizeof(description));
+
+ /*
+  * See if we have already queried this device...
+  */
+
+  httpAddrString(addr, addrstr, sizeof(addrstr));
+
+  if ((cachedir = getenv("CUPS_CACHEDIR")) == NULL)
+    cachedir = CUPS_CACHEDIR;
+
+  snprintf(cachefilename, sizeof(cachefilename), "%s/%s.snmp", cachedir,
+           addrstr);
+
+  if ((cachefile = cupsFileOpen(cachefilename, "r")) != NULL)
+  {
+   /*
+    * Yes, read the cache file:
+    *
+    *     1 num_supplies
+    *     device description
+    *     supply structures...
+    */
+
+    if (cupsFileGets(cachefile, value, sizeof(value)))
+    {
+      if (sscanf(value, "1 %d", &num_supplies) == 1 &&
+          num_supplies <= CUPS_MAX_SUPPLIES &&
+          cupsFileGets(cachefile, value, sizeof(value)))
+      {
+        if ((ptr = value + strlen(value) - 1) >= value && *ptr == '\n')
+         *ptr = '\n';
+
+        if (!strcmp(description, value))
+         cupsFileRead(cachefile, (char *)supplies,
+                      num_supplies * sizeof(backend_supplies_t));
+        else
+         num_supplies = -1;
+      }
+      else
+        num_supplies = -1;
+    }
+
+    cupsFileClose(cachefile);
+  }
+
+ /*
+  * If the cache information isn't correct, scan for supplies...
+  */
+
+  if (num_supplies < 0)
+  {
+   /*
+    * Walk the printer configuration information...
+    */
+
+    cupsSNMPWalk(snmp_fd, &current_addr, CUPS_SNMP_VERSION_1,
+                cupsSNMPDefaultCommunity(), prtMarkerSuppliesEntry, 500,
+                backend_walk_cb, NULL);
+  }
+
+ /*
+  * Save the cached information...
+  */
+
+  if (num_supplies < 0)
+    num_supplies = 0;
+
+  if ((cachefile = cupsFileOpen(cachefilename, "w")) != NULL)
+  {
+    cupsFilePrintf(cachefile, "1 %d\n", num_supplies);
+    cupsFilePrintf(cachefile, "%s\n", description);
+
+    if (num_supplies > 0)
+      cupsFileWrite(cachefile, (char *)supplies,
+                    num_supplies * sizeof(backend_supplies_t));
+
+    cupsFileClose(cachefile);
+  }
+
+  if (num_supplies <= 0)
+    return;
+
+ /*
+  * Get the colors...
+  */
+
+  for (i = 0; i < num_supplies; i ++)
+    strcpy(supplies[i].color, "none");
+
+  cupsSNMPWalk(snmp_fd, &current_addr, CUPS_SNMP_VERSION_1,
+               cupsSNMPDefaultCommunity(), prtMarkerColorantValue, 500,
+              backend_walk_cb, NULL);
+
+ /*
+  * Output the marker-colors attribute...
+  */
+
+  for (i = 0, ptr = value; i < num_supplies; i ++, ptr += strlen(ptr))
+  {
+    if (i)
+      *ptr++ = ',';
+
+    strcpy(ptr, supplies[i].color);
+  }
+
+  fprintf(stderr, "ATTR: marker-colors=%s\n", value);
+
+ /*
+  * Output the marker-names attribute...
+  */
+
+  for (i = 0, ptr = value; i < num_supplies; i ++)
+  {
+    if (i)
+      *ptr++ = ',';
+
+    *ptr++ = '\"';
+    for (name_ptr = supplies[i].name; *name_ptr;)
+    {
+      if (*name_ptr == '\\' || *name_ptr == '\"')
+        *ptr++ = '\\';
+
+      *ptr++ = *name_ptr++;
+    }
+    *ptr++ = '\"';
+  }
+
+  *ptr = '\0';
+
+  fprintf(stderr, "ATTR: marker-names=%s\n", value);
+
+ /*
+  * Output the marker-types attribute...
+  */
+
+  for (i = 0, ptr = value; i < num_supplies; i ++, ptr += strlen(ptr))
+  {
+    if (i)
+      *ptr++ = ',';
+
+    type = supplies[i].type;
+
+    if (type < CUPS_TC_other || type > CUPS_TC_covers)
+      strcpy(ptr, "unknown");
+    else
+      strcpy(ptr, types[type - CUPS_TC_other]);
+  }
+
+  fprintf(stderr, "ATTR: marker-types=%s\n", value);
+}
+
+
+/*
+ * 'backend_walk_cb()' - Interpret the supply value responses...
+ */
+
+static void
+backend_walk_cb(cups_snmp_t *packet,   /* I - SNMP packet */
+                void        *data)     /* I - User data (unused) */
+{
+  int  i, j, k;                        /* Looping vars */
+  static const char * const colors[8][2] =
+  {                                    /* Standard color names */
+    { "black",   "#000000" },
+    { "blue",    "#0000FF" },
+    { "cyan",    "#00FFFF" },
+    { "green",   "#00FF00" },
+    { "magenta", "#FF00FF" },
+    { "red",     "#FF0000" },
+    { "white",   "#FFFFFF" },
+    { "yellow",  "#FFFF00" }
+  };
+
+
+  (void)data;
+
+  if (cupsSNMPIsOIDPrefixed(packet, prtMarkerColorantValue) &&
+      packet->object_type == CUPS_ASN1_OCTET_STRING)
+  {
+   /*
+    * Get colorant...
+    */
+
+    i = packet->object_name[prtMarkerColorantValueOffset];
+
+    fprintf(stderr, "DEBUG2: prtMarkerColorantValue.1.%d = \"%s\"\n", i,
+            packet->object_value.string);
+
+    for (j = 0; j < num_supplies; j ++)
+      if (supplies[j].colorant == i)
+      {
+       for (k = 0; k < (int)(sizeof(colors) / sizeof(colors[0])); k ++)
+         if (!strcmp(colors[k][0], packet->object_value.string))
+         {
+           strcpy(supplies[j].color, colors[k][1]);
+           break;
+         }
+      }
+  }
+  else if (cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesColorantIndex))
+  {
+   /*
+    * Get colorant index...
+    */
+
+    i = packet->object_name[prtMarkerSuppliesColorantIndexOffset];
+    if (i < 1 || i > CUPS_MAX_SUPPLIES ||
+        packet->object_type != CUPS_ASN1_INTEGER)
+      return;
+
+    fprintf(stderr, "DEBUG2: prtMarkerSuppliesColorantIndex.1.%d = %d\n", i,
+            packet->object_value.integer);
+
+    if (i > num_supplies)
+      num_supplies = i;
+
+    supplies[i - 1].colorant = packet->object_value.integer;
+  }
+  else if (cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesDescription))
+  {
+   /*
+    * Get supply name/description...
+    */
+
+    i = packet->object_name[prtMarkerSuppliesDescriptionOffset];
+    if (i < 1 || i > CUPS_MAX_SUPPLIES ||
+        packet->object_type != CUPS_ASN1_OCTET_STRING)
+      return;
+
+    fprintf(stderr, "DEBUG2: prtMarkerSuppliesDescription.1.%d = \"%s\"\n", i,
+            packet->object_value.string);
+
+    if (i > num_supplies)
+      num_supplies = i;
+
+    strlcpy(supplies[i - 1].name, packet->object_value.string,
+            sizeof(supplies[0].name));
+  }
+  else if (cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesLevel))
+  {
+   /*
+    * Get level...
+    */
+
+    i = packet->object_name[prtMarkerSuppliesLevelOffset];
+    if (i < 1 || i > CUPS_MAX_SUPPLIES ||
+        packet->object_type != CUPS_ASN1_INTEGER)
+      return;
+
+    fprintf(stderr, "DEBUG2: prtMarkerSuppliesLevel.1.%d = %d\n", i,
+            packet->object_value.integer);
+
+    if (i > num_supplies)
+      num_supplies = i;
+
+    supplies[i - 1].level = packet->object_value.integer;
+  }
+  else if (cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesMaxCapacity))
+  {
+   /*
+    * Get max capacity...
+    */
+
+    i = packet->object_name[prtMarkerSuppliesMaxCapacityOffset];
+    if (i < 1 || i > CUPS_MAX_SUPPLIES ||
+        packet->object_type != CUPS_ASN1_INTEGER)
+      return;
+
+    fprintf(stderr, "DEBUG2: prtMarkerSuppliesMaxCapacity.1.%d = %d\n", i,
+            packet->object_value.integer);
+
+    if (i > num_supplies)
+      num_supplies = i;
+
+    supplies[i - 1].max_capacity = packet->object_value.integer;
+  }
+  else if (cupsSNMPIsOIDPrefixed(packet, prtMarkerSuppliesType))
+  {
+   /*
+    * Get marker type...
+    */
+
+    i = packet->object_name[prtMarkerSuppliesTypeOffset];
+    if (i < 1 || i > CUPS_MAX_SUPPLIES ||
+        packet->object_type != CUPS_ASN1_INTEGER)
+      return;
+
+    fprintf(stderr, "DEBUG2: prtMarkerSuppliesType.1.%d = %d\n", i,
+            packet->object_value.integer);
+
+    if (i > num_supplies)
+      num_supplies = i;
+
+    supplies[i - 1].type = packet->object_value.integer;
+  }
+}
+
+
+/*
+ * End of "$Id$".
+ */
index 9b45329..abfa621 100644 (file)
@@ -902,7 +902,7 @@ read_snmp_response(int fd)          /* I - SNMP socket file descriptor */
   * Read the response data...
   */
 
-  if (!cupsSNMPRead(fd, &packet, -1))
+  if (!cupsSNMPRead(fd, &packet, -1.0))
   {
     fprintf(stderr, "ERROR: Unable to read data from socket: %s\n",
             strerror(errno));
index 66bc529..1400611 100644 (file)
@@ -17,7 +17,6 @@
  * Contents:
  *
  *   main()    - Send a file to the printer or server.
- *   side_cb() - Handle side-channel requests...
  *   wait_bc() - Wait for back-channel data...
  */
 
@@ -47,7 +46,6 @@
  * Local functions...
  */
 
-static void    side_cb(int print_fd, int device_fd, int use_bc);
 static int     wait_bc(int device_fd, int secs);
 
 
@@ -85,6 +83,9 @@ main(int  argc,                               /* I - Number of command-line arguments (6 or 7) */
   http_addrlist_t *addrlist,           /* Address list */
                *addr;                  /* Connected address */
   char         addrname[256];          /* Address name */
+  int          snmp_fd,                /* SNMP socket */
+               start_count,            /* Page count via SNMP at start */
+               page_count;             /* Page count via SNMP */
   ssize_t      tbytes;                 /* Total number of bytes written */
 #if defined(HAVE_SIGACTION) && !defined(HAVE_SIGSET)
   struct sigaction action;             /* Actions for POSIX signals */
@@ -358,6 +359,21 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
              httpAddrString(&addr->addr, addrname, sizeof(addrname)),
              ntohs(addr->addr.ipv4.sin_port));
 
+ /*
+  * See if the printer supports SNMP...
+  */
+
+  if ((snmp_fd = cupsSNMPOpen(addr->addr.addr.sa_family)) >= 0)
+    if (backendSNMPSupplies(snmp_fd, &(addr->addr), &start_count, NULL))
+    {
+     /*
+      * No, close it...
+      */
+
+      cupsSNMPClose(snmp_fd);
+      snmp_fd = -1;
+    }
+
  /*
   * Print everything...
   */
@@ -374,7 +390,8 @@ main(int  argc,                             /* I - Number of command-line arguments (6 or 7) */
       lseek(print_fd, 0, SEEK_SET);
     }
 
-    tbytes = backendRunLoop(print_fd, device_fd, 1, side_cb);
+    tbytes = backendRunLoop(print_fd, device_fd, snmp_fd, &(addr->addr), 1,
+                            backendNetworkSideCB);
 
     if (print_fd != 0 && tbytes >= 0)
       _cupsLangPrintf(stderr,
@@ -406,6 +423,15 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
     while (wait_bc(device_fd, 90) > 0);
   }
 
+ /*
+  * Collect the final page count as needed...
+  */
+
+  if (snmp_fd >= 0 && 
+      !backendSNMPSupplies(snmp_fd, &(addr->addr), &page_count, NULL) &&
+      page_count > start_count)
+    fprintf(stderr, "PAGE: total %d\n", page_count - start_count);
+
  /*
   * Close the socket connection...
   */
@@ -428,68 +454,6 @@ main(int  argc,                            /* I - Number of command-line arguments (6 or 7) */
 }
 
 
-/*
- * 'side_cb()' - Handle side-channel requests...
- */
-
-static void
-side_cb(int print_fd,                  /* I - Print file */
-        int device_fd,                 /* I - Device file */
-       int use_bc)                     /* I - Using back-channel? */
-{
-  cups_sc_command_t    command;        /* Request command */
-  cups_sc_status_t     status;         /* Request/response status */
-  char                 data[2048];     /* Request/response data */
-  int                  datalen;        /* Request/response data size */
-  const char           *device_id;     /* 1284DEVICEID env var */
-
-
-  datalen = sizeof(data);
-
-  if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
-  {
-    _cupsLangPuts(stderr, _("WARNING: Failed to read side-channel request!\n"));
-    return;
-  }
-
-  switch (command)
-  {
-    case CUPS_SC_CMD_DRAIN_OUTPUT :
-       /*
-        * Our sockets disable the Nagle algorithm and data is sent immediately.
-       */
-
-        if (backendDrainOutput(print_fd, device_fd))
-         status = CUPS_SC_STATUS_IO_ERROR;
-       else 
-          status = CUPS_SC_STATUS_OK;
-
-       datalen = 0;
-        break;
-
-    case CUPS_SC_CMD_GET_BIDI :
-        data[0] = use_bc;
-        datalen = 1;
-        break;
-
-    case CUPS_SC_CMD_GET_DEVICE_ID :
-        if ((device_id = getenv("1284DEVICEID")) != NULL)
-       {
-         strlcpy(data, device_id, sizeof(data));
-         datalen = (int)strlen(data);
-         break;
-       }
-
-    default :
-        status  = CUPS_SC_STATUS_NOT_IMPLEMENTED;
-       datalen = 0;
-       break;
-  }
-
-  cupsSideChannelWrite(command, status, data, datalen, 1.0);
-}
-
-
 /*
  * 'wait_bc()' - Wait for back-channel data...
  */
diff --git a/backend/testbackend.c b/backend/testbackend.c
new file mode 100644 (file)
index 0000000..4835ac6
--- /dev/null
@@ -0,0 +1,310 @@
+/*
+ * "$Id$"
+ *
+ *   Backend test program for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 1997-2005 by Easy Software Products, all rights reserved.
+ *
+ *   These coded instructions, statements, and computer programs are the
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   "LICENSE" which should have been included with this file.  If this
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
+ *
+ *   This file is subject to the Apple OS-Developed Software exception.
+ *
+ * Contents:
+ *
+ *   main()  - Run the named backend.
+ *   usage() - Show usage information.
+ */
+
+/*
+ * Include necessary headers.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <cups/string.h>
+#include <cups/cups.h>
+#include <cups/sidechannel.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/wait.h>
+
+
+/*
+ * Local functions...
+ */
+
+static void    usage(void);
+
+
+/*
+ * 'main()' - Run the named backend.
+ *
+ * Usage:
+ *
+ *    betest [-s] [-t] device-uri job-id user title copies options [file]
+ */
+
+int                                    /* O - Exit status */
+main(int  argc,                                /* I - Number of command-line args */
+     char *argv[])                     /* I - Command-line arguments */
+{
+  int          first_arg,              /* First argument for backend */
+               do_side_tests = 0,      /* Test side-channel ops? */
+               do_trickle = 0;         /* Trickle data to backend */
+  char         scheme[255],            /* Scheme in URI == backend */
+               backend[1024];          /* Backend path */
+  const char   *serverbin;             /* CUPS_SERVERBIN environment variable */
+  int          back_fds[2],            /* Back-channel pipe */
+               side_fds[2],            /* Side-channel socket */
+               data_fds[2],            /* Data pipe */
+               pid,                    /* Process ID */
+               status;                 /* Exit status */
+
+
+ /*
+  * See if we have side-channel tests to do...
+  */
+
+  for (first_arg = 1;
+       argv[first_arg] && argv[first_arg][0] == '-';
+       first_arg ++)
+    if (!strcmp(argv[first_arg], "-s"))
+      do_side_tests = 1;
+    else if (!strcmp(argv[first_arg], "-t"))
+      do_trickle = 1;
+    else
+      usage();
+
+  argc -= first_arg;
+  if (argc < 6 || argc > 7 || (argc == 7 && do_trickle))
+    usage();
+
+ /*
+  * Extract the scheme from the device-uri - that's the program we want to
+  * execute.
+  */
+
+  if (sscanf(argv[first_arg], "%254[^:]", scheme) != 1)
+  {
+    fputs("testbackend: Bad device-uri - no colon!\n", stderr);
+    return (1);
+  }
+
+  if (!access(scheme, X_OK))
+    strlcpy(backend, scheme, sizeof(backend));
+  else
+  {
+    if ((serverbin = getenv("CUPS_SERVERBIN")) == NULL)
+      serverbin = CUPS_SERVERBIN;
+
+    snprintf(backend, sizeof(backend), "%s/backend/%s", serverbin, scheme);
+    if (access(backend, X_OK))
+    {
+      fprintf(stderr, "testbackend: Unknown device scheme \"%s\"!\n", scheme);
+      return (1);
+    }
+  }
+
+ /*
+  * Create the back-channel pipe and side-channel socket...
+  */
+
+  open("/dev/null", O_WRONLY);         /* Make sure fd 3 and 4 are used */
+  open("/dev/null", O_WRONLY);
+
+  pipe(back_fds);
+  fcntl(back_fds[0], F_SETFL, fcntl(back_fds[0], F_GETFL) | O_NONBLOCK);
+  fcntl(back_fds[1], F_SETFL, fcntl(back_fds[1], F_GETFL) | O_NONBLOCK);
+
+  socketpair(AF_LOCAL, SOCK_STREAM, 0, side_fds);
+  fcntl(side_fds[0], F_SETFL, fcntl(side_fds[0], F_GETFL) | O_NONBLOCK);
+  fcntl(side_fds[1], F_SETFL, fcntl(side_fds[1], F_GETFL) | O_NONBLOCK);
+
+ /*
+  * Execute the trickle process as needed...
+  */
+
+  if (do_trickle)
+  {
+    pipe(data_fds);
+
+    if ((pid = fork()) == 0)
+    {
+     /*
+      * Trickle child comes here...
+      */
+
+      int i;                           /* Looping var */
+
+      close(data_fds[0]);
+      for (i = 0; i < 10; i ++)
+      {
+       /*
+        * Write 10 spaces, 1 per second...
+       */
+
+        write(data_fds[1], " ", 1);
+       sleep(1);
+      }
+
+      exit(0);
+    }
+    else if (pid < 0)
+    {
+      perror("testbackend: Unable to fork");
+      return (1);
+    }
+  }
+  else
+    data_fds[0] = data_fds[1] = -1;
+
+ /*
+  * Execute the backend...
+  */
+
+  if ((pid = fork()) == 0)
+  {
+   /*
+    * Child comes here...
+    */
+
+    if (do_trickle)
+    {
+      close(0);
+      dup(data_fds[0]);
+      close(data_fds[0]);
+      close(data_fds[1]);
+    }
+
+    close(3);
+    dup(back_fds[1]);
+    close(back_fds[0]);
+    close(back_fds[1]);
+
+    close(4);
+    dup(side_fds[1]);
+    close(side_fds[0]);
+    close(side_fds[1]);
+
+    execv(backend, argv + first_arg);
+    fprintf(stderr, "textbackend: Unable to execute \"%s\": %s\n", backend,
+            strerror(errno));
+    return (errno);
+  }
+  else if (pid < 0)
+  {
+    perror("testbackend: Unable to fork");
+    return (1);
+  }
+
+ /*
+  * Parent comes here, setup back and side channel file descriptors...
+  */
+
+  if (do_trickle)
+  {
+    close(data_fds[0]);
+    close(data_fds[1]);
+  }
+
+  close(3);
+  dup(back_fds[0]);
+  close(back_fds[0]);
+  close(back_fds[1]);
+
+  close(4);
+  dup(side_fds[0]);
+  close(side_fds[0]);
+  close(side_fds[1]);
+
+ /*
+  * Do side-channel tests as needed, then wait for the backend...
+  */
+
+  if (do_side_tests)
+  {
+    int                        length;         /* Length of buffer */
+    char               buffer[2049];   /* Buffer for reponse */
+    cups_sc_status_t   scstatus;       /* Status of side-channel command */
+    static const char * const statuses[] =
+    {
+      "CUPS_SC_STATUS_NONE",           /* No status */
+      "CUPS_SC_STATUS_OK",             /* Operation succeeded */
+      "CUPS_SC_STATUS_IO_ERROR",       /* An I/O error occurred */
+      "CUPS_SC_STATUS_TIMEOUT",                /* The backend did not respond */
+      "CUPS_SC_STATUS_NO_RESPONSE",    /* The device did not respond */
+      "CUPS_SC_STATUS_BAD_MESSAGE",    /* The command/response message was invalid */
+      "CUPS_SC_STATUS_TOO_BIG",                /* Response too big */
+      "CUPS_SC_STATUS_NOT_IMPLEMENTED" /* Command not implemented */
+    };
+
+
+    length   = 0;
+    scstatus = cupsSideChannelDoRequest(CUPS_SC_CMD_DRAIN_OUTPUT, buffer,
+                                        &length, 5.0);
+    printf("CUPS_SC_CMD_DRAIN_OUTPUT returned %s\n", statuses[scstatus]);
+
+    length   = 1;
+    scstatus = cupsSideChannelDoRequest(CUPS_SC_CMD_GET_BIDI, buffer,
+                                        &length, 5.0);
+    printf("CUPS_SC_CMD_GET_BIDI returned %s, %d\n", statuses[scstatus], buffer[0]);
+
+    length   = sizeof(buffer) - 1;
+    scstatus = cupsSideChannelDoRequest(CUPS_SC_CMD_GET_DEVICE_ID, buffer,
+                                        &length, 5.0);
+    buffer[length] = '\0';
+    printf("CUPS_SC_CMD_GET_DEVICE_ID returned %s, \"%s\"\n",
+           statuses[scstatus], buffer);
+
+    length   = 1;
+    scstatus = cupsSideChannelDoRequest(CUPS_SC_CMD_GET_STATE, buffer,
+                                        &length, 5.0);
+    printf("CUPS_SC_CMD_GET_STATE returned %s, %02X\n", statuses[scstatus],
+           buffer[0] & 255);
+
+    length   = 0;
+    scstatus = cupsSideChannelDoRequest(CUPS_SC_CMD_SOFT_RESET, buffer,
+                                        &length, 5.0);
+    printf("CUPS_SC_CMD_SOFT_RESET returned %s\n", statuses[scstatus]);
+  }
+
+  while (wait(&status) != pid);
+
+  if (status)
+  {
+    if (WIFEXITED(status))
+      printf("%s exited with status %d!\n", backend, WEXITSTATUS(status));
+    else
+      printf("%s crashed with signal %d!\n", backend, WTERMSIG(status));
+  }
+
+ /*
+  * Exit accordingly...
+  */
+
+  return (status != 0);
+}
+
+
+/*
+ * 'usage()' - Show usage information.
+ */
+
+static void
+usage(void)
+{
+  fputs("Usage: betest [-s] [-t] device-uri job-id user title copies options "
+       "[file]\n", stderr);
+  exit(1);
+}
+
+
+/*
+ * End of "$Id$".
+ */
diff --git a/backend/testsupplies.c b/backend/testsupplies.c
new file mode 100644 (file)
index 0000000..1a8246a
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * "$Id$"
+ *
+ *   SNMP supplies test program for the Common UNIX Printing System (CUPS).
+ *
+ *   Copyright 2008 by Apple Inc.
+ *
+ *   These coded instructions, statements, and computer programs are the
+ *   property of Apple Inc. and are protected by Federal copyright
+ *   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+ *   "LICENSE" which should have been included with this file.  If this
+ *   file is missing or damaged, see the license at "http://www.cups.org/".
+ *
+ *   This file is subject to the Apple OS-Developed Software exception.
+ *
+ * Contents:
+ *
+ *   main() - Show the supplies state of a printer.
+ */
+
+/*
+ * Include necessary headers.
+ */
+
+#include "backend-private.h"
+
+
+/*
+ * 'main()' - Show the supplies state of a printer.
+ */
+
+int                                    /* O - Exit status */
+main(int  argc,                                /* I - Number of command-line args */
+     char *argv[])                     /* I - Command-line arguments */
+{
+  http_addrlist_t      *host;          /* Host addresses */
+  int                  snmp_fd;        /* SNMP socket */
+  int                  page_count,     /* Current page count */
+                       printer_state;  /* Current printer state */
+
+
+  if (argc != 2)
+  {
+    puts("Usage: testsupplies ip-or-hostname");
+    return (1);
+  }
+
+  if ((host = httpAddrGetList(argv[1], AF_UNSPEC, "9100")) == NULL)
+  {
+    perror(argv[1]);
+    return (1);
+  }
+
+  if ((snmp_fd = cupsSNMPOpen(host->addr.addr.sa_family)) < 0)
+  {
+    perror(argv[1]);
+    return (1);
+  }
+
+  for (;;)
+  {
+    fputs("backendSNMPSupplies: ", stdout);
+
+    if (backendSNMPSupplies(snmp_fd, &(host->addr), &page_count,
+                            &printer_state))
+    {
+      puts("FAIL");
+      return (1);
+    }
+
+    printf("backendSNMPSupplies: %s (page_count=%d, printer_state=%d)\n",
+          page_count < 0 || printer_state < CUPS_TC_other ||
+              printer_state > CUPS_TC_warmup ? "FAIL" : "PASS",
+          page_count, printer_state);
+
+    sleep(5);
+  }
+}
+
+
+/*
+ * End of "$Id$".
+ */
index 4e9826d..f6b94df 100644 (file)
@@ -1017,16 +1017,12 @@ static Boolean list_device_cb(void *refcon,
       CFStringGetCString(deviceIDString, idstr, sizeof(idstr),
                          kCFStringEncodingUTF8);
 
-      if (make)
-        CFStringGetCString(make, makestr, sizeof(makestr),
-                          kCFStringEncodingUTF8);
-      else
+      if (!CFStringGetCString(make, makestr, sizeof(makestr),
+                             kCFStringEncodingUTF8))
         strcpy(makestr, "Unknown");
 
-      if (model)
-       CFStringGetCString(model, &modelstr[1], sizeof(modelstr)-1,
-                          kCFStringEncodingUTF8);
-      else
+      if (!CFStringGetCString(model, &modelstr[1], sizeof(modelstr)-1,
+                             kCFStringEncodingUTF8))
         strcpy(modelstr + 1, "Printer");
 
       optionsstr[0] = '\0';
@@ -1041,16 +1037,6 @@ static Boolean list_device_cb(void *refcon,
       httpAssembleURI(HTTP_URI_CODING_ALL, uristr, sizeof(uristr), "usb", NULL, makestr, 0, modelstr);
       strncat(uristr, optionsstr, sizeof(uristr));
 
-     /*
-      * Fix common HP 1284 bug...
-      */
-
-      if (!strcasecmp(makestr, "Hewlett-Packard"))
-        strcpy(makestr, "HP");
-
-      if (!strncasecmp(modelstr + 1, "hp ", 3))
-        _cups_strcpy(modelstr + 1, modelstr + 4);
-
       printf("direct %s \"%s %s\" \"%s %s USB\" \"%s\"\n", uristr, makestr,
              &modelstr[1], makestr, &modelstr[1], idstr);
 
@@ -1186,11 +1172,48 @@ static void copy_deviceinfo(CFStringRef deviceIDString,
   CFStringRef modelKeys[]  = { CFSTR("MDL:"), CFSTR("MODEL:"), NULL };
   CFStringRef makeKeys[]   = { CFSTR("MFG:"), CFSTR("MANUFACTURER:"), NULL };
   CFStringRef serialKeys[] = { CFSTR("SN:"),  CFSTR("SERN:"), NULL };
+  CFRange hpRange = { 0, 3 };
 
   if (make != NULL)
-    *make = copy_value_for_key(deviceIDString, makeKeys);
+  {
+    if ((*make = copy_value_for_key(deviceIDString, makeKeys)) == NULL)
+      *make = CFStringCreateWithCString(kCFAllocatorDefault, "Unknown",
+                                        kCFStringEncodingUTF8);
+    else if (!CFStringCompare(*make, CFSTR("Hewlett-Packard"),
+                              kCFCompareCaseInsensitive))
+    {
+     /*
+      * Fix a common HP 1284 bug...
+      */
+
+      CFRelease(*make);
+      *make = CFStringCreateWithCString(kCFAllocatorDefault, "HP",
+                                        kCFStringEncodingUTF8);
+    }
+  }
+
   if (model != NULL)
-    *model = copy_value_for_key(deviceIDString, modelKeys);
+  {
+    if ((*model = copy_value_for_key(deviceIDString, modelKeys)) == NULL)
+      *model = CFStringCreateWithCString(kCFAllocatorDefault, "Printer",
+                                         kCFStringEncodingUTF8);
+    else if (!CFStringCompareWithOptions(*model, CFSTR("hp "), hpRange,
+                                         kCFCompareCaseInsensitive |
+                                            kCFCompareAnchored))
+    {
+     /*
+      * Fix a common HP 1284 bug...
+      */
+
+      CFRange subRange = { 3, CFStringGetLength(*model) - 3 };
+      CFStringRef sub = CFStringCreateWithSubstring(kCFAllocatorDefault,
+                                                    *model, subRange);
+
+      CFRelease(*model);
+      *model = sub;
+    }
+  }
+
   if (serial != NULL)
     *serial = copy_value_for_key(deviceIDString, serialKeys);
 }
index 104ea7d..6421581 100644 (file)
@@ -37,7 +37,8 @@
  */
 
 static int     open_device(const char *uri, int *use_bc);
-static void    side_cb(int print_fd, int device_fd, int use_bc);
+static void    side_cb(int print_fd, int device_fd, int snmp_fd,
+                       http_addr_t *addr, int use_bc);
 
 
 /*
@@ -173,7 +174,7 @@ print_device(const char *uri,               /* I - Device URI */
       lseek(print_fd, 0, SEEK_SET);
     }
 
-    tbytes = backendRunLoop(print_fd, device_fd, use_bc, side_cb);
+    tbytes = backendRunLoop(print_fd, device_fd, -1, NULL, use_bc, side_cb);
 
     if (print_fd != 0 && tbytes >= 0)
       _cupsLangPrintf(stderr,
@@ -543,9 +544,11 @@ open_device(const char *uri,               /* I - Device URI */
  */
 
 static void
-side_cb(int print_fd,                  /* I - Print file */
-        int device_fd,                 /* I - Device file */
-       int use_bc)                     /* I - Using back-channel? */
+side_cb(int         print_fd,          /* I - Print file */
+        int         device_fd,         /* I - Device file */
+        int         snmp_fd,           /* I - SNMP socket (unused) */
+       http_addr_t *addr,              /* I - Device address (unused) */
+       int         use_bc)             /* I - Using back-channel? */
 {
   cups_sc_command_t    command;        /* Request command */
   cups_sc_status_t     status;         /* Request/response status */
@@ -553,6 +556,9 @@ side_cb(int print_fd,                       /* I - Print file */
   int                  datalen;        /* Request/response data size */
 
 
+  (void)snmp_fd;
+  (void)addr;
+
   datalen = sizeof(data);
 
   if (cupsSideChannelRead(&command, &status, data, &datalen, 1.0))
index 8f51586..57cdb52 100644 (file)
@@ -218,7 +218,8 @@ if test "x$enable_dbus" != xno; then
                        CUPSDLIBS="$CUPSDLIBS `$PKGCONFIG --libs dbus-1`"
                        AC_CHECK_LIB(dbus-1,
                            dbus_message_iter_init_append,
-                           AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND))
+                           AC_DEFINE(HAVE_DBUS_MESSAGE_ITER_INIT_APPEND),,
+                           `$PKGCONFIG --libs dbus-1`)
                else
                        AC_MSG_RESULT(no)
                fi
@@ -238,7 +239,7 @@ case $uname in
                FONTS=""
                LEGACY_BACKENDS=""
                 BACKLIBS="$BACKLIBS -framework IOKit"
-                CUPSDLIBS="$CUPSDLIBS -sectorder __TEXT __text cupsd.order -e start -framework IOKit -framework SystemConfiguration"
+                CUPSDLIBS="$CUPSDLIBS -sectorder __TEXT __text cupsd.order -e start -framework IOKit -framework SystemConfiguration -framework ApplicationServices"
                 LIBS="-framework SystemConfiguration -framework CoreFoundation $LIBS"
 
                dnl Check for framework headers...
index fc1c821..ae1db08 100644 (file)
@@ -141,6 +141,11 @@ if test -n "$GCC"; then
                        # CUPS since we already use buffer-limited calls, but
                        # this will catch any additions that are broken.                
                        CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+
+                       if test x$enable_pie = xyes; then
+                               # GCC 4 on Mac OS X needs -Wl,-pie as well
+                               LDFLAGS="$LDFLAGS -Wl,-pie"
+                       fi
                        ;;
 
                HP-UX*)
index e9d6038..c09b99a 100644 (file)
@@ -289,6 +289,55 @@ fi
 
 AC_DEFINE_UNQUOTED(CUPS_DEFAULT_PRINTCAP, "$CUPS_DEFAULT_PRINTCAP")
 
+dnl Default LPD config file...
+AC_ARG_WITH(lpdconfigfile, [  --with-lpdconfigfile    set default LPDConfigFile URI],
+       default_lpdconfigfile="$withval",
+       default_lpdconfigfile="default")
+
+if test x$default_lpdconfigfile != xno; then
+       if test "x$default_lpdconfigfile" = "xdefault"; then
+               case $uname in
+                       Darwin*)
+                               CUPS_DEFAULT_LPD_CONFIG_FILE="launchd:///System/Library/LaunchDaemons/org.cups.cups-lpd.plist"
+                               ;;
+                       *)
+                               if test -d /etc/xinetd.d; then
+                                       CUPS_DEFAULT_LPD_CONFIG_FILE="xinetd:///etc/xinetd.d/cups-lpd"
+                               else
+                                       CUPS_DEFAULT_LPD_CONFIG_FILE=""
+                               fi
+                               ;;
+               esac
+       else
+               CUPS_DEFAULT_LPD_CONFIG_FILE="$default_lpdconfigfile"
+       fi
+else
+       CUPS_DEFAULT_LPD_CONFIG_FILE=""
+fi
+
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_LPD_CONFIG_FILE, "$CUPS_DEFAULT_LPD_CONFIG_FILE")
+
+dnl Default SMB config file...
+AC_ARG_WITH(smbconfigfile, [  --with-smbconfigfile    set default SMBConfigFile URI],
+       default_smbconfigfile="$withval",
+       default_smbconfigfile="default")
+
+if test x$default_smbconfigfile != xno; then
+       if test "x$default_smbconfigfile" = "xdefault"; then
+               if test -f /etc/smb.conf; then
+                       CUPS_DEFAULT_SMB_CONFIG_FILE="samba:///etc/smb.conf"
+               else
+                       CUPS_DEFAULT_SMB_CONFIG_FILE=""
+               fi
+       else
+               CUPS_DEFAULT_SMB_CONFIG_FILE="$default_smbconfigfile"
+       fi
+else
+       CUPS_DEFAULT_SMB_CONFIG_FILE=""
+fi
+
+AC_DEFINE_UNQUOTED(CUPS_DEFAULT_SMB_CONFIG_FILE, "$CUPS_DEFAULT_SMB_CONFIG_FILE")
+
 dnl Default MaxCopies value...
 AC_ARG_WITH(max-copies, [  --with-max-copies       set max copies value, default=100 ],
        CUPS_MAX_COPIES="$withval",
index eb94eac..e7a7a81 100644 (file)
@@ -93,7 +93,6 @@ HEADERS       =       \
                dir.h \
                file.h \
                http.h \
-               i18n.h \
                ipp.h \
                language.h \
                ppd.h \
index 29982e5..bc9a052 100644 (file)
 applications, filters, printer drivers, and backends that need to interface
 with the CUPS scheduler.</p>
 
+<h3><a name='CLIENTS_AND_SERVERS'>Clients and Servers</a></h3>
+
+<p>CUPS is based on the Internet Printing Protocol ("IPP"), which allows
+clients (applications) to communicate with a server (the scheduler) to get a
+list of printers, send print jobs, and so forth. You identify which server
+you want to communicate with using a pointer to the opaque structure
+<code>http_t</code>. All of the examples in this document use the
+<code>CUPS_HTTP_DEFAULT</code> constant, referring to the default connection
+to the scheduler. The <a href='api-httpipp.html' target='_top'>HTTP and IPP
+APIs</a> document provides more information on server connections.</p>
+
 <h3><a name='PRINTERS_AND_CLASSES'>Printers and Classes</a></h3>
 
 <p>Printers and classes (collections of printers) are accessed through
 the <a href="#cups_dest_t"><code>cups_dest_t</code></a> structure which
 includes the name (<code>name</code>), instance (<code>instance</code> -
-a way of selected certain saved options), and the options and attributes
-associated with that destination (<code>num_options</code> and
+a way of selecting certain saved options/settings), and the options and
+attributes associated with that destination (<code>num_options</code> and
 <code>options</code>). Destinations are created using the
 <a href="#cupsGetDests"><code>cupsGetDests</code></a> function and freed
 using the <a href='#cupsFreeDests'><code>cupsFreeDests</code></a> function.
@@ -172,7 +183,8 @@ int num_options = 0;
 <a href='#cups_dest_t'>cups_dest_t</a> *dest;
 
 for (i = 0; i < dest->num_options; i ++)
-  num_options = <a href='#cupsAddOption'>cupsAddOption</a>(dest->options[i].name, dest->options[i].value, num_options, &amp;options);
+  num_options = <a href='#cupsAddOption'>cupsAddOption</a>(dest->options[i].name, dest->options[i].value,
+                              num_options, &amp;options);
 </pre>
 
 <p>Use the <a href='#cupsFreeOptions'><code>cupsFreeOptions</code></a>
@@ -199,7 +211,8 @@ int num_options;
 int job_id;
 
 /* Print a single file */
-job_id = <a href='#cupsPrintFile'>cupsPrintFile</a>(dest->name, "/usr/share/cups/data/testprint.ps", "Test Print", num_options, options);
+job_id = <a href='#cupsPrintFile'>cupsPrintFile</a>(dest->name, "/usr/share/cups/data/testprint.ps",
+                        "Test Print", num_options, options);
 </pre>
 
 <p>The <a href='#cupsPrintFiles'><code>cupsPrintFiles</code></a> function
@@ -237,7 +250,8 @@ int i;
 char buffer[1024];
 
 /* Create the job */
-job_id = <a href='#cupsCreateJob'>cupsCreateJob</a>(CUPS_HTTP_DEFAULT, dest->name, "10 Text Files", num_options, options);
+job_id = <a href='#cupsCreateJob'>cupsCreateJob</a>(CUPS_HTTP_DEFAULT, dest->name, "10 Text Files",
+                       num_options, options);
 
 /* If the job is created, add 10 files */
 if (job_id > 0)
@@ -246,7 +260,8 @@ if (job_id > 0)
   {
     snprintf(buffer, sizeof(buffer), "file%d.txt", i);
 
-    <a href='#cupsStartDocument'>cupsStartDocument</a>(CUPS_HTTP_DEFAULT, dest->name, job_id, buffer, CUPS_FORMAT_TEXT, i == 10);
+    <a href='#cupsStartDocument'>cupsStartDocument</a>(CUPS_HTTP_DEFAULT, dest->name, job_id, buffer,
+                      CUPS_FORMAT_TEXT, i == 10);
 
     snprintf(buffer, sizeof(buffer),
              "File %d\n"
@@ -338,7 +353,7 @@ while (job_state &lt; IPP_JOB_STOPPED)
 <a href='#cupsCancelJob'><code>cupsCancelJob</code></a> function with the
 job ID:</p>
 
-<pre class='exmaple'>
+<pre class='example'>
 #include &lt;cups/cups.h&gt;
 
 <a href='#cups_dest_t'>cups_dest_t</a> *dest;
index adc2436..4391a3d 100644 (file)
@@ -83,7 +83,7 @@ static int    cups_local_auth(http_t *http);
  */
 
 int                                    /* O - 0 on success, -1 on error */
-cupsDoAuthentication(http_t     *http, /* I - HTTP connection to server */
+cupsDoAuthentication(http_t     *http, /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
                      const char *method,/* I - Request method ("GET", "POST", "PUT") */
                     const char *resource)
                                        /* I - Resource path */
index 6f61181..bafe52f 100644 (file)
@@ -310,7 +310,7 @@ cupsGetDests(cups_dest_t **dests)   /* O - Destinations */
  */
 
 int                                    /* O - Number of destinations */
-cupsGetDests2(http_t      *http,       /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
+cupsGetDests2(http_t      *http,       /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
               cups_dest_t **dests)     /* O - Destinations */
 {
   int          i;                      /* Looping var */
@@ -495,8 +495,8 @@ cupsGetDests2(http_t      *http,    /* I - HTTP connection or @code CUPS_HTTP_DEFAU
  */
 
 cups_dest_t *                          /* O - Destination or @code NULL@ */
-cupsGetNamedDest(http_t     *http,     /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
-                 const char *name,     /* I - Destination name or @code NULL@ */
+cupsGetNamedDest(http_t     *http,     /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
+                 const char *name,     /* I - Destination name or @code NULL@ for the default destination */
                  const char *instance) /* I - Instance name or @code NULL@ */
 {
   cups_dest_t  *dest;                  /* Destination */
@@ -704,7 +704,7 @@ cupsSetDests(int         num_dests, /* I - Number of destinations */
  */
 
 int                                    /* O - 0 on success, -1 on error */
-cupsSetDests2(http_t      *http,       /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
+cupsSetDests2(http_t      *http,       /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
               int         num_dests,   /* I - Number of destinations */
               cups_dest_t *dests)      /* I - Destinations */
 {
@@ -1473,7 +1473,7 @@ cups_get_dests(const char  *filename,     /* I - File to read from */
  */
 
 static int                             /* O - Number of destinations */
-cups_get_sdests(http_t      *http,     /* I - HTTP connection or CUPS_HTTP_DEFAULT */
+cups_get_sdests(http_t      *http,     /* I - Connection to server or CUPS_HTTP_DEFAULT */
                 ipp_op_t    op,                /* I - IPP operation */
                const char  *name,      /* I - Name of destination */
                 int         num_dests, /* I - Number of destinations */
index 506b87f..0fb288b 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Option encoding routines for the Common UNIX Printing System (CUPS).
  *
- *   Copyright 2007 by Apple Inc.
+ *   Copyright 2007-2008 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -67,6 +67,8 @@ static const _ipp_option_t ipp_options[] =
   { 0, "job-page-limit",       IPP_TAG_INTEGER,        IPP_TAG_JOB },
   { 0, "job-priority",         IPP_TAG_INTEGER,        IPP_TAG_JOB },
   { 0, "job-quota-period",     IPP_TAG_INTEGER,        IPP_TAG_JOB },
+  { 1, "job-sheets",           IPP_TAG_NAME,           IPP_TAG_JOB },
+  { 1, "job-sheets-default",   IPP_TAG_NAME,           IPP_TAG_PRINTER },
   { 0, "job-uuid",             IPP_TAG_URI,            IPP_TAG_JOB },
   { 0, "landscape",            IPP_TAG_BOOLEAN,        IPP_TAG_JOB },
   { 1, "media",                        IPP_TAG_KEYWORD,        IPP_TAG_JOB },
index e144bd8..1694f49 100644 (file)
@@ -51,7 +51,7 @@
  */
 
 http_status_t                          /* O - HTTP status */
-cupsGetFd(http_t     *http,            /* I - HTTP connection to server or @code CUPS_HTTP_DEFAULT@ */
+cupsGetFd(http_t     *http,            /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
          const char *resource,         /* I - Resource name */
          int        fd)                /* I - File descriptor */
 {
@@ -191,7 +191,7 @@ cupsGetFd(http_t     *http,         /* I - HTTP connection to server or @code CUPS_HTTP
  */
 
 http_status_t                          /* O - HTTP status */
-cupsGetFile(http_t     *http,          /* I - HTTP connection to server or @code CUPS_HTTP_DEFAULT@ */
+cupsGetFile(http_t     *http,          /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
            const char *resource,       /* I - Resource name */
            const char *filename)       /* I - Filename */
 {
@@ -259,7 +259,7 @@ cupsGetFile(http_t     *http,               /* I - HTTP connection to server or @code CUPS_HT
  */
 
 http_status_t                          /* O - HTTP status */
-cupsPutFd(http_t     *http,            /* I - HTTP connection to server or @code CUPS_HTTP_DEFAULT@ */
+cupsPutFd(http_t     *http,            /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
           const char *resource,                /* I - Resource name */
          int        fd)                /* I - File descriptor */
 {
@@ -444,7 +444,7 @@ cupsPutFd(http_t     *http,         /* I - HTTP connection to server or @code CUPS_HTTP
  */
 
 http_status_t                          /* O - HTTP status */
-cupsPutFile(http_t     *http,          /* I - HTTP connection to server or @code CUPS_HTTP_DEFAULT@ */
+cupsPutFile(http_t     *http,          /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
             const char *resource,      /* I - Resource name */
            const char *filename)       /* I - Filename */
 {
index f860a22..82b612a 100644 (file)
@@ -220,7 +220,7 @@ _httpBIOMethods(void)
  */
 
 void
-httpBlocking(http_t *http,             /* I - HTTP connection */
+httpBlocking(http_t *http,             /* I - Connection to server */
              int    b)                 /* I - 1 = blocking, 0 = non-blocking */
 {
   if (http)
@@ -233,7 +233,7 @@ httpBlocking(http_t *http,          /* I - HTTP connection */
  */
 
 int                                    /* O - 0 = no data, 1 = data available */
-httpCheck(http_t *http)                        /* I - HTTP connection */
+httpCheck(http_t *http)                        /* I - Connection to server */
 {
   return (httpWait(http, 0));
 }
@@ -246,7 +246,7 @@ httpCheck(http_t *http)                     /* I - HTTP connection */
  */
 
 void
-httpClearCookie(http_t *http)          /* I - HTTP connection */
+httpClearCookie(http_t *http)          /* I - Connection to server */
 {
   if (!http)
     return;
@@ -264,7 +264,7 @@ httpClearCookie(http_t *http)               /* I - HTTP connection */
  */
 
 void
-httpClearFields(http_t *http)          /* I - HTTP connection */
+httpClearFields(http_t *http)          /* I - Connection to server */
 {
   if (http)
   {
@@ -290,7 +290,7 @@ httpClearFields(http_t *http)               /* I - HTTP connection */
  */
 
 void
-httpClose(http_t *http)                        /* I - HTTP connection */
+httpClose(http_t *http)                        /* I - Connection to server */
 {
 #ifdef HAVE_GSSAPI
   OM_uint32    minor_status,           /* Minor status code */
@@ -459,7 +459,7 @@ httpConnectEncrypt(
  */
 
 int                                    /* O - Status of call (0 = success) */
-httpDelete(http_t     *http,           /* I - HTTP connection */
+httpDelete(http_t     *http,           /* I - Connection to server */
            const char *uri)            /* I - URI to delete */
 {
   return (http_send(http, HTTP_DELETE, uri));
@@ -471,7 +471,7 @@ httpDelete(http_t     *http,                /* I - HTTP connection */
  */
 
 int                                    /* O - -1 on error, 0 on success */
-httpEncryption(http_t            *http,        /* I - HTTP connection */
+httpEncryption(http_t            *http,        /* I - Connection to server */
                http_encryption_t e)    /* I - New encryption preference */
 {
   DEBUG_printf(("httpEncryption(http=%p, e=%d)\n", http, e));
@@ -503,7 +503,7 @@ httpEncryption(http_t            *http,     /* I - HTTP connection */
  */
 
 int                                    /* O - Error code (errno) value */
-httpError(http_t *http)                        /* I - HTTP connection */
+httpError(http_t *http)                        /* I - Connection to server */
 {
   if (http)
     return (http->error);
@@ -517,7 +517,7 @@ httpError(http_t *http)                     /* I - HTTP connection */
  */
 
 void
-httpFlush(http_t *http)                        /* I - HTTP connection */
+httpFlush(http_t *http)                        /* I - Connection to server */
 {
   char buffer[8192];                   /* Junk buffer */
   int  blocking;                       /* To block or not to block */
@@ -576,7 +576,7 @@ httpFlush(http_t *http)                     /* I - HTTP connection */
  */
 
 int                                    /* O - Bytes written or -1 on error */
-httpFlushWrite(http_t *http)           /* I - HTTP connection */
+httpFlushWrite(http_t *http)           /* I - Connection to server */
 {
   int  bytes;                          /* Bytes written */
 
@@ -602,7 +602,7 @@ httpFlushWrite(http_t *http)                /* I - HTTP connection */
  */
 
 int                                    /* O - Status of call (0 = success) */
-httpGet(http_t     *http,              /* I - HTTP connection */
+httpGet(http_t     *http,              /* I - Connection to server */
         const char *uri)               /* I - URI to get */
 {
   return (http_send(http, HTTP_GET, uri));
@@ -621,7 +621,7 @@ httpGet(http_t     *http,           /* I - HTTP connection */
  */
 
 char *                                 /* O - Authorization string */
-httpGetAuthString(http_t *http)                /* I - HTTP connection */
+httpGetAuthString(http_t *http)                /* I - Connection to server */
 {
   if (http)
     return (http->authstring);
@@ -637,7 +637,7 @@ httpGetAuthString(http_t *http)             /* I - HTTP connection */
  */
 
 int                                    /* O - 1 if blocking, 0 if non-blocking */
-httpGetBlocking(http_t *http)          /* I - HTTP connection */
+httpGetBlocking(http_t *http)          /* I - Connection to server */
 {
   return (http ? http->blocking : 0);
 }
@@ -663,7 +663,7 @@ httpGetCookie(http_t *http)         /* I - HTTP connecion */
  */
 
 int                                    /* O - File descriptor or -1 if none */
-httpGetFd(http_t *http)                        /* I - HTTP connection */
+httpGetFd(http_t *http)                        /* I - Connection to server */
 {
   return (http ? http->fd : -1);
 }
@@ -674,7 +674,7 @@ httpGetFd(http_t *http)                     /* I - HTTP connection */
  */
 
 const char *                           /* O - Field value */
-httpGetField(http_t       *http,       /* I - HTTP connection */
+httpGetField(http_t       *http,       /* I - Connection to server */
              http_field_t field)       /* I - Field to get */
 {
   if (!http || field <= HTTP_FIELD_UNKNOWN || field >= HTTP_FIELD_MAX)
@@ -705,7 +705,7 @@ httpGetField(http_t       *http,    /* I - HTTP connection */
  */
 
 int                                    /* O - Content length */
-httpGetLength(http_t *http)            /* I - HTTP connection */
+httpGetLength(http_t *http)            /* I - Connection to server */
 {
  /*
   * Get the read content length and return the 32-bit value.
@@ -733,7 +733,7 @@ httpGetLength(http_t *http)         /* I - HTTP connection */
  */
 
 off_t                                  /* O - Content length */
-httpGetLength2(http_t *http)           /* I - HTTP connection */
+httpGetLength2(http_t *http)           /* I - Connection to server */
 {
   DEBUG_printf(("httpGetLength2(http=%p), state=%d\n", http, http->state));
 
@@ -795,7 +795,7 @@ httpGetLength2(http_t *http)                /* I - HTTP connection */
  */
 
 http_status_t                          /* O - HTTP status */
-httpGetStatus(http_t *http)            /* I - HTTP connection */
+httpGetStatus(http_t *http)            /* I - Connection to server */
 {
   return (http ? http->status : HTTP_ERROR);
 }
@@ -808,7 +808,7 @@ httpGetStatus(http_t *http)         /* I - HTTP connection */
  */
 
 char *                                 /* O - Value or NULL */
-httpGetSubField(http_t       *http,    /* I - HTTP connection */
+httpGetSubField(http_t       *http,    /* I - Connection to server */
                 http_field_t field,    /* I - Field index */
                 const char   *name,    /* I - Name of sub-field */
                char         *value)    /* O - Value string */
@@ -824,7 +824,7 @@ httpGetSubField(http_t       *http, /* I - HTTP connection */
  */
 
 char *                                 /* O - Value or NULL */
-httpGetSubField2(http_t       *http,   /* I - HTTP connection */
+httpGetSubField2(http_t       *http,   /* I - Connection to server */
                  http_field_t field,   /* I - Field index */
                  const char   *name,   /* I - Name of sub-field */
                 char         *value,   /* O - Value string */
@@ -951,7 +951,7 @@ httpGetSubField2(http_t       *http,        /* I - HTTP connection */
 char *                                 /* O - Line or NULL */
 httpGets(char   *line,                 /* I - Line to read into */
          int    length,                        /* I - Max length of buffer */
-        http_t *http)                  /* I - HTTP connection */
+        http_t *http)                  /* I - Connection to server */
 {
   char *lineptr,                       /* Pointer into line */
        *lineend,                       /* End of line */
@@ -1106,7 +1106,7 @@ httpGets(char   *line,                    /* I - Line to read into */
  */
 
 int                                    /* O - Status of call (0 = success) */
-httpHead(http_t     *http,             /* I - HTTP connection */
+httpHead(http_t     *http,             /* I - Connection to server */
          const char *uri)              /* I - URI for head */
 {
   return (http_send(http, HTTP_HEAD, uri));
@@ -1187,7 +1187,7 @@ httpInitialize(void)
  */
 
 int                                    /* O - Status of call (0 = success) */
-httpOptions(http_t     *http,          /* I - HTTP connection */
+httpOptions(http_t     *http,          /* I - Connection to server */
             const char *uri)           /* I - URI for options */
 {
   return (http_send(http, HTTP_OPTIONS, uri));
@@ -1199,7 +1199,7 @@ httpOptions(http_t     *http,             /* I - HTTP connection */
  */
 
 int                                    /* O - Status of call (0 = success) */
-httpPost(http_t     *http,             /* I - HTTP connection */
+httpPost(http_t     *http,             /* I - Connection to server */
          const char *uri)              /* I - URI for post */
 {
   return (http_send(http, HTTP_POST, uri));
@@ -1213,7 +1213,7 @@ httpPost(http_t     *http,                /* I - HTTP connection */
  */
 
 int                                    /* O - Number of bytes written */
-httpPrintf(http_t     *http,           /* I - HTTP connection */
+httpPrintf(http_t     *http,           /* I - Connection to server */
            const char *format,         /* I - printf-style format string */
           ...)                         /* I - Additional args as needed */
 {
@@ -1252,7 +1252,7 @@ httpPrintf(http_t     *http,              /* I - HTTP connection */
  */
 
 int                                    /* O - Status of call (0 = success) */
-httpPut(http_t     *http,              /* I - HTTP connection */
+httpPut(http_t     *http,              /* I - Connection to server */
         const char *uri)               /* I - URI to put */
 {
   return (http_send(http, HTTP_PUT, uri));
@@ -1269,7 +1269,7 @@ httpPut(http_t     *http,         /* I - HTTP connection */
  */
 
 int                                    /* O - Number of bytes read */
-httpRead(http_t *http,                 /* I - HTTP connection */
+httpRead(http_t *http,                 /* I - Connection to server */
          char   *buffer,               /* I - Buffer for data */
         int    length)                 /* I - Maximum number of bytes */
 {
@@ -1284,7 +1284,7 @@ httpRead(http_t *http,                    /* I - HTTP connection */
  */
 
 ssize_t                                        /* O - Number of bytes read */
-httpRead2(http_t *http,                        /* I - HTTP connection */
+httpRead2(http_t *http,                        /* I - Connection to server */
           char   *buffer,              /* I - Buffer for data */
          size_t length)                /* I - Maximum number of bytes */
 {
@@ -1590,7 +1590,7 @@ _httpReadCDSA(
 
 ssize_t                                        /* O - Number of bytes read or -1 on error */
 _httpReadGNUTLS(
-    gnutls_transport_ptr ptr,          /* I - HTTP connection */
+    gnutls_transport_ptr ptr,          /* I - Connection to server */
     void                 *data,                /* I - Buffer */
     size_t               length)       /* I - Number of bytes to read */
 {
@@ -1622,7 +1622,7 @@ _httpReadGNUTLS(
  */
 
 int                                    /* O - 0 on success, non-zero on failure */
-httpReconnect(http_t *http)            /* I - HTTP connection */
+httpReconnect(http_t *http)            /* I - Connection to server */
 {
   http_addrlist_t      *addr;          /* Connected address */
 
@@ -1714,7 +1714,7 @@ httpReconnect(http_t *http)               /* I - HTTP connection */
  */
 
 void
-httpSetAuthString(http_t     *http,    /* I - HTTP connection */
+httpSetAuthString(http_t     *http,    /* I - Connection to server */
                   const char *scheme,  /* I - Auth scheme (NULL to clear it) */
                  const char *data)     /* I - Auth data (NULL for none) */
 {
@@ -1795,7 +1795,7 @@ httpSetCookie(http_t     *http,           /* I - Connection */
  */
 
 void
-httpSetExpect(http_t        *http,     /* I - HTTP connection */
+httpSetExpect(http_t        *http,     /* I - Connection to server */
               http_status_t expect)    /* I - HTTP status to expect (HTTP_CONTINUE) */
 {
   if (http)
@@ -1808,7 +1808,7 @@ httpSetExpect(http_t        *http,        /* I - HTTP connection */
  */
 
 void
-httpSetField(http_t       *http,       /* I - HTTP connection */
+httpSetField(http_t       *http,       /* I - Connection to server */
              http_field_t field,       /* I - Field index */
             const char   *value)       /* I - Value */
 {
@@ -1842,7 +1842,7 @@ httpSetField(http_t       *http,  /* I - HTTP connection */
  */
 
 void
-httpSetLength(http_t *http,            /* I - HTTP connection */
+httpSetLength(http_t *http,            /* I - Connection to server */
               size_t length)           /* I - Length (0 for chunked) */
 {
   if (!http)
@@ -1867,7 +1867,7 @@ httpSetLength(http_t *http,               /* I - HTTP connection */
  */
 
 int                                    /* O - Status of call (0 = success) */
-httpTrace(http_t     *http,            /* I - HTTP connection */
+httpTrace(http_t     *http,            /* I - Connection to server */
           const char *uri)             /* I - URI for trace */
 {
   return (http_send(http, HTTP_TRACE, uri));
@@ -1879,7 +1879,7 @@ httpTrace(http_t     *http,               /* I - HTTP connection */
  */
 
 http_status_t                          /* O - HTTP status */
-httpUpdate(http_t *http)               /* I - HTTP connection */
+httpUpdate(http_t *http)               /* I - Connection to server */
 {
   char         line[32768],            /* Line from connection... */
                *value;                 /* Pointer to value on line */
@@ -2059,7 +2059,7 @@ httpUpdate(http_t *http)          /* I - HTTP connection */
  */
 
 int                                    /* O - 1 if data is available, 0 otherwise */
-httpWait(http_t *http,                 /* I - HTTP connection */
+httpWait(http_t *http,                 /* I - Connection to server */
          int    msec)                  /* I - Milliseconds to wait */
 {
  /*
@@ -2100,7 +2100,7 @@ httpWait(http_t *http,                    /* I - HTTP connection */
  */
  
 int                                    /* O - Number of bytes written */
-httpWrite(http_t     *http,            /* I - HTTP connection */
+httpWrite(http_t     *http,            /* I - Connection to server */
           const char *buffer,          /* I - Buffer for data */
          int        length)            /* I - Number of bytes to write */
 {
@@ -2115,7 +2115,7 @@ httpWrite(http_t     *http,               /* I - HTTP connection */
  */
  
 ssize_t                                        /* O - Number of bytes written */
-httpWrite2(http_t     *http,           /* I - HTTP connection */
+httpWrite2(http_t     *http,           /* I - Connection to server */
            const char *buffer,         /* I - Buffer for data */
           size_t     length)           /* I - Number of bytes to write */
 {
@@ -2286,7 +2286,7 @@ _httpWriteCDSA(
 
 ssize_t                                        /* O - Number of bytes written or -1 on error */
 _httpWriteGNUTLS(
-    gnutls_transport_ptr ptr,          /* I - HTTP connection */
+    gnutls_transport_ptr ptr,          /* I - Connection to server */
     const void           *data,                /* I - Data buffer */
     size_t               length)       /* I - Number of bytes to write */
 {
@@ -2465,7 +2465,7 @@ http_field(const char *name)      /* I - String name */
  */
 
 static int                             /* O - Bytes read */
-http_read_ssl(http_t *http,            /* I - HTTP connection */
+http_read_ssl(http_t *http,            /* I - Connection to server */
              char   *buf,              /* I - Buffer to store data */
              int    len)               /* I - Length of buffer */
 {
@@ -2517,7 +2517,7 @@ http_read_ssl(http_t *http,               /* I - HTTP connection */
  */
 
 static int                     /* O - 0 on success, non-zero on error */
-http_send(http_t       *http,  /* I - HTTP connection */
+http_send(http_t       *http,  /* I - Connection to server */
           http_state_t request,        /* I - Request code */
          const char   *uri)    /* I - URI */
 {
@@ -2681,7 +2681,7 @@ http_send(http_t       *http,     /* I - HTTP connection */
  */
 
 static int                             /* O - Status of connection */
-http_setup_ssl(http_t *http)           /* I - HTTP connection */
+http_setup_ssl(http_t *http)           /* I - Connection to server */
 {
 #  ifdef HAVE_LIBSSL
   SSL_CTX      *context;               /* Context for encryption */
@@ -2836,7 +2836,7 @@ http_setup_ssl(http_t *http)              /* I - HTTP connection */
  */
 
 static void
-http_shutdown_ssl(http_t *http)                /* I - HTTP connection */
+http_shutdown_ssl(http_t *http)                /* I - Connection to server */
 {
 #  ifdef HAVE_LIBSSL
   SSL_CTX      *context;               /* Context for encryption */
@@ -2893,7 +2893,7 @@ http_shutdown_ssl(http_t *http)           /* I - HTTP connection */
  */
 
 static int                             /* O - Status of connection */
-http_upgrade(http_t *http)             /* I - HTTP connection */
+http_upgrade(http_t *http)             /* I - Connection to server */
 {
   int          ret;                    /* Return value */
   http_t       myhttp;                 /* Local copy of HTTP data */
@@ -2975,7 +2975,7 @@ http_upgrade(http_t *http)                /* I - HTTP connection */
  */
 
 static int                             /* O - 1 if data is available, 0 otherwise */
-http_wait(http_t *http,                        /* I - HTTP connection */
+http_wait(http_t *http,                        /* I - Connection to server */
           int    msec,                 /* I - Milliseconds to wait */
          int    usessl)                /* I - Use SSL context? */
 {
@@ -3063,7 +3063,7 @@ http_wait(http_t *http,                   /* I - HTTP connection */
  */
  
 static int                             /* O - Number of bytes written */
-http_write(http_t     *http,           /* I - HTTP connection */
+http_write(http_t     *http,           /* I - Connection to server */
           const char *buffer,          /* I - Buffer for data */
          int        length)            /* I - Number of bytes to write */
 {
@@ -3151,7 +3151,7 @@ http_write(http_t     *http,              /* I - HTTP connection */
  */
 
 static int                             /* O - Number bytes written */
-http_write_chunk(http_t     *http,     /* I - HTTP connection */
+http_write_chunk(http_t     *http,     /* I - Connection to server */
                  const char *buffer,   /* I - Buffer to write */
                 int        length)     /* I - Length of buffer */
 {
@@ -3194,7 +3194,7 @@ http_write_chunk(http_t     *http,        /* I - HTTP connection */
  */
 
 static int                             /* O - Bytes written */
-http_write_ssl(http_t     *http,       /* I - HTTP connection */
+http_write_ssl(http_t     *http,       /* I - Connection to server */
               const char *buf,         /* I - Buffer holding data */
               int        len)          /* I - Length of buffer */
 {
index 41f65c1..9a5e093 100644 (file)
@@ -1019,7 +1019,7 @@ ippReadIO(void       *src,                /* I - Data source */
           ipp_t      *ipp)             /* I - IPP data */
 {
   int                  n;              /* Length of data */
-  unsigned char                buffer[IPP_MAX_LENGTH],
+  unsigned char                buffer[IPP_MAX_LENGTH + 1],
                                        /* Data buffer */
                        string[IPP_MAX_NAME],
                                        /* Small string buffer */
@@ -2415,7 +2415,8 @@ ippWriteIO(void       *dst,               /* I - Destination */
            return (IPP_ERROR);
          }
 
-          DEBUG_printf(("ippWriteIO: wrote %d bytes\n", bufptr - buffer));
+          DEBUG_printf(("ippWriteIO: wrote %d bytes\n",
+                       (int)(bufptr - buffer)));
 
         /*
           * If blocking is disabled, stop here...
@@ -2743,7 +2744,7 @@ ipp_read_http(http_t      *http,  /* I - Client connection */
   
 
   DEBUG_printf(("ipp_read_http(http=%p, buffer=%p, length=%d)\n",
-                http, buffer, length));
+                http, buffer, (int)length));
 
  /*
   * Loop until all bytes are read...
index 32ff2c8..03a382e 100644 (file)
@@ -31,7 +31,7 @@
 /*
  * 'cupsNotifySubject()' - Return the subject for the given notification message.
  *
- * The returned string must be freed by the caller using free().
+ * The returned string must be freed by the caller using @code free@.
  *
  * @since CUPS 1.2@
  */
index 6544c34..bab7c7e 100644 (file)
  * 'cupsDoFileRequest()' - Do an IPP request with a file.
  *
  * This function sends the IPP request to the specified server, retrying
- * and authenticating as necessary.  The request is freed with ippDelete()
+ * and authenticating as necessary.  The request is freed with @link ippDelete@
  * after receiving a valid IPP response.
  */
 
 ipp_t *                                        /* O - Response data */
-cupsDoFileRequest(http_t     *http,    /* I - HTTP connection or CUPS_HTTP_DEFAULT */
+cupsDoFileRequest(http_t     *http,    /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
                   ipp_t      *request, /* I - IPP request */
                   const char *resource,        /* I - HTTP resource for POST */
-                 const char *filename) /* I - File to send or NULL for none */
+                 const char *filename) /* I - File to send or @code NULL@ for none */
 {
   ipp_t                *response;              /* IPP response data */
   int          infile;                 /* Input file */
@@ -110,7 +110,7 @@ cupsDoFileRequest(http_t     *http, /* I - HTTP connection or CUPS_HTTP_DEFAULT
  */
 
 ipp_t *                                        /* O - Response data */
-cupsDoIORequest(http_t     *http,      /* I - HTTP connection or CUPS_HTTP_DEFAULT */
+cupsDoIORequest(http_t     *http,      /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
                 ipp_t      *request,   /* I - IPP request */
                 const char *resource,  /* I - HTTP resource for POST */
                int        infile,      /* I - File to read from or -1 for none */
@@ -247,6 +247,9 @@ cupsDoIORequest(http_t     *http,   /* I - HTTP connection or CUPS_HTTP_DEFAULT */
       status   = http->status;
     }
 
+    if (status == HTTP_FORBIDDEN)
+      break;
+
     if (response)
     {
       if (outfile >= 0)
@@ -289,7 +292,7 @@ cupsDoIORequest(http_t     *http,   /* I - HTTP connection or CUPS_HTTP_DEFAULT */
  */
 
 ipp_t *                                        /* O - Response data */
-cupsDoRequest(http_t     *http,                /* I - HTTP connection or CUPS_HTTP_DEFAULT */
+cupsDoRequest(http_t     *http,                /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
               ipp_t      *request,     /* I - IPP request */
               const char *resource)    /* I - HTTP resource for POST */
 {
@@ -307,8 +310,8 @@ cupsDoRequest(http_t     *http,             /* I - HTTP connection or CUPS_HTTP_DEFAULT */
  * @since CUPS 1.4@
  */
 
-ipp_t *                                        /* O - Response or NULL on HTTP error */
-cupsGetResponse(http_t     *http,      /* I - HTTP connection or CUPS_HTTP_DEFAULT */
+ipp_t *                                        /* O - Response or @code NULL@ on HTTP error */
+cupsGetResponse(http_t     *http,      /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
                 const char *resource)  /* I - HTTP resource for POST */
 {
   http_status_t        status;                 /* HTTP status */
@@ -399,10 +402,14 @@ cupsGetResponse(http_t     *http, /* I - HTTP connection or CUPS_HTTP_DEFAULT */
       * See if we can do authentication...
       */
 
+      int auth_result;
+
       DEBUG_puts("cupsGetResponse: Need authorization...");
 
-      if (!cupsDoAuthentication(http, "POST", resource))
+      if ((auth_result =cupsDoAuthentication(http, "POST", resource)) == 0)
        httpReconnect(http);
+      else if (auth_result < 0)
+        http->status = status = HTTP_FORBIDDEN;
     }
 
 #ifdef HAVE_SSL
@@ -449,7 +456,7 @@ cupsGetResponse(http_t     *http,   /* I - HTTP connection or CUPS_HTTP_DEFAULT */
 
 ssize_t                                        /* O - Bytes read, 0 on EOF, -1 on error */
 cupsReadResponseData(
-    http_t *http,                      /* I - HTTP connection or CUPS_HTTP_DEFAULT */
+    http_t *http,                      /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
     char   *buffer,                    /* I - Buffer to use */
     size_t length)                     /* I - Number of bytes to read */
 {
@@ -492,7 +499,7 @@ cupsReadResponseData(
  */
 
 http_status_t                          /* O - Initial HTTP status */
-cupsSendRequest(http_t     *http,      /* I - HTTP connection or CUPS_HTTP_DEFAULT */
+cupsSendRequest(http_t     *http,      /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
                 ipp_t      *request,   /* I - IPP request */
                 const char *resource,  /* I - Resource path */
                size_t     length)      /* I - Length of data to follow or CUPS_LENGTH_VARIABLE */
@@ -662,15 +669,15 @@ cupsSendRequest(http_t     *http, /* I - HTTP connection or CUPS_HTTP_DEFAULT */
 /*
  * 'cupsWriteRequestData()' - Write additional data after an IPP request.
  *
- * This function is used after cupsSendRequest() or cupsStartDocument()
- * to provide a PPD or document file as needed.
+ * This function is used after @link cupsSendRequest@ to provide a PPD and
+ * after @link cupsStartDocument@ to provide a document file.
  *
  * @since CUPS 1.4@
  */
 
-http_status_t                          /* O - HTTP_CONTINUE if OK or HTTP status on error */
+http_status_t                          /* O - @code HTTP_CONTINUE@ if OK or HTTP status on error */
 cupsWriteRequestData(
-    http_t     *http,                  /* I - HTTP connection or CUPS_HTTP_DEFAULT */
+    http_t     *http,                  /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
     const char *buffer,                        /* I - Bytes to write */
     size_t     length)                 /* I - Number of bytes to write */
 {
index 1441b7f..054b633 100644 (file)
@@ -313,7 +313,7 @@ cupsSNMPOpen(int family)            /* I - Address family - @code AF_INET@ or @code AF_INE
 cups_snmp_t *                          /* O - SNMP packet or @code NULL@ if none */
 cupsSNMPRead(int         fd,           /* I - SNMP socket file descriptor */
              cups_snmp_t *packet,      /* I - SNMP packet buffer */
-            int         msec)          /* I - Timeout in milliseconds */
+            double      timeout)       /* I - Timeout in seconds */
 {
   unsigned char        buffer[CUPS_SNMP_MAX_PACKET];
                                        /* Data packet */
@@ -333,7 +333,7 @@ cupsSNMPRead(int         fd,                /* I - SNMP socket file descriptor */
   * Optionally wait for a response...
   */
 
-  if (msec >= 0)
+  if (timeout >= 0.0)
   {
     int                        ready;          /* Data ready on socket? */
 #ifdef HAVE_POLL
@@ -342,21 +342,22 @@ cupsSNMPRead(int         fd,              /* I - SNMP socket file descriptor */
     pfd.fd     = fd;
     pfd.events = POLLIN;
 
-    while ((ready = poll(&pfd, 1, msec)) < 0 && errno == EINTR);
+    while ((ready = poll(&pfd, 1, (int)(timeout * 1000.0))) < 0 &&
+           errno == EINTR);
 
 #else
     fd_set             input_set;      /* select() input set */
-    struct timeval     timeout;        /* select() timeout */
+    struct timeval     stimeout;       /* select() timeout */
 
     do
     {
       FD_ZERO(&input_set);
       FD_SET(fd, &input_set);
 
-      timeout.tv_sec  = msec / 1000;
-      timeout.tv_usec = (msec % 1000) * 1000;
+      stimeout.tv_sec  = (int)timeout;
+      stimeout.tv_usec = (int)((timeout - stimeout.tv_usec) * 1000000);
 
-      ready = select(fd + 1, &input_set, NULL, NULL, &timeout);
+      ready = select(fd + 1, &input_set, NULL, NULL, &stimeout);
     }
 #  ifdef WIN32
     while (ready < 0 && WSAGetLastError() == WSAEINTR);
@@ -425,6 +426,9 @@ cupsSNMPSetDebug(int level)         /* I - 1 to enable debug output, 0 otherwise */
  *
  * The array pointed to by "prefix" is terminated by the value -1.
  *
+ * If "timeout" is negative, @code cupsSNMPWalk@ will wait for a response
+ * indefinitely.
+ *
  * @since CUPS 1.4@
  */
 
@@ -434,7 +438,7 @@ cupsSNMPWalk(int            fd,             /* I - SNMP socket */
             int            version,    /* I - SNMP version */
             const char     *community, /* I - Community name */
              const int      *prefix,   /* I - OID prefix */
-            int            msec,       /* I - Timeout for each response in milliseconds */
+            double         timeout,    /* I - Timeout for each response in seconds */
             cups_snmp_cb_t cb,         /* I - Function to call for each response */
             void           *data)      /* I - User data pointer that is passed to the callback function */
 {
@@ -466,7 +470,7 @@ cupsSNMPWalk(int            fd,             /* I - SNMP socket */
                       packet.object_name))
       return (-1);
 
-    if (!cupsSNMPRead(fd, &packet, msec))
+    if (!cupsSNMPRead(fd, &packet, timeout))
       return (-1);
 
     if (!cupsSNMPIsOIDPrefixed(&packet, prefix))
index 9f1d8dc..8e5dfa5 100644 (file)
@@ -119,13 +119,13 @@ extern int                cupsSNMPIsOID(cups_snmp_t *packet, const int *oid)
 extern int             cupsSNMPIsOIDPrefixed(cups_snmp_t *packet,
                                              const int *prefix) _CUPS_API_1_4;
 extern int             cupsSNMPOpen(int family) _CUPS_API_1_4;
-extern cups_snmp_t     *cupsSNMPRead(int fd, cups_snmp_t *packet, int msec)
-                           _CUPS_API_1_4;
+extern cups_snmp_t     *cupsSNMPRead(int fd, cups_snmp_t *packet,
+                                     double timeout) _CUPS_API_1_4;
 extern void            cupsSNMPSetDebug(int level) _CUPS_API_1_4;
 extern int             cupsSNMPWalk(int fd, http_addr_t *address, int version,
                                     const char *community, const int *prefix,
-                                    int msec, cups_snmp_cb_t cb, void *data)
-                           _CUPS_API_1_4;
+                                    double timeout, cups_snmp_cb_t cb,
+                                    void *data) _CUPS_API_1_4;
 extern int             cupsSNMPWrite(int fd, http_addr_t *address, int version,
                                      const char *community,
                                      cups_asn1_t request_type,
index 30cbc0c..f258864 100644 (file)
@@ -161,7 +161,7 @@ cupsTempFd(char *filename,          /* I - Pointer to buffer */
  * @deprecated@
  */
 
-char *                                 /* O - Filename or NULL on error */
+char *                                 /* O - Filename or @code NULL@ on error */
 cupsTempFile(char *filename,           /* I - Pointer to buffer */
              int  len)                 /* I - Size of buffer */
 {
@@ -209,7 +209,7 @@ cupsTempFile(char *filename,                /* I - Pointer to buffer */
  * @since CUPS 1.2@
  */
 
-cups_file_t *                          /* O - CUPS file or NULL on error */
+cups_file_t *                          /* O - CUPS file or @code NULL@ on error */
 cupsTempFile2(char *filename,          /* I - Pointer to buffer */
               int  len)                        /* I - Size of buffer */
 {
index e13b238..eb47254 100644 (file)
@@ -268,7 +268,7 @@ show_oid(int         fd,            /* I - SNMP socket */
       printf(".%d", oid[i]);
     puts("):");
 
-    if (cupsSNMPWalk(fd, addr, CUPS_SNMP_VERSION_1, community, oid, 5000,
+    if (cupsSNMPWalk(fd, addr, CUPS_SNMP_VERSION_1, community, oid, 5.0,
                      print_packet, NULL) < 0)
     {
       printf("FAIL (%s)\n", strerror(errno));
@@ -291,9 +291,9 @@ show_oid(int         fd,            /* I - SNMP socket */
 
     puts("PASS");
 
-    fputs("cupsSNMPRead(5000): ", stdout);
+    fputs("cupsSNMPRead(5.0): ", stdout);
 
-    if (!cupsSNMPRead(fd, &packet, 5000))
+    if (!cupsSNMPRead(fd, &packet, 5.0))
     {
       puts("FAIL (timeout)");
       return (0);
index c8d2b28..28b40d0 100644 (file)
@@ -54,7 +54,7 @@ static cups_file_t    *cups_open_client_conf(void);
  * 'cupsEncryption()' - Get the default encryption settings.
  *
  * The default encryption setting comes from the CUPS_ENCRYPTION
- * environment variable, then the ~/.cupsrc file, and finally the
+ * environment variable, then the ~/.cups/client.conf file, and finally the
  * /etc/cups/client.conf file. If not set, the default is
  * @code HTTP_ENCRYPT_IF_REQUESTED@.
  */
index eade62f..a572e6f 100644 (file)
@@ -93,7 +93,7 @@ static int    cups_get_printer_uri(http_t *http, const char *name,
 
 int                                    /* O - 1 on success, 0 on failure */
 cupsCancelJob(const char *name,                /* I - Name of printer or class */
-              int        job_id)       /* I - Job ID */
+              int        job_id)       /* I - Job ID, @code CUPS_JOBID_CURRENT@ for the current job, or @code CUPS_JOBID_ALL@ for all jobs */
 {
   return (cupsCancelJob2(CUPS_HTTP_DEFAULT, name, job_id, 0)
               < IPP_REDIRECTION_OTHER_SITE);
@@ -116,9 +116,9 @@ cupsCancelJob(const char *name,             /* I - Name of printer or class */
  */
 
 ipp_status_t                           /* O - IPP status */
-cupsCancelJob2(http_t     *http,       /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
+cupsCancelJob2(http_t     *http,       /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
                const char *name,       /* I - Name of printer or class */
-               int        job_id,      /* I - Job ID or 0 for the current job, -1 for all jobs */
+               int        job_id,      /* I - Job ID, @code CUPS_JOBID_CURRENT@ for the current job, or @code CUPS_JOBID_ALL@ for all jobs */
               int        purge)        /* I - 1 to purge, 0 to cancel */
 {
   char         uri[HTTP_MAX_URI];      /* Job/printer URI */
@@ -192,18 +192,21 @@ cupsCancelJob2(http_t     *http,  /* I - HTTP connection or @code CUPS_HTTP_DEFAU
 
 
 /*
- * 'cupsCreateJob()' - Create an empty job.
+ * 'cupsCreateJob()' - Create an empty job for streaming.
  *
- * Submit files for printing to the job using the @link cupsStartDocument@,
- * @link cupsWriteRequestData@, and @link cupsFinishDocument@ functions.
+ * Use this function when you want to stream print data using the
+ * @link cupsStartDocument@, @link cupsWriteRequestData@, and
+ * @link cupsFinishDocument@ functions.  If you have one or more files to
+ * print, use the @link cupsPrintFile2@ or @link cupsPrintFiles2@ function
+ * instead.
  *
  * @since CUPS 1.4@
  */
 
 int                                    /* O - Job ID or 0 on error */
 cupsCreateJob(
-    http_t        *http,               /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
-    const char    *name,               /* I - Printer or class name */
+    http_t        *http,               /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
+    const char    *name,               /* I - Destination name */
     const char    *title,              /* I - Title of job */
     int           num_options,         /* I - Number of options */
     cups_option_t *options)            /* I - Options */
@@ -281,8 +284,8 @@ cupsCreateJob(
  */
 
 ipp_status_t                           /* O - Status of document submission */
-cupsFinishDocument(http_t     *http,   /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
-                   const char *name)   /* I - Printer or class name */
+cupsFinishDocument(http_t     *http,   /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
+                   const char *name)   /* I - Destination name */
 {
   char resource[1024];                 /* Printer resource */
 
@@ -450,7 +453,7 @@ cupsGetDefault(void)
  */
 
 const char *                           /* O - Default printer or @code NULL@ */
-cupsGetDefault2(http_t *http)          /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
+cupsGetDefault2(http_t *http)          /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
 {
   ipp_t                *request,               /* IPP Request */
                *response;              /* IPP Response */
@@ -522,7 +525,7 @@ cupsGetDefault2(http_t *http)               /* I - HTTP connection or @code CUPS_HTTP_DEFAULT
 
 int                                    /* O - Number of jobs */
 cupsGetJobs(cups_job_t **jobs,         /* O - Job data */
-            const char *name,          /* I - @code NULL@ = all destinations, otherwise show jobs for mydest */
+            const char *name,          /* I - @code NULL@ = all destinations, otherwise show jobs for named destination */
             int        myjobs,         /* I - 0 = all users, 1 = mine */
            int        whichjobs)       /* I - @code CUPS_WHICHJOBS_ALL@, @code CUPS_WHICHJOBS_ACTIVE@, or @code CUPS_WHICHJOBS_COMPLETED@ */
 {
@@ -547,9 +550,9 @@ cupsGetJobs(cups_job_t **jobs,              /* O - Job data */
  */
 
 int                                    /* O - Number of jobs */
-cupsGetJobs2(http_t     *http,         /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
+cupsGetJobs2(http_t     *http,         /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
              cups_job_t **jobs,                /* O - Job data */
-             const char *name,         /* I - @code NULL@ = all destinations, otherwise show jobs for mydest */
+             const char *name,         /* I - @code NULL@ = all destinations, otherwise show jobs for named destination */
              int        myjobs,                /* I - 0 = all users, 1 = mine */
             int        whichjobs)      /* I - @code CUPS_WHICHJOBS_ALL@, @code CUPS_WHICHJOBS_ACTIVE@, or @code CUPS_WHICHJOBS_COMPLETED@ */
 {
@@ -810,10 +813,13 @@ cupsGetJobs2(http_t     *http,            /* I - HTTP connection or @code CUPS_HTTP_DEFAUL
  *
  * For classes, @code cupsGetPPD@ returns the PPD file for the first printer
  * in the class.
+ *
+ * The returned filename is stored in a static buffer and is overwritten with
+ * each call to @code cupsGetPPD@ or @link cupsGetPPD2@.
  */
 
 const char *                           /* O - Filename for PPD file */
-cupsGetPPD(const char *name)           /* I - Printer name */
+cupsGetPPD(const char *name)           /* I - Destination name */
 {
   _cups_globals_t *cg = _cupsGlobals();        /* Pointer to library globals */
   time_t       modtime = 0;            /* Modification time */
@@ -839,12 +845,15 @@ cupsGetPPD(const char *name)              /* I - Printer name */
  * For classes, @code cupsGetPPD2@ returns the PPD file for the first printer
  * in the class.
  *
+ * The returned filename is stored in a static buffer and is overwritten with
+ * each call to @link cupsGetPPD@ or @code cupsGetPPD2@.
+ *
  * @since CUPS 1.1.21@
  */
 
 const char *                           /* O - Filename for PPD file */
-cupsGetPPD2(http_t     *http,          /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
-            const char *name)          /* I - Printer name */
+cupsGetPPD2(http_t     *http,          /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
+            const char *name)          /* I - Destination name */
 {
   _cups_globals_t *cg = _cupsGlobals();        /* Pointer to library globals */
   time_t       modtime = 0;            /* Modification time */
@@ -878,11 +887,13 @@ cupsGetPPD2(http_t     *http,             /* I - HTTP connection or @code CUPS_HTTP_DEFAULT
  *
  * For classes, @code cupsGetPPD3@ returns the PPD file for the first printer
  * in the class.
+ *
+ * @since CUPS 1.4@
  */
 
 http_status_t                          /* O  - HTTP status */
 cupsGetPPD3(http_t     *http,          /* I  - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
-            const char *name,          /* I  - Printer name */
+            const char *name,          /* I  - Destination name */
            time_t     *modtime,        /* IO - Modification time */
            char       *buffer,         /* I  - Filename buffer */
            size_t     bufsize)         /* I  - Size of filename buffer */
@@ -1181,7 +1192,7 @@ cupsGetPrinters(char ***printers) /* O - Printers */
  */
 
 char *                                 /* O - Name of PPD file or @code NULL@ on error */
-cupsGetServerPPD(http_t     *http,     /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
+cupsGetServerPPD(http_t     *http,     /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
                  const char *name)     /* I - Name of PPD file ("ppd-name") */
 {
   int                  fd;             /* PPD file descriptor */
@@ -1271,7 +1282,7 @@ cupsLastErrorString(void)
  */
 
 int                                    /* O - Job ID or 0 on error */
-cupsPrintFile(const char    *name,     /* I - Printer or class name */
+cupsPrintFile(const char    *name,     /* I - Destination name */
               const char    *filename, /* I - File to print */
              const char    *title,     /* I - Title of job */
               int           num_options,/* I - Number of options */
@@ -1295,8 +1306,8 @@ cupsPrintFile(const char    *name,        /* I - Printer or class name */
 
 int                                    /* O - Job ID or 0 on error */
 cupsPrintFile2(
-    http_t        *http,               /* I - HTTP connection */
-    const char    *name,               /* I - Printer or class name */
+    http_t        *http,               /* I - Connection to server */
+    const char    *name,               /* I - Destination name */
     const char    *filename,           /* I - File to print */
     const char    *title,              /* I - Title of job */
     int           num_options,         /* I - Number of options */
@@ -1318,7 +1329,7 @@ cupsPrintFile2(
 
 int                                    /* O - Job ID or 0 on error */
 cupsPrintFiles(
-    const char    *name,               /* I - Printer or class name */
+    const char    *name,               /* I - Destination name */
     int           num_files,           /* I - Number of files */
     const char    **files,             /* I - File(s) to print */
     const char    *title,              /* I - Title of job */
@@ -1348,8 +1359,8 @@ cupsPrintFiles(
 
 int                                    /* O - Job ID or 0 on error */
 cupsPrintFiles2(
-    http_t        *http,               /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
-    const char    *name,               /* I - Printer or class name */
+    http_t        *http,               /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
+    const char    *name,               /* I - Destination name */
     int           num_files,           /* I - Number of files */
     const char    **files,             /* I - File(s) to print */
     const char    *title,              /* I - Title of job */
@@ -1459,8 +1470,8 @@ cupsPrintFiles2(
 
 http_status_t                          /* O - HTTP status of request */
 cupsStartDocument(
-    http_t     *http,                  /* I - HTTP connection or @code CUPS_HTTP_DEFAULT@ */
-    const char *name,                  /* I - Printer or class name */
+    http_t     *http,                  /* I - Connection to server or @code CUPS_HTTP_DEFAULT@ */
+    const char *name,                  /* I - Destination name */
     int        job_id,                 /* I - Job ID from @link cupsCreateJob@ */
     const char *docname,               /* I - Name of document */
     const char *format,                        /* I - MIME type or @code CUPS_FORMAT_foo@ */
@@ -1589,7 +1600,7 @@ _cupsConnect(void)
 
 static int                             /* O - 1 on success, 0 on failure */
 cups_get_printer_uri(
-    http_t     *http,                  /* I - HTTP connection */
+    http_t     *http,                  /* I - Connection to server */
     const char *name,                  /* I - Name of printer or class */
     char       *host,                  /* I - Hostname buffer */
     int        hostsize,               /* I - Size of hostname buffer */
index 197344c..08c5d8c 100644 (file)
@@ -159,12 +159,10 @@ install:  all $(INSTALL_LANGUAGES)
 
 install-languages:
        for lang in $(LANGUAGES); do \
-               $(INSTALL_DIR) -m 755 $(DOCDIR)/$$lang/images; \
-               if test -f $$lang/index.html; then \
-                       $(INSTALL_MAN) $$lang/index.html $(DOCDIR)/$$lang; \
-               fi; \
-               if test -f $$lang/cups.css; then \
-                       $(INSTALL_MAN) $$lang/cups.css $(DOCDIR)/$$lang; \
+               if test -d $$lang; then \
+                       $(INSTALL_DIR) -m 755 $(DOCDIR)/$$lang/images; \
+                       $(INSTALL_MAN) $$lang/index.html $(DOCDIR)/$$lang 2>/dev/null || true; \
+                       $(INSTALL_MAN) $$lang/cups.css $(DOCDIR)/$$lang 2>/dev/null || true; \
                fi; \
        done
 
index 8369389..5256cae 100644 (file)
@@ -47,13 +47,12 @@ BLOCKQUOTE {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
-  font-weight: bold;
 }
 
 A:link:hover, A:visited:hover, A:active {
   text-decoration: underline;
-  font-weight: bold;
 }
 
 SUB, SUP {
index 8c52260..77fefb0 100644 (file)
@@ -66,6 +66,7 @@ A:link:hover IMG {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
   color: #000099;
 }
index e902ed3..e29419d 100644 (file)
@@ -55,13 +55,12 @@ BLOCKQUOTE {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
-  font-weight: bold;
 }
 
 A:link:hover, A:visited:hover, A:active {
   text-decoration: underline;
-  font-weight: bold;
 }
 
 SUB, SUP {
index 36f7316..654edaf 100644 (file)
@@ -55,13 +55,12 @@ BLOCKQUOTE {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
-  font-weight: bold;
 }
 
 A:link:hover, A:visited:hover, A:active {
   text-decoration: underline;
-  font-weight: bold;
 }
 
 SUB, SUP {
@@ -297,6 +296,7 @@ div.contents ul.subcontents li {
 <ul class="contents">
 </li>
 <li><a href="#OVERVIEW">Overview</a><ul class="subcontents">
+<li><a href="#CLIENTS_AND_SERVERS">Clients and Servers</a></li>
 <li><a href="#PRINTERS_AND_CLASSES">Printers and Classes</a></li>
 <li><a href="#OPTIONS">Options</a></li>
 <li><a href="#PRINT_JOBS">Print Jobs</a></li>
@@ -308,7 +308,7 @@ div.contents ul.subcontents li {
 <li><a href="#cupsAddOption" title="Add an option to an option array.">cupsAddOption</a></li>
 <li><a href="#cupsCancelJob" title="Cancel a print job on the default server.">cupsCancelJob</a></li>
 <li><a href="#cupsCancelJob2" title="Cancel or purge a print job.">cupsCancelJob2</a></li>
-<li><a href="#cupsCreateJob" title="Create an empty job.">cupsCreateJob</a></li>
+<li><a href="#cupsCreateJob" title="Create an empty job for streaming.">cupsCreateJob</a></li>
 <li><a href="#cupsEncryption" title="Get the default encryption settings.">cupsEncryption</a></li>
 <li><a href="#cupsFinishDocument" title="Finish sending a document.">cupsFinishDocument</a></li>
 <li><a href="#cupsFreeDests" title="Free the memory used by the list of destinations.">cupsFreeDests</a></li>
@@ -386,7 +386,7 @@ specified server.">cupsPrintFiles2</a></li>
 </ul></li>
 </ul>
 <!--
-  "$Id: api-cups.shtml 7258 2008-01-28 00:15:05Z mike $"
+  "$Id: api-cups.shtml 7337 2008-02-22 04:44:04Z mike $"
 
   CUPS API introduction for the Common UNIX Printing System (CUPS).
 
@@ -406,13 +406,24 @@ specified server.">cupsPrintFiles2</a></li>
 applications, filters, printer drivers, and backends that need to interface
 with the CUPS scheduler.</p>
 
+<h3><a name='CLIENTS_AND_SERVERS'>Clients and Servers</a></h3>
+
+<p>CUPS is based on the Internet Printing Protocol ("IPP"), which allows
+clients (applications) to communicate with a server (the scheduler) to get a
+list of printers, send print jobs, and so forth. You identify which server
+you want to communicate with using a pointer to the opaque structure
+<code>http_t</code>. All of the examples in this document use the
+<code>CUPS_HTTP_DEFAULT</code> constant, referring to the default connection
+to the scheduler. The <a href='api-httpipp.html' target='_top'>HTTP and IPP
+APIs</a> document provides more information on server connections.</p>
+
 <h3><a name='PRINTERS_AND_CLASSES'>Printers and Classes</a></h3>
 
 <p>Printers and classes (collections of printers) are accessed through
 the <a href="#cups_dest_t"><code>cups_dest_t</code></a> structure which
 includes the name (<code>name</code>), instance (<code>instance</code> -
-a way of selected certain saved options), and the options and attributes
-associated with that destination (<code>num_options</code> and
+a way of selecting certain saved options/settings), and the options and
+attributes associated with that destination (<code>num_options</code> and
 <code>options</code>). Destinations are created using the
 <a href="#cupsGetDests"><code>cupsGetDests</code></a> function and freed
 using the <a href='#cupsFreeDests'><code>cupsFreeDests</code></a> function.
@@ -559,7 +570,8 @@ int num_options = 0;
 <a href='#cups_dest_t'>cups_dest_t</a> *dest;
 
 for (i = 0; i < dest->num_options; i ++)
-  num_options = <a href='#cupsAddOption'>cupsAddOption</a>(dest->options[i].name, dest->options[i].value, num_options, &amp;options);
+  num_options = <a href='#cupsAddOption'>cupsAddOption</a>(dest->options[i].name, dest->options[i].value,
+                              num_options, &amp;options);
 </pre>
 
 <p>Use the <a href='#cupsFreeOptions'><code>cupsFreeOptions</code></a>
@@ -586,7 +598,8 @@ int num_options;
 int job_id;
 
 /* Print a single file */
-job_id = <a href='#cupsPrintFile'>cupsPrintFile</a>(dest->name, "/usr/share/cups/data/testprint.ps", "Test Print", num_options, options);
+job_id = <a href='#cupsPrintFile'>cupsPrintFile</a>(dest->name, "/usr/share/cups/data/testprint.ps",
+                        "Test Print", num_options, options);
 </pre>
 
 <p>The <a href='#cupsPrintFiles'><code>cupsPrintFiles</code></a> function
@@ -624,7 +637,8 @@ int i;
 char buffer[1024];
 
 /* Create the job */
-job_id = <a href='#cupsCreateJob'>cupsCreateJob</a>(CUPS_HTTP_DEFAULT, dest->name, "10 Text Files", num_options, options);
+job_id = <a href='#cupsCreateJob'>cupsCreateJob</a>(CUPS_HTTP_DEFAULT, dest->name, "10 Text Files",
+                       num_options, options);
 
 /* If the job is created, add 10 files */
 if (job_id > 0)
@@ -633,7 +647,8 @@ if (job_id > 0)
   {
     snprintf(buffer, sizeof(buffer), "file%d.txt", i);
 
-    <a href='#cupsStartDocument'>cupsStartDocument</a>(CUPS_HTTP_DEFAULT, dest->name, job_id, buffer, CUPS_FORMAT_TEXT, i == 10);
+    <a href='#cupsStartDocument'>cupsStartDocument</a>(CUPS_HTTP_DEFAULT, dest->name, job_id, buffer,
+                      CUPS_FORMAT_TEXT, i == 10);
 
     snprintf(buffer, sizeof(buffer),
              "File %d\n"
@@ -725,7 +740,7 @@ while (job_state &lt; IPP_JOB_STOPPED)
 <a href='#cupsCancelJob'><code>cupsCancelJob</code></a> function with the
 job ID:</p>
 
-<pre class='exmaple'>
+<pre class='example'>
 #include &lt;cups/cups.h&gt;
 
 <a href='#cups_dest_t'>cups_dest_t</a> *dest;
@@ -883,7 +898,7 @@ int cupsCancelJob (<br>
 <dt>name</dt>
 <dd class="description">Name of printer or class</dd>
 <dt>job_id</dt>
-<dd class="description">Job ID</dd>
+<dd class="description">Job ID, <code>CUPS_JOBID_CURRENT</code> for the current job, or <code>CUPS_JOBID_ALL</code> for all jobs</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 on success, 0 on failure</p>
@@ -905,11 +920,11 @@ ipp_status_t cupsCancelJob2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>name</dt>
 <dd class="description">Name of printer or class</dd>
 <dt>job_id</dt>
-<dd class="description">Job ID or 0 for the current job, -1 for all jobs</dd>
+<dd class="description">Job ID, <code>CUPS_JOBID_CURRENT</code> for the current job, or <code>CUPS_JOBID_ALL</code> for all jobs</dd>
 <dt>purge</dt>
 <dd class="description">1 to purge, 0 to cancel</dd>
 </dl>
@@ -927,7 +942,7 @@ the cause of any failure.
 
 </p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsCreateJob">cupsCreateJob</a></h3>
-<p class="description">Create an empty job.</p>
+<p class="description">Create an empty job for streaming.</p>
 <p class="code">
 int cupsCreateJob (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;http_t *http,<br>
@@ -939,9 +954,9 @@ int cupsCreateJob (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>name</dt>
-<dd class="description">Printer or class name</dd>
+<dd class="description">Destination name</dd>
 <dt>title</dt>
 <dd class="description">Title of job</dd>
 <dt>num_options</dt>
@@ -952,8 +967,11 @@ int cupsCreateJob (<br>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Job ID or 0 on error</p>
 <h4 class="discussion">Discussion</h4>
-<p class="discussion">Submit files for printing to the job using the <a href="#cupsStartDocument"><code>cupsStartDocument</code></a>,
-<a href="#cupsWriteRequestData"><code>cupsWriteRequestData</code></a>, and <a href="#cupsFinishDocument"><code>cupsFinishDocument</code></a> functions.
+<p class="discussion">Use this function when you want to stream print data using the
+<a href="#cupsStartDocument"><code>cupsStartDocument</code></a>, <a href="#cupsWriteRequestData"><code>cupsWriteRequestData</code></a>, and
+<a href="#cupsFinishDocument"><code>cupsFinishDocument</code></a> functions.  If you have one or more files to
+print, use the <a href="#cupsPrintFile2"><code>cupsPrintFile2</code></a> or <a href="#cupsPrintFiles2"><code>cupsPrintFiles2</code></a> function
+instead.
 
 </p>
 <h3 class="function"><a name="cupsEncryption">cupsEncryption</a></h3>
@@ -964,7 +982,7 @@ http_encryption_t cupsEncryption (void);</p>
 <p class="description">Encryption settings</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">The default encryption setting comes from the CUPS_ENCRYPTION
-environment variable, then the ~/.cupsrc file, and finally the
+environment variable, then the ~/.cups/client.conf file, and finally the
 /etc/cups/client.conf file. If not set, the default is
 <code>HTTP_ENCRYPT_IF_REQUESTED</code>.</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsFinishDocument">cupsFinishDocument</a></h3>
@@ -977,9 +995,9 @@ ipp_status_t cupsFinishDocument (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>name</dt>
-<dd class="description">Printer or class name</dd>
+<dd class="description">Destination name</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Status of document submission</p>
@@ -1068,7 +1086,7 @@ const char *cupsGetDefault2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Default printer or <code>NULL</code></p>
@@ -1137,7 +1155,7 @@ int cupsGetDests2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>dests</dt>
 <dd class="description">Destinations</dd>
 </dl>
@@ -1164,7 +1182,7 @@ http_status_t cupsGetFd (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>resource</dt>
 <dd class="description">Resource name</dd>
 <dt>fd</dt>
@@ -1187,7 +1205,7 @@ http_status_t cupsGetFile (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>resource</dt>
 <dd class="description">Resource name</dd>
 <dt>filename</dt>
@@ -1213,7 +1231,7 @@ int cupsGetJobs (<br>
 <dt>jobs</dt>
 <dd class="description">Job data</dd>
 <dt>name</dt>
-<dd class="description"><code>NULL</code> = all destinations, otherwise show jobs for mydest</dd>
+<dd class="description"><code>NULL</code> = all destinations, otherwise show jobs for named destination</dd>
 <dt>myjobs</dt>
 <dd class="description">0 = all users, 1 = mine</dd>
 <dt>whichjobs</dt>
@@ -1239,11 +1257,11 @@ int cupsGetJobs2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>jobs</dt>
 <dd class="description">Job data</dd>
 <dt>name</dt>
-<dd class="description"><code>NULL</code> = all destinations, otherwise show jobs for mydest</dd>
+<dd class="description"><code>NULL</code> = all destinations, otherwise show jobs for named destination</dd>
 <dt>myjobs</dt>
 <dd class="description">0 = all users, 1 = mine</dd>
 <dt>whichjobs</dt>
@@ -1269,9 +1287,9 @@ jobs that are stopped, canceled, aborted, or completed.
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>name</dt>
-<dd class="description">Destination name or <code>NULL</code></dd>
+<dd class="description">Destination name or <code>NULL</code> for the default destination</dd>
 <dt>instance</dt>
 <dd class="description">Instance name or <code>NULL</code></dd>
 </dl>
@@ -1322,13 +1340,16 @@ const char *cupsGetPPD (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>name</dt>
-<dd class="description">Printer name</dd>
+<dd class="description">Destination name</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Filename for PPD file</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">For classes, <code>cupsGetPPD</code> returns the PPD file for the first printer
-in the class.</p>
+in the class.<br>
+<br>
+The returned filename is stored in a static buffer and is overwritten with
+each call to <code>cupsGetPPD</code> or <a href="#cupsGetPPD2"><code>cupsGetPPD2</code></a>.</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.1.21&nbsp;</span><a name="cupsGetPPD2">cupsGetPPD2</a></h3>
 <p class="description">Get the PPD file for a printer from the specified server.</p>
 <p class="code">
@@ -1339,18 +1360,21 @@ const char *cupsGetPPD2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>name</dt>
-<dd class="description">Printer name</dd>
+<dd class="description">Destination name</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Filename for PPD file</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">For classes, <code>cupsGetPPD2</code> returns the PPD file for the first printer
-in the class.
+in the class.<br>
+<br>
+The returned filename is stored in a static buffer and is overwritten with
+each call to <a href="#cupsGetPPD"><code>cupsGetPPD</code></a> or <code>cupsGetPPD2</code>.
 
 </p>
-<h3 class="function"><a name="cupsGetPPD3">cupsGetPPD3</a></h3>
+<h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsGetPPD3">cupsGetPPD3</a></h3>
 <p class="description">Get the PPD file for a printer on the specified
 server if it has changed.</p>
 <p class="code">
@@ -1366,7 +1390,7 @@ http_status_t cupsGetPPD3 (<br>
 <dt>http</dt>
 <dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>name</dt>
-<dd class="description">Printer name</dd>
+<dd class="description">Destination name</dd>
 <dt>modtime</dt>
 <dd class="description">Modification time</dd>
 <dt>buffer</dt>
@@ -1390,7 +1414,9 @@ On success, <code>HTTP_OK</code> is returned for a new PPD file and
 status is an error.<br>
 <br>
 For classes, <code>cupsGetPPD3</code> returns the PPD file for the first printer
-in the class.</p>
+in the class.
+
+</p>
 <h3 class="function"><a name="cupsGetPassword">cupsGetPassword</a></h3>
 <p class="description">Get a password from the user.</p>
 <p class="code">
@@ -1434,7 +1460,7 @@ char *cupsGetServerPPD (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>name</dt>
 <dd class="description">Name of PPD file (&quot;ppd-name&quot;)</dd>
 </dl>
@@ -1530,7 +1556,7 @@ char *cupsNotifySubject (<br>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Subject string or <code>NULL</code></p>
 <h4 class="discussion">Discussion</h4>
-<p class="discussion">The returned string must be freed by the caller using free().
+<p class="discussion">The returned string must be freed by the caller using <code>free</code>.
 
 </p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="cupsNotifyText">cupsNotifyText</a></h3>
@@ -1591,7 +1617,7 @@ int cupsPrintFile (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>name</dt>
-<dd class="description">Printer or class name</dd>
+<dd class="description">Destination name</dd>
 <dt>filename</dt>
 <dd class="description">File to print</dd>
 <dt>title</dt>
@@ -1618,9 +1644,9 @@ int cupsPrintFile2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>name</dt>
-<dd class="description">Printer or class name</dd>
+<dd class="description">Destination name</dd>
 <dt>filename</dt>
 <dd class="description">File to print</dd>
 <dt>title</dt>
@@ -1647,7 +1673,7 @@ int cupsPrintFiles (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>name</dt>
-<dd class="description">Printer or class name</dd>
+<dd class="description">Destination name</dd>
 <dt>num_files</dt>
 <dd class="description">Number of files</dd>
 <dt>files</dt>
@@ -1677,9 +1703,9 @@ int cupsPrintFiles2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>name</dt>
-<dd class="description">Printer or class name</dd>
+<dd class="description">Destination name</dd>
 <dt>num_files</dt>
 <dd class="description">Number of files</dd>
 <dt>files</dt>
@@ -1704,7 +1730,7 @@ http_status_t cupsPutFd (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>resource</dt>
 <dd class="description">Resource name</dd>
 <dt>fd</dt>
@@ -1728,7 +1754,7 @@ http_status_t cupsPutFile (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>resource</dt>
 <dd class="description">Resource name</dd>
 <dt>filename</dt>
@@ -1846,7 +1872,7 @@ int cupsSetDests2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>num_dests</dt>
 <dd class="description">Number of destinations</dd>
 <dt>dests</dt>
@@ -1925,9 +1951,9 @@ http_status_t cupsStartDocument (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or <code>CUPS_HTTP_DEFAULT</code></dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>name</dt>
-<dd class="description">Printer or class name</dd>
+<dd class="description">Destination name</dd>
 <dt>job_id</dt>
 <dd class="description">Job ID from <a href="#cupsCreateJob"><code>cupsCreateJob</code></a></dd>
 <dt>docname</dt>
@@ -1983,7 +2009,7 @@ char *cupsTempFile (<br>
 <dd class="description">Size of buffer</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">Filename or NULL on error</p>
+<p class="description">Filename or <code>NULL</code> on error</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">The temporary filename is returned in the filename buffer.
 This function is deprecated - use <a href="#cupsTempFd"><code>cupsTempFd</code></a> or
@@ -2005,7 +2031,7 @@ cups_file_t *cupsTempFile2 (<br>
 <dd class="description">Size of buffer</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">CUPS file or NULL on error</p>
+<p class="description">CUPS file or <code>NULL</code> on error</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">The temporary filename is returned in the filename buffer.
 The temporary file is opened for writing.
index df491db..ff5b2e1 100644 (file)
@@ -55,13 +55,12 @@ BLOCKQUOTE {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
-  font-weight: bold;
 }
 
 A:link:hover, A:visited:hover, A:active {
   text-decoration: underline;
-  font-weight: bold;
 }
 
 SUB, SUP {
index 2b39752..ed24e8c 100644 (file)
@@ -55,13 +55,12 @@ BLOCKQUOTE {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
-  font-weight: bold;
 }
 
 A:link:hover, A:visited:hover, A:active {
   text-decoration: underline;
-  font-weight: bold;
 }
 
 SUB, SUP {
@@ -944,7 +943,7 @@ int cupsSNMPOpen (<br>
 <a href="#cups_snmp_t">cups_snmp_t</a> *cupsSNMPRead (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int fd,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_snmp_t">cups_snmp_t</a> *packet,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;int msec<br>
+&nbsp;&nbsp;&nbsp;&nbsp;double timeout<br>
 );</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
@@ -952,8 +951,8 @@ int cupsSNMPOpen (<br>
 <dd class="description">SNMP socket file descriptor</dd>
 <dt>packet</dt>
 <dd class="description">SNMP packet buffer</dd>
-<dt>msec</dt>
-<dd class="description">Timeout in milliseconds</dd>
+<dt>timeout</dt>
+<dd class="description">Timeout in seconds</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">SNMP packet or <code>NULL</code> if none</p>
@@ -982,7 +981,7 @@ int cupsSNMPWalk (<br>
 &nbsp;&nbsp;&nbsp;&nbsp;int version,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const char *community,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;const int *prefix,<br>
-&nbsp;&nbsp;&nbsp;&nbsp;int msec,<br>
+&nbsp;&nbsp;&nbsp;&nbsp;double timeout,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;<a href="#cups_snmp_cb_t">cups_snmp_cb_t</a> cb,<br>
 &nbsp;&nbsp;&nbsp;&nbsp;void *data<br>
 );</p>
@@ -998,8 +997,8 @@ int cupsSNMPWalk (<br>
 <dd class="description">Community name</dd>
 <dt>prefix</dt>
 <dd class="description">OID prefix</dd>
-<dt>msec</dt>
-<dd class="description">Timeout for each response in milliseconds</dd>
+<dt>timeout</dt>
+<dd class="description">Timeout for each response in seconds</dd>
 <dt>cb</dt>
 <dd class="description">Function to call for each response</dd>
 <dt>data</dt>
@@ -1011,7 +1010,10 @@ int cupsSNMPWalk (<br>
 <p class="discussion">This function queries all of the OIDs with the specified OID prefix,
 calling the &quot;cb&quot; function for every response that is received.<br>
 <br>
-The array pointed to by &quot;prefix&quot; is terminated by the value -1.
+The array pointed to by &quot;prefix&quot; is terminated by the value -1.<br>
+<br>
+If &quot;timeout&quot; is negative, <code>cupsSNMPWalk</code> will wait for a response
+indefinitely.
 
 </p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.4&nbsp;</span><a name="cupsSNMPWrite">cupsSNMPWrite</a></h3>
index 6939384..04fc4a0 100644 (file)
@@ -55,13 +55,12 @@ BLOCKQUOTE {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
-  font-weight: bold;
 }
 
 A:link:hover, A:visited:hover, A:active {
   text-decoration: underline;
-  font-weight: bold;
 }
 
 SUB, SUP {
@@ -810,7 +809,7 @@ int cupsDoAuthentication (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection to server</dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>method</dt>
 <dd class="description">Request method (&quot;GET&quot;, &quot;POST&quot;, &quot;PUT&quot;)</dd>
 <dt>resource</dt>
@@ -835,19 +834,19 @@ status, prior to resubmitting your request.
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or CUPS_HTTP_DEFAULT</dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>request</dt>
 <dd class="description">IPP request</dd>
 <dt>resource</dt>
 <dd class="description">HTTP resource for POST</dd>
 <dt>filename</dt>
-<dd class="description">File to send or NULL for none</dd>
+<dd class="description">File to send or <code>NULL</code> for none</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Response data</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">This function sends the IPP request to the specified server, retrying
-and authenticating as necessary.  The request is freed with ippDelete()
+and authenticating as necessary.  The request is freed with <a href="#ippDelete"><code>ippDelete</code></a>
 after receiving a valid IPP response.</p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.3&nbsp;</span><a name="cupsDoIORequest">cupsDoIORequest</a></h3>
 <p class="description">Do an IPP request with file descriptors.</p>
@@ -862,7 +861,7 @@ after receiving a valid IPP response.</p>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or CUPS_HTTP_DEFAULT</dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>request</dt>
 <dd class="description">IPP request</dd>
 <dt>resource</dt>
@@ -897,7 +896,7 @@ all of the data after the IPP response message to the file.
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or CUPS_HTTP_DEFAULT</dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>request</dt>
 <dd class="description">IPP request</dd>
 <dt>resource</dt>
@@ -966,12 +965,12 @@ to add the standard groups.
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or CUPS_HTTP_DEFAULT</dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>resource</dt>
 <dd class="description">HTTP resource for POST</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">Response or NULL on HTTP error</p>
+<p class="description">Response or <code>NULL</code> on HTTP error</p>
 <h4 class="discussion">Discussion</h4>
 <p class="discussion">Use this function to get the response for an IPP request sent using
 cupsSendDocument() or cupsSendRequest(). For requests that return
@@ -989,7 +988,7 @@ ssize_t cupsReadResponseData (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or CUPS_HTTP_DEFAULT</dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>buffer</dt>
 <dd class="description">Buffer to use</dd>
 <dt>length</dt>
@@ -1014,7 +1013,7 @@ http_status_t cupsSendRequest (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or CUPS_HTTP_DEFAULT</dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>request</dt>
 <dd class="description">IPP request</dd>
 <dt>resource</dt>
@@ -1045,17 +1044,17 @@ http_status_t cupsWriteRequestData (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection or CUPS_HTTP_DEFAULT</dd>
+<dd class="description">Connection to server or <code>CUPS_HTTP_DEFAULT</code></dd>
 <dt>buffer</dt>
 <dd class="description">Bytes to write</dd>
 <dt>length</dt>
 <dd class="description">Number of bytes to write</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
-<p class="description">HTTP_CONTINUE if OK or HTTP status on error</p>
+<p class="description"><code>HTTP_CONTINUE</code> if OK or HTTP status on error</p>
 <h4 class="discussion">Discussion</h4>
-<p class="discussion">This function is used after cupsSendRequest() or cupsStartDocument()
-to provide a PPD or document file as needed.
+<p class="discussion">This function is used after <a href="#cupsSendRequest"><code>cupsSendRequest</code></a> to provide a PPD and
+after <a href="#cupsStartDocument"><code>cupsStartDocument</code></a> to provide a document file.
 
 </p>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpAddrAny">httpAddrAny</a></h3>
@@ -1249,7 +1248,7 @@ void httpBlocking (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>b</dt>
 <dd class="description">1 = blocking, 0 = non-blocking</dd>
 </dl>
@@ -1262,7 +1261,7 @@ int httpCheck (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 = no data, 1 = data available</p>
@@ -1275,7 +1274,7 @@ void httpClearCookie (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h3 class="function"><a name="httpClearFields">httpClearFields</a></h3>
 <p class="description">Clear HTTP request fields.</p>
@@ -1286,7 +1285,7 @@ void httpClearFields (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h3 class="function"><a name="httpClose">httpClose</a></h3>
 <p class="description">Close an HTTP connection...</p>
@@ -1297,7 +1296,7 @@ void httpClose (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h3 class="function"><a name="httpConnect">httpConnect</a></h3>
 <p class="description">Connect to a HTTP server.</p>
@@ -1384,7 +1383,7 @@ int httpDelete (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>uri</dt>
 <dd class="description">URI to delete</dd>
 </dl>
@@ -1443,7 +1442,7 @@ int httpEncryption (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>e</dt>
 <dd class="description">New encryption preference</dd>
 </dl>
@@ -1458,7 +1457,7 @@ int httpError (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Error code (errno) value</p>
@@ -1471,7 +1470,7 @@ void httpFlush (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h3 class="function"><span class="info">&nbsp;CUPS 1.2&nbsp;</span><a name="httpFlushWrite">httpFlushWrite</a></h3>
 <p class="description">Flush data in write buffer.</p>
@@ -1482,7 +1481,7 @@ int httpFlushWrite (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Bytes written or -1 on error</p>
@@ -1496,7 +1495,7 @@ int httpGet (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>uri</dt>
 <dd class="description">URI to get</dd>
 </dl>
@@ -1511,7 +1510,7 @@ char *httpGetAuthString (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Authorization string</p>
@@ -1531,7 +1530,7 @@ int httpGetBlocking (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">1 if blocking, 0 if non-blocking</p>
@@ -1602,7 +1601,7 @@ int httpGetFd (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">File descriptor or -1 if none</p>
@@ -1616,7 +1615,7 @@ const char *httpGetField (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>field</dt>
 <dd class="description">Field to get</dd>
 </dl>
@@ -1672,7 +1671,7 @@ int httpGetLength (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Content length</p>
@@ -1691,7 +1690,7 @@ off_t httpGetLength2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Content length</p>
@@ -1709,7 +1708,7 @@ http_status_t httpGetStatus (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">HTTP status</p>
@@ -1725,7 +1724,7 @@ char *httpGetSubField (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>field</dt>
 <dd class="description">Field index</dd>
 <dt>name</dt>
@@ -1748,7 +1747,7 @@ char *httpGetSubField2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>field</dt>
 <dd class="description">Field index</dd>
 <dt>name</dt>
@@ -1775,7 +1774,7 @@ char *httpGets (<br>
 <dt>length</dt>
 <dd class="description">Max length of buffer</dd>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">Line or NULL</p>
@@ -1789,7 +1788,7 @@ int httpHead (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>uri</dt>
 <dd class="description">URI for head</dd>
 </dl>
@@ -1872,7 +1871,7 @@ int httpOptions (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>uri</dt>
 <dd class="description">URI for options</dd>
 </dl>
@@ -1888,7 +1887,7 @@ int httpPost (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>uri</dt>
 <dd class="description">URI for post</dd>
 </dl>
@@ -1904,7 +1903,7 @@ int httpPut (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>uri</dt>
 <dd class="description">URI to put</dd>
 </dl>
@@ -1921,7 +1920,7 @@ int httpRead (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>buffer</dt>
 <dd class="description">Buffer for data</dd>
 <dt>length</dt>
@@ -1945,7 +1944,7 @@ ssize_t httpRead2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>buffer</dt>
 <dd class="description">Buffer for data</dd>
 <dt>length</dt>
@@ -1962,7 +1961,7 @@ int httpReconnect (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">0 on success, non-zero on failure</p>
@@ -2096,7 +2095,7 @@ void httpSetAuthString (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>scheme</dt>
 <dd class="description">Auth scheme (NULL to clear it)</dd>
 <dt>data</dt>
@@ -2133,7 +2132,7 @@ void httpSetExpect (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>expect</dt>
 <dd class="description">HTTP status to expect (HTTP_CONTINUE)</dd>
 </dl>
@@ -2152,7 +2151,7 @@ void httpSetField (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>field</dt>
 <dd class="description">Field index</dd>
 <dt>value</dt>
@@ -2168,7 +2167,7 @@ void httpSetLength (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>length</dt>
 <dd class="description">Length (0 for chunked)</dd>
 </dl>
@@ -2195,7 +2194,7 @@ int httpTrace (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>uri</dt>
 <dd class="description">URI for trace</dd>
 </dl>
@@ -2210,7 +2209,7 @@ http_status_t httpUpdate (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 </dl>
 <h4 class="returnvalue">Return Value</h4>
 <p class="description">HTTP status</p>
@@ -2224,7 +2223,7 @@ int httpWait (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>msec</dt>
 <dd class="description">Milliseconds to wait</dd>
 </dl>
@@ -2241,7 +2240,7 @@ int httpWrite (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>buffer</dt>
 <dd class="description">Buffer for data</dd>
 <dt>length</dt>
@@ -2265,7 +2264,7 @@ ssize_t httpWrite2 (<br>
 <h4 class="parameters">Parameters</h4>
 <dl>
 <dt>http</dt>
-<dd class="description">HTTP connection</dd>
+<dd class="description">Connection to server</dd>
 <dt>buffer</dt>
 <dd class="description">Buffer for data</dd>
 <dt>length</dt>
index 246db79..d5d3358 100644 (file)
@@ -55,13 +55,12 @@ BLOCKQUOTE {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
-  font-weight: bold;
 }
 
 A:link:hover, A:visited:hover, A:active {
   text-decoration: underline;
-  font-weight: bold;
 }
 
 SUB, SUP {
index d332ca6..c545daf 100644 (file)
@@ -55,13 +55,12 @@ BLOCKQUOTE {
 }
 
 A:link, A:visited {
+  font-weight: normal;
   text-decoration: none;
-  font-weight: bold;
 }
 
 A:link:hover, A:visited:hover, A:active {
   text-decoration: underline;
-  font-weight: bold;
 }
 
 SUB, SUP {
index a6cc625..39768d5 100644 (file)
@@ -31,7 +31,8 @@ process using the startup script for your operating system:</P>
 
        <LI>MacOS X:
        <PRE CLASS="command">
-/System/Library/StartupItems/PrintingServices/PrintingServices restart
+sudo launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist
+sudo launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist
        </PRE></LI>
 
 </UL>
index f15174f..4c22d49 100644 (file)
@@ -47,8 +47,8 @@ _cupsImageReadJPEG(
   struct jpeg_error_mgr        jerr;           /* Error handler info */
   cups_ib_t            *in,            /* Input pixels */
                        *out;           /* Output pixels */
-  char                 header[16];     /* Photoshop JPEG header */
-  int                  psjpeg;         /* Non-zero if Photoshop JPEG */
+  jpeg_saved_marker_ptr        marker;         /* Pointer to marker data */
+  int                  psjpeg = 0;     /* Non-zero if Photoshop CMYK JPEG */
   static const char    *cspaces[] =
                        {               /* JPEG colorspaces... */
                          "JCS_UNKNOWN",
@@ -60,24 +60,31 @@ _cupsImageReadJPEG(
                        };
 
 
- /*
-  * Read the first 16 bytes to determine if this is a Photoshop JPEG file...
-  */
-
-  fread(header, sizeof(header), 1, fp);
-  rewind(fp);
-
-  psjpeg = memcmp(header + 6, "Photoshop ", 10) == 0;
-
  /*
   * Read the JPEG header...
   */
 
   cinfo.err = jpeg_std_error(&jerr);
   jpeg_create_decompress(&cinfo);
+  jpeg_save_markers(&cinfo, JPEG_APP0 + 14, 0xffff); /* Adobe JPEG */
   jpeg_stdio_src(&cinfo, fp);
   jpeg_read_header(&cinfo, 1);
 
+ /*
+  * Parse any Adobe APPE data embedded in the JPEG file.  Since Adobe doesn't
+  * bother following standards, we have to invert the CMYK JPEG data written by
+  * Adobe apps...
+  */
+
+  for (marker = cinfo.marker_list; marker; marker = marker->next)
+    if (marker->marker == (JPEG_APP0 + 14) && marker->data_length >= 12 &&
+        !memcmp(marker->data, "Adobe", 5) && marker->data[11] == 2)
+    {
+      fputs("DEBUG: Adobe CMYK JPEG detected (inverting color values)\n",
+           stderr);
+      psjpeg = 1;
+    }
+
   cinfo.quantize_colors = 0;
 
   fprintf(stderr, "DEBUG: num_components = %d\n", cinfo.num_components);
index 6a137e4..7aa8304 100644 (file)
@@ -3,7 +3,7 @@
 .\"
 .\"   lpadmin man page for the Common UNIX Printing System (CUPS).
 .\"
-.\"   Copyright 2007 by Apple Inc.
+.\"   Copyright 2007-2008 by Apple Inc.
 .\"   Copyright 1997-2006 by Easy Software Products.
 .\"
 .\"   These coded instructions, statements, and computer programs are the
@@ -12,7 +12,7 @@
 .\"   which should have been included with this file.  If this file is
 .\"   file is missing or damaged, see the license at "http://www.cups.org/".
 .\"
-.TH lppasswd 1 "Common UNIX Printing System" "20 March 2006" "Apple Inc."
+.TH lppasswd 1 "Common UNIX Printing System" "22 February 2008" "Apple Inc."
 .SH NAME
 lppasswd \- add, change, or delete digest passwords.
 .SH SYNOPSIS
@@ -45,17 +45,24 @@ file. Digest usernames do not have to match local UNIX usernames.
 .br
 Specifies a group other than the default system group.
 .SH SECURITY ISSUES
-The \fIlppasswd\fR command is installed setuid to root. While
-every attempt has been made to make it secure against exploits
-that could grant super-user privileges to unprivileged users,
-paranoid system administrators may wish to disable or change the
-ownership of the program to an unprivileged account.
+By default, the \fIlppasswd\fR program is not installed to allow ordinary
+users to change their passwords. To enable this, the \fIlppasswd\fR command
+must be made setuid to root with the command:
+.br
+.nf
+chmod u+s lppasswd
+.fi
+.PP
+While every attempt has been made to make \fIlppasswd\fR secure against
+exploits that could grant super-user privileges to unprivileged users,
+paranoid system administrators may wish to use Basic authentication with
+accounts managed by PAM instead.
 .SH SEE ALSO
 \fIlp(1)\fR, \fIlpr(1)\fR,
 .br
 http://localhost:631/help
 .SH COPYRIGHT
-Copyright 2007 by Apple Inc.
+Copyright 2007-2008 by Apple Inc.
 .\"
 .\" End of "$Id: lppasswd.man 6649 2007-07-11 21:46:42Z mike $".
 .\"
index 705885d..6030ee6 100644 (file)
@@ -318,7 +318,7 @@ f 0755 root sys $BINDIR/cupstestdsc systemv/cupstestdsc
 f 0755 root sys $BINDIR/cupstestppd systemv/cupstestppd
 f 0755 root sys $BINDIR/lp systemv/lp
 f 0755 root sys $BINDIR/lpoptions systemv/lpoptions
-f 4755 root sys $BINDIR/lppasswd systemv/lppasswd
+f 0755 root sys $BINDIR/lppasswd systemv/lppasswd
 f 0755 root sys $BINDIR/lpq berkeley/lpq
 f 0755 root sys $BINDIR/lpr berkeley/lpr
 f 0755 root sys $BINDIR/lprm berkeley/lprm
index 517a940..c9a8204 100644 (file)
@@ -684,9 +684,12 @@ list_ppds(int        request_id,   /* I - Request ID */
   * Load PPDs from LSB-defined locations...
   */
 
-  load_ppds("/usr/local/share/ppd", "lsb/local", 1);
-  load_ppds("/usr/share/ppd", "lsb/usr", 1);
-  load_ppds("/opt/share/ppd", "lsb/opt", 1);
+  if (!access("/usr/local/share/ppd", 0))
+    load_ppds("/usr/local/share/ppd", "lsb/local", 1);
+  if (!access("/usr/share/ppd", 0))
+    load_ppds("/usr/share/ppd", "lsb/usr", 1);
+  if (!access("/opt/share/ppd", 0))
+    load_ppds("/opt/share/ppd", "lsb/opt", 1);
 #endif /* __APPLE__ */
 
  /*
index eafb6fd..507ecf2 100644 (file)
@@ -3912,16 +3912,15 @@ update_lpd(int onoff)                   /* - 1 = turn on, 0 = turn off */
         snprintf(line, sizeof(line), "\tdisable = %s",
                 onoff ? "no" : "yes");
       }
-      else if (strstr(line, "disable ="))
-        continue;
-
-      cupsFilePrintf(nfp, "%s\n", line);
+      else if (!strstr(line, "disable ="))
+        cupsFilePrintf(nfp, "%s\n", line);
     }
 
     cupsFileClose(nfp);
     cupsFileClose(ofp);
     rename(newfile, LPDConfigFile + 9);
   }
+#ifdef __APPLE__
   else if (!strncmp(LPDConfigFile, "launchd:///", 11))
   {
    /*
@@ -3943,6 +3942,9 @@ update_lpd(int onoff)                     /* - 1 = turn on, 0 = turn off */
     cupsdStartProcess("/bin/launchctl", argv, envp, -1, -1, -1, -1, -1, 1,
                       NULL, &pid);
   }
+#endif /* __APPLE__ */
+  else
+    cupsdLogMessage(CUPSD_LOG_INFO, "Unknown LPDConfigFile scheme!");
 }
 
 
@@ -4038,27 +4040,8 @@ update_smb(int onoff)                    /* I - 1 = turn on, 0 = turn off */
     cupsFileClose(ofp);
     rename(newfile, SMBConfigFile + 8);
   }
-  else if (!strncmp(SMBConfigFile, "launchd:///", 11))
-  {
-   /*
-    * Enable/disable SMB via the launchctl command...
-    */
-
-    char       *argv[5],               /* Arguments for command */
-               *envp[MAX_ENV];         /* Environment for command */
-    int                pid;                    /* Process ID */
-
-
-    cupsdLoadEnv(envp, (int)(sizeof(envp) / sizeof(envp[0])));
-    argv[0] = (char *)"launchctl";
-    argv[1] = (char *)(onoff ? "load" : "unload");
-    argv[2] = (char *)"-w";
-    argv[3] = SMBConfigFile + 10;
-    argv[4] = NULL;
-
-    cupsdStartProcess("/bin/launchctl", argv, envp, -1, -1, -1, -1, -1, 1,
-                      NULL, &pid);
-  }
+  else
+    cupsdLogMessage(CUPSD_LOG_INFO, "Unknown SMBConfigFile scheme!");
 }
 
 
index 6b964d8..183b839 100644 (file)
  *
  * Contents:
  *
- *   cupsdProcessIPPRequest()    - Process an incoming IPP request.
- *   cupsdTimeoutJob()           - Timeout a job waiting on job files.
- *   accept_jobs()               - Accept print jobs to a printer.
- *   add_class()                 - Add a class to the system.
- *   add_file()                  - Add a file to a job.
- *   add_job()                   - Add a job to a print queue.
- *   add_job_state_reasons()     - Add the "job-state-reasons" attribute based
- *                                 upon the job and printer state...
- *   add_job_subscriptions()     - Add any subcriptions for a job.
- *   add_job_uuid()              - Add job-uuid attribute to a job.
- *   add_printer()               - Add a printer to the system.
- *   add_printer_state_reasons() - Add the "printer-state-reasons" attribute
- *                                 based upon the printer state...
- *   add_queued_job_count()      - Add the "queued-job-count" attribute for
- *   apply_printer_defaults()    - Apply printer default options to a job.
- *   authenticate_job()          - Set job authentication info.
- *   cancel_all_jobs()           - Cancel all print jobs.
- *   cancel_job()                - Cancel a print job.
- *   cancel_subscription()       - Cancel a subscription.
- *   check_quotas()              - Check quotas for a printer and user.
- *   copy_attribute()            - Copy a single attribute.
- *   copy_attrs()                - Copy attributes from one request to another.
- *   copy_banner()               - Copy a banner file to the requests directory
- *                                 for the specified job.
- *   copy_file()                 - Copy a PPD file or interface script...
- *   copy_model()                - Copy a PPD model file, substituting default
- *                                 values as needed...
- *   copy_job_attrs()            - Copy job attributes.
- *   copy_printer_attrs()        - Copy printer attributes.
- *   copy_subscription_attrs()   - Copy subscription attributes.
- *   create_job()                - Print a file to a printer or class.
- *   create_requested_array()    - Create an array for the requested-attributes.
- *   create_subscription()       - Create a notification subscription.
- *   delete_printer()            - Remove a printer or class from the system.
- *   get_default()               - Get the default destination.
- *   get_devices()               - Get the list of available devices on the
- *                                 local system.
- *   get_document()              - Get a copy of a job file.
- *   get_job_attrs()             - Get job attributes.
- *   get_jobs()                  - Get a list of jobs for the specified printer.
- *   get_notifications()         - Get events for a subscription.
- *   get_ppd()                   - Get a named PPD from the local system.
- *   get_ppds()                  - Get the list of PPD files on the local
- *                                 system.
- *   get_printer_attrs()         - Get printer attributes.
- *   get_printers()              - Get a list of printers.
- *   get_subscription_attrs()    - Get subscription attributes.
- *   get_subscriptions()         - Get subscriptions.
- *   get_username()              - Get the username associated with a request.
- *   hold_job()                  - Hold a print job.
- *   move_job()                  - Move a job to a new destination.
- *   ppd_parse_line()            - Parse a PPD default line.
- *   print_job()                 - Print a file to a printer or class.
- *   read_ps_line()              - Read a line from a PS file...
- *   read_ps_job_ticket()        - Reads a job ticket embedded in a PS file.
- *   reject_jobs()               - Reject print jobs to a printer.
- *   release_job()               - Release a held print job.
- *   restart_job()               - Restart an old print job.
- *   save_auth_info()            - Save authentication information for a job.
- *   save_krb5_creds()           - Save Kerberos credentials for a job.
- *   send_document()             - Send a file to a printer or class.
- *   send_http_error()           - Send a HTTP error back to the IPP client.
- *   send_ipp_status()           - Send a status back to the IPP client.
- *   set_default()               - Set the default destination...
- *   set_job_attrs()             - Set job attributes.
- *   set_printer_defaults()      - Set printer default options from a request.
- *   start_printer()             - Start a printer.
- *   stop_printer()              - Stop a printer.
- *   url_encode_attr()           - URL-encode a string attribute.
- *   url_encode_string()         - URL-encode a string.
- *   user_allowed()              - See if a user is allowed to print to a queue.
- *   validate_job()              - Validate printer options and destination.
- *   validate_name()             - Make sure the printer name only contains
- *                                 valid chars.
- *   validate_user()             - Validate the user for the request.
  */
 
 /*
 #endif /* HAVE_LIBPAPER */
 
 #ifdef __APPLE__
+#  include <ApplicationServices/ApplicationServices.h>
+#  include <CoreFoundation/CoreFoundation.h>
 #  ifdef HAVE_MEMBERSHIP_H
 #    include <membership.h>
 #  endif /* HAVE_MEMBERSHIP_H */
@@ -135,6 +62,13 @@ static void add_printer(cupsd_client_t *con, ipp_attribute_t *uri);
 static void    add_printer_state_reasons(cupsd_client_t *con,
                                          cupsd_printer_t *p);
 static void    add_queued_job_count(cupsd_client_t *con, cupsd_printer_t *p);
+#ifdef __APPLE__
+static unsigned        apple_hash_name(const char *name);
+static void    apple_init_profile(CMDeviceProfileInfo *profile, unsigned id,
+                                  const char *name, const char *iccfile);
+static void    apple_register_profiles(cupsd_printer_t *p);
+static void    apple_unregister_profiles(cupsd_printer_t *p);
+#endif /* __APPLE__ */
 static void    apply_printer_defaults(cupsd_printer_t *printer,
                                       cupsd_job_t *job);
 static void    authenticate_job(cupsd_client_t *con, ipp_attribute_t *uri);
@@ -2556,12 +2490,10 @@ add_printer(cupsd_client_t  *con,       /* I - Client connection */
                          strerror(errno));
          return;
        }
-       else
-       {
-          cupsdLogMessage(CUPSD_LOG_DEBUG,
-                         "Copied interface script successfully!");
-          chmod(dstfile, 0755);
-       }
+
+       cupsdLogMessage(CUPSD_LOG_DEBUG,
+                       "Copied interface script successfully!");
+       chmod(dstfile, 0755);
       }
 
       snprintf(dstfile, sizeof(dstfile), "%s/ppd/%s.ppd", ServerRoot,
@@ -2581,12 +2513,19 @@ add_printer(cupsd_client_t  *con,       /* I - Client connection */
                          strerror(errno));
          return;
        }
-       else
-       {
-          cupsdLogMessage(CUPSD_LOG_DEBUG,
-                         "Copied PPD file successfully!");
-          chmod(dstfile, 0644);
-       }
+
+       cupsdLogMessage(CUPSD_LOG_DEBUG,
+                       "Copied PPD file successfully!");
+       chmod(dstfile, 0644);
+
+#ifdef __APPLE__
+       /*
+        * (Re)register color profiles...
+       */
+
+        apple_unregister_profiles(printer);
+       apple_register_profiles(printer);
+#endif /* __APPLE__ */
       }
       else
       {
@@ -2636,12 +2575,19 @@ add_printer(cupsd_client_t  *con,       /* I - Client connection */
         send_ipp_status(con, IPP_INTERNAL_ERROR, _("Unable to copy PPD file!"));
        return;
       }
-      else
-      {
-        cupsdLogMessage(CUPSD_LOG_DEBUG,
-                       "Copied PPD file successfully!");
-        chmod(dstfile, 0644);
-      }
+
+      cupsdLogMessage(CUPSD_LOG_DEBUG,
+                     "Copied PPD file successfully!");
+      chmod(dstfile, 0644);
+
+#ifdef __APPLE__
+     /*
+      * (Re)register color profiles...
+      */
+
+      apple_unregister_profiles(printer);
+      apple_register_profiles(printer);
+#endif /* __APPLE__ */
     }
   }
 
@@ -2788,6 +2734,339 @@ add_queued_job_count(
 }
 
 
+#ifdef __APPLE__
+/*
+ * 'apple_hash_name()' - Calculate a 32-bit hash of a printer/profile name.
+ */
+
+static unsigned                                /* O - Hash value */
+apple_hash_name(const char *name)      /* I - Printer/profile name */
+{
+  int          mult;                   /* Multiplier */
+  unsigned     hash = 0;               /* Hash value */
+
+
+  for (mult = 1; *name && mult <= 128; mult ++, name ++)
+    hash += (*name & 255) & mult;
+
+  return (hash);
+}
+
+
+/*
+ * 'apple_init_profile()' - Initialize a color profile.
+ */
+
+static void
+apple_init_profile(
+    CMDeviceProfileInfo *profile,      /* I - Profile record */
+    unsigned            id,            /* I - Profile ID */
+    const char          *name,         /* I - Profile name */
+    const char          *iccfile)      /* I - ICC filename */
+{
+  char                 url[1024];      /* URL for profile filename */
+  CFMutableDictionaryRef dict;         /* Dictionary for name */
+
+
+  if (iccfile)
+    httpAssembleURI(HTTP_URI_CODING_ALL, url, sizeof(url), "file", NULL, "", 0,
+                   iccfile);
+
+  dict = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
+                                  &kCFTypeDictionaryKeyCallBacks,
+                                  &kCFTypeDictionaryValueCallBacks);
+
+  profile->dataVersion        = cmDeviceProfileInfoVersion1;
+  profile->profileID          = id;
+  profile->profileLoc.locType = iccfile ? cmPathBasedProfile : cmNoProfileBase;
+  profile->profileName        = dict;
+
+  if (iccfile)
+    strlcpy(profile->profileLoc.u.pathLoc.path, iccfile,
+           sizeof(profile->profileLoc.u.pathLoc.path));
+
+  CFDictionarySetValue(dict, CFSTR("PMColorDeviceProfileID"),
+                      CFNumberCreate(kCFAllocatorDefault,
+                                     kCFNumberSInt32Type,
+                                     &profile->profileID));
+  CFDictionarySetValue(dict, CFSTR("PMColorDeviceProfileName"),
+                      CFStringCreateWithCString(kCFAllocatorDefault,
+                                                name,
+                                                kCFStringEncodingUTF8));
+  if (iccfile)
+    CFDictionarySetValue(dict, CFSTR("PMColorDeviceProfileURL"),
+                        CFStringCreateWithCString(kCFAllocatorDefault,
+                                                  url,
+                                                  kCFStringEncodingUTF8));
+}
+
+
+/*
+ * 'apple_register_profiles()' - Register color profiles for a printer.
+ */
+
+static void
+apple_register_profiles(
+    cupsd_printer_t *p)                        /* I - Printer */
+{
+  int                  i;              /* Looping var */
+  char                 ppdfile[1024],  /* PPD filename */
+                       iccfile[1024];  /* ICC filename */
+  ppd_file_t           *ppd;           /* PPD file */
+  ppd_attr_t           *attr;          /* cupsICCProfile attributes */
+  ppd_option_t         *cm_option;     /* Color model option */
+  ppd_choice_t         *cm_choice;     /* Color model choice */
+  int                  num_profiles;   /* Number of profiles */
+  CMError              error;          /* Last error */
+  unsigned             id;             /* Printer device ID */
+  CFMutableDictionaryRef name;         /* Printer device name dictionary */
+  CMDeviceScope                scope =         /* Scope of the registration */
+                       {
+                         kCFPreferencesAnyUser,
+                         kCFPreferencesCurrentHost
+                       };
+  CMDeviceProfileArrayPtr profiles;    /* Profiles */
+  CMDeviceProfileInfo  *profile;       /* Current profile */
+
+
+ /*
+  * Try opening the PPD file for this printer...
+  */
+
+  snprintf(ppdfile, sizeof(ppdfile), "%s/ppd/%s.ppd", ServerRoot, p->name);
+  if ((ppd = ppdOpenFile(ppdfile)) == NULL)
+    return;
+
+ /*
+  * See if we have any profiles...
+  */
+
+  for (num_profiles = 0, attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
+       attr;
+       attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
+    if (attr->spec[0] && attr->value && attr->value[0])
+    {
+      if (attr->value[0] != '/')
+       snprintf(iccfile, sizeof(iccfile), "%s/profiles/%s", DataDir,
+                attr->value);
+      else
+       strlcpy(iccfile, attr->value, sizeof(iccfile));
+
+      if (access(iccfile, 0))
+       continue;
+
+      num_profiles ++;
+    }
+
+ /*
+  * If we have profiles, add them...
+  */
+
+  if (num_profiles > 0)
+  {
+   /*
+    * Build the array of profiles...
+    *
+    * Note: This calloc actually requests slightly more memory than needed.
+    */
+
+    if ((profiles = calloc(num_profiles, sizeof(CMDeviceProfileArray))) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                      "Unable to allocate memory for %d profiles!",
+                     num_profiles);
+      ppdClose(ppd);
+      return;
+    }
+
+    profiles->profileCount = num_profiles;
+
+    for (profile = profiles->profiles,
+             attr = ppdFindAttr(ppd, "cupsICCProfile", NULL);
+        attr;
+        attr = ppdFindNextAttr(ppd, "cupsICCProfile", NULL))
+      if (attr->spec[0] && attr->value && attr->value[0])
+      {
+       /*
+        * Add this profile...
+       */
+
+        if (attr->value[0] != '/')
+         snprintf(iccfile, sizeof(iccfile), "%s/profiles/%s", DataDir,
+                  attr->value);
+        else
+         strlcpy(iccfile, attr->value, sizeof(iccfile));
+
+        if (access(iccfile, 0))
+         continue;
+
+        apple_init_profile(profile, apple_hash_name(attr->spec), attr->spec,
+                          iccfile);
+
+       profile ++;
+      }
+  }
+  else if ((cm_option = ppdFindOption(ppd, "ColorModel")) != NULL)
+  {
+   /*
+    * Extract standard grayscale, RGB, or CMYK profiles...
+    */
+
+    for (num_profiles = 0, i = cm_option->num_choices,
+             cm_choice = cm_option->choices;
+         i > 0;
+        i --, cm_choice ++)
+      if (!strcmp(cm_choice->choice, "Gray") ||
+          !strcmp(cm_choice->choice, "RGB") ||
+          !strcmp(cm_choice->choice, "CMYK"))
+        num_profiles ++; 
+
+   /*
+    * Build the array of profiles...
+    *
+    * Note: This calloc actually requests slightly more memory than needed.
+    */
+
+    if ((profiles = calloc(num_profiles, sizeof(CMDeviceProfileArray))) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                      "Unable to allocate memory for %d profiles!",
+                     num_profiles);
+      ppdClose(ppd);
+      return;
+    }
+
+    profiles->profileCount = num_profiles;
+
+    for (profile = profiles->profiles, i = cm_option->num_choices,
+             cm_choice = cm_option->choices;
+         i > 0;
+        i --, cm_choice ++)
+      if (!strcmp(cm_choice->choice, "Gray"))
+      {
+        apple_init_profile(profile, apple_hash_name("Gray.."), "Gray", NULL);
+       profile ++;
+      }
+      else if (!strcmp(cm_choice->choice, "RGB"))
+      {
+        apple_init_profile(profile, apple_hash_name("RGB.."), "RGB", NULL);
+       profile ++;
+      }
+      else if (!strcmp(cm_choice->choice, "CMYK"))
+      {
+        apple_init_profile(profile, apple_hash_name("CMYK.."), "CMYK", NULL);
+       profile ++;
+      }
+  }
+  else
+  {
+   /*
+    * Use the default colorspace...
+    */
+
+    num_profiles = 1;
+    
+    if ((profiles = calloc(1, sizeof(CMDeviceProfileArray))) == NULL)
+    {
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                      "Unable to allocate memory for %d profiles!",
+                     num_profiles);
+      ppdClose(ppd);
+      return;
+    }
+
+    profiles->profileCount = 1;
+
+    switch (ppd->colorspace)
+    {
+      case PPD_CS_GRAY :
+          apple_init_profile(profiles->profiles, apple_hash_name("Gray.."),
+                            "Gray", NULL);
+          break;
+      case PPD_CS_RGB :
+          apple_init_profile(profiles->profiles, apple_hash_name("RGB.."),
+                            "RGB", NULL);
+          break;
+      case PPD_CS_CMYK :
+          apple_init_profile(profiles->profiles, apple_hash_name("CMYK.."),
+                            "CMYK", NULL);
+          break;
+
+      default :
+          free(profiles);
+         num_profiles = 0;
+         break;
+    }
+  }
+
+  if (num_profiles > 0)
+  {
+   /*
+    * Get the device ID hash and pathelogical name dictionary.
+    */
+
+    cupsdLogMessage(CUPSD_LOG_INFO, "Registering ICC color profiles for \"%s\"",
+                   p->name);
+
+    id   = apple_hash_name(p->name);
+    name = CFDictionaryCreateMutable(kCFAllocatorDefault, 0,
+                                    &kCFTypeDictionaryKeyCallBacks,
+                                    &kCFTypeDictionaryValueCallBacks);
+
+    CFDictionarySetValue(name, CFSTR("en"),
+                        CFStringCreateWithCString(kCFAllocatorDefault, p->name,
+                                                  kCFStringEncodingUTF8));
+
+   /*
+    * Register the device with ColorSync...
+    */
+
+    error = CMRegisterColorDevice(cmPrinterDeviceClass, id, name, &scope);
+
+   /*
+    * Register the profiles...
+    */
+
+    if (error == noErr)
+      error = CMSetDeviceFactoryProfiles(cmPrinterDeviceClass, id,
+                                        profiles->profiles[0].profileID,
+                                        profiles);
+
+   /*
+    * Clean up...
+    */
+
+    if (error != noErr)
+      cupsdLogMessage(CUPSD_LOG_ERROR,
+                     "Unable to register ICC color profiles for \"%s\" - %d",
+                     p->name, (int)error);
+
+    for (profile = profiles->profiles;
+        num_profiles > 0;
+        profile ++, num_profiles --)
+      CFRelease(profile->profileName);
+
+    free(profiles);
+    CFRelease(name);
+  }
+
+  ppdClose(ppd);
+}
+
+
+/*
+ * 'apple_unregister_profiles()' - Remove color profiles for the specified
+ *                                 printer.
+ */
+
+static void
+apple_unregister_profiles(
+    cupsd_printer_t *p)                        /* I - Printer */
+{
+  CMUnregisterColorDevice(cmPrinterDeviceClass, apple_hash_name(p->name));
+}
+#endif /* __APPLE__ */
+
 /*
  * 'apply_printer_defaults()' - Apply printer default options to a job.
  */
@@ -5565,6 +5844,14 @@ delete_printer(cupsd_client_t  *con,     /* I - Client connection */
            printer->name);
   unlink(filename);
 
+#ifdef __APPLE__
+ /*
+  * Unregister color profiles...
+  */
+
+  apple_unregister_profiles(printer);
+#endif /* __APPLE__ */
+
   if (dtype & CUPS_PRINTER_CLASS)
   {
     cupsdLogMessage(CUPSD_LOG_INFO, "Class \"%s\" deleted by \"%s\".",
diff --git a/scripting/java/CUPSPrinter.java b/scripting/java/CUPSPrinter.java
deleted file mode 100644 (file)
index a6d7a30..0000000
+++ /dev/null
@@ -1,438 +0,0 @@
-//
-import java.io.*;
-import java.net.*;
-import java.util.*;
-
-public class CUPSPrinter
-{
-  String          printer_name;
-  String          printer_location;
-  String          printer_info;
-  String          printer_more_info;
-
-  String[]        printer_uri_supported;          // Strings
-  String[]        uri_authentication_supported;   // Strings
-  String[]        uri_security_supported;         // Strings
-
-  String          attributes_charset;
-  String          attributes_natural_language;
-
-  int             printer_state;
-  String          printer_state_reasons;
-
-  boolean         printer_is_accepting_jobs;
-
-  long            printer_up_time;
-  long            printer_current_time;
-
-  int             queued_job_count;
-
-  String[]        pdl_override_supported;
-  String[]        ipp_versions_supported;
-
-  int[]           operations_supported;    //  Integers
-
-  boolean         multiple_document_jobs_supported;
-  int             multiple_operation_time_out;
-  int[]           multiple_document_handling_supported;  // Integers
-
-  String          charset_configured;
-  String          natural_language_configured;
-  String          generated_natural_language_supported;
-  String[]        charset_supported;       //  Strings
-
-  String          document_format_default;
-  String[]        document_format_supported;   // Strings
-
-  String[]        compression_supported;       //  Strings
-
-  int             job_priority_default;
-  int             job_priority_supported;
-
-  int             copies_default;
-  int             lower_copies_supported;
-  int             upper_copies_supported;
-
-  boolean         page_ranges_supported;
-
-  int             number_up_default;
-  int[]           number_up_supported;    // integers
-
-
-  int             orientation_requested_default;
-  int[]           orientation_requested_supported;   //  Integers
-  int             job_quota_period;
-  int             job_k_limit;
-  int             job_page_limit;
-
-  String          job_sheets_default;     // Should this be a list too?
-  String[]        job_sheets_supported;   // Strings
-
-  String          device_uri;
-
-  boolean         color_supported;
-  int             pages_per_minute;
-
-  String          printer_make_and_model;
-
-  String          media_default;
-  String[]        media_supported;      //  Strings
-  
-  int             finishings_default;
-  int[]           finishings_supported;   //  Integers
-
-  int             printer_type;
-
-
-
-  //  ---------------------------------------------
-  //
-  //  Basic constructor.
-  //  
-  public CUPSPrinter()
-  {
-  }
-
-
-
-
-  //  ---------------------------------------------
-  //
-  //  Move the attributes from an ipp request
-  //  into a CUPSPrinter object.
-  //
-  public void updateAttribute( IPPAttribute a )
-  {
-    IPPValue v;
-    int      i;
-
-    
-    if (a.name.compareTo("printer-name") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_name = v.text;
-    }
-    else if (a.name.compareTo("printer-location") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_location = v.text;
-    }
-    else if (a.name.compareTo("printer-info") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_info = v.text;
-    }
-    else if (a.name.compareTo("printer-more-info") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_more_info = v.text;
-    }
-    else if (a.name.compareTo("printer-uri-supported") == 0)
-    {
-      printer_uri_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        printer_uri_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("uri-authentication-supported") == 0)
-    {
-      uri_authentication_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        uri_authentication_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("uri-security-supported") == 0)
-    {
-      uri_security_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        uri_security_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("attributes-charset") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      attributes_charset = v.text;
-    }
-    else if (a.name.compareTo("attributes-natural-language") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      attributes_natural_language = v.text;
-    }
-    else if (a.name.compareTo("printer-state") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_state = v.integer_value;
-    }
-    else if (a.name.compareTo("printer-state-reasons") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_state_reasons = v.text;
-    }
-    else if (a.name.compareTo("printer-is-accepting-jobs") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_is_accepting_jobs = v.boolean_value;
-    }
-    else if (a.name.compareTo("printer-up-time") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_up_time = v.integer_value;
-    }
-    else if (a.name.compareTo("printer-current-time") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_current_time = v.unix_time;   //  *** FIX ***
-    }
-    else if (a.name.compareTo("queue-job-count") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      queued_job_count = v.integer_value;  
-    }
-    else if (a.name.compareTo("pdl-override-supported") == 0)
-    {
-      pdl_override_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        pdl_override_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("ipp-versions-supported") == 0)
-    {
-      ipp_versions_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        ipp_versions_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("operations-supported") == 0)
-    {
-      operations_supported = new int[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        operations_supported[i] = v.integer_value;
-      }
-    }
-    else if (a.name.compareTo("multiple-document-jobs-supported") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      multiple_document_jobs_supported = v.boolean_value;  
-    }
-    else if (a.name.compareTo("multiple-operation-time-out") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      multiple_operation_time_out = v.integer_value;  
-    }
-    else if (a.name.compareTo("multiple-document-handling-supported") == 0)
-    {
-      multiple_document_handling_supported = new int[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        multiple_document_handling_supported[i] = v.integer_value;
-      }
-    }
-    else if (a.name.compareTo("charset-configured") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      charset_configured = v.text;  
-    }
-    else if (a.name.compareTo("natural-language-configured") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      natural_language_configured = v.text;  
-    }
-    else if (a.name.compareTo("generated-natural-language-supported") == 0)
-    {
-      //  *** Should this be a list too?
-      v = (IPPValue)a.values.get(0);
-      generated_natural_language_supported = v.text;  
-    }
-    else if (a.name.compareTo("charset-supported") == 0)
-    {
-      charset_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        charset_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("document-format-default") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      document_format_default = v.text;  
-    }
-    else if (a.name.compareTo("document-format-supported") == 0)
-    {
-      document_format_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        document_format_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("compression-supported") == 0)
-    {
-      compression_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        compression_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("job-priority-default") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      job_priority_default = v.integer_value;  
-    }
-    else if (a.name.compareTo("job-priority-supported") == 0)
-    {
-      //  *** Should be a list?  ***
-      v = (IPPValue)a.values.get(0);
-      job_priority_supported = v.integer_value;  
-    }
-    else if (a.name.compareTo("copies-default") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      copies_default = v.integer_value;  
-    }
-    else if (a.name.compareTo("copies-supported") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      lower_copies_supported = v.lower;  
-      upper_copies_supported = v.upper;  
-    }
-    else if (a.name.compareTo("page-ranges-supported") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      page_ranges_supported = v.boolean_value;  
-    }
-    else if (a.name.compareTo("number-up-default") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      number_up_default = v.integer_value;  
-    }
-    else if (a.name.compareTo("number-up-supported") == 0)
-    {
-      number_up_supported = new int[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        number_up_supported[i] = v.integer_value;
-      }
-    }
-    else if (a.name.compareTo("orientation-requested-default") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      orientation_requested_default = v.integer_value;  
-    }
-    else if (a.name.compareTo("orientation-requested-supported") == 0)
-    {
-      orientation_requested_supported = new int[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        orientation_requested_supported[i] = v.integer_value;
-      }
-    }
-    else if (a.name.compareTo("job-quota-period") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      job_quota_period = v.integer_value;  
-    }
-    else if (a.name.compareTo("job-k-limit") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      job_k_limit = v.integer_value;  
-    }
-    else if (a.name.compareTo("job-page-limit") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      job_page_limit = v.integer_value;  
-    }
-    else if (a.name.compareTo("job-sheets-default") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      job_sheets_default = v.text;  
-    }
-    else if (a.name.compareTo("job-sheets-supported") == 0)
-    {
-      job_sheets_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        job_sheets_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("device-uri") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      device_uri = v.text;  
-    }
-    else if (a.name.compareTo("color-supported") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      color_supported = v.boolean_value;  
-    }
-    else if (a.name.compareTo("pages-per-minute") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      pages_per_minute = v.integer_value;  
-    }
-    else if (a.name.compareTo("printer-make-and-model") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_make_and_model = v.text;  
-    }
-    else if (a.name.compareTo("media-default") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      media_default = v.text;  
-    }
-    else if (a.name.compareTo("media-supported") == 0)
-    {
-      media_supported = new String[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        media_supported[i] = v.text;
-      }
-    }
-    else if (a.name.compareTo("finishings-default") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      finishings_default = v.integer_value;  
-    }
-    else if (a.name.compareTo("finishings-supported") == 0)
-    {
-      finishings_supported = new int[a.values.size()];
-      for (i=0; i < a.values.size(); i++)
-      {
-        v = (IPPValue)a.values.get(i);
-        finishings_supported[i] = v.integer_value;
-      }
-    }
-    else if (a.name.compareTo("printer-type") == 0)
-    {
-      v = (IPPValue)a.values.get(0);
-      printer_type = v.integer_value;  
-    }
-
-  }  // End of updateAttribute()
-
-
-
-
-
-}  //  End of CUPSPrinter class
-
diff --git a/scripting/java/classes/com/easysw/cups/Cups.class b/scripting/java/classes/com/easysw/cups/Cups.class
deleted file mode 100644 (file)
index e259d5b..0000000
Binary files a/scripting/java/classes/com/easysw/cups/Cups.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/CupsJob.class b/scripting/java/classes/com/easysw/cups/CupsJob.class
deleted file mode 100644 (file)
index 8d3a55c..0000000
Binary files a/scripting/java/classes/com/easysw/cups/CupsJob.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/CupsPrinter.class b/scripting/java/classes/com/easysw/cups/CupsPrinter.class
deleted file mode 100644 (file)
index bf96cb1..0000000
Binary files a/scripting/java/classes/com/easysw/cups/CupsPrinter.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPP.class b/scripting/java/classes/com/easysw/cups/IPP.class
deleted file mode 100644 (file)
index 4519d4d..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPP.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPAttribute.class b/scripting/java/classes/com/easysw/cups/IPPAttribute.class
deleted file mode 100644 (file)
index a753ee0..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPAttribute.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPBase64Encoder.class b/scripting/java/classes/com/easysw/cups/IPPBase64Encoder.class
deleted file mode 100644 (file)
index 5c44e82..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPBase64Encoder.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPCalendar.class b/scripting/java/classes/com/easysw/cups/IPPCalendar.class
deleted file mode 100644 (file)
index cc47184..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPCalendar.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPDefs.class b/scripting/java/classes/com/easysw/cups/IPPDefs.class
deleted file mode 100644 (file)
index 879dbe9..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPDefs.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPError.class b/scripting/java/classes/com/easysw/cups/IPPError.class
deleted file mode 100644 (file)
index 853b8d0..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPError.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPHttp.class b/scripting/java/classes/com/easysw/cups/IPPHttp.class
deleted file mode 100644 (file)
index e0c6071..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPHttp.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPMD5.class b/scripting/java/classes/com/easysw/cups/IPPMD5.class
deleted file mode 100644 (file)
index 567b847..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPMD5.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPRequest.class b/scripting/java/classes/com/easysw/cups/IPPRequest.class
deleted file mode 100644 (file)
index 0e35dfa..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPRequest.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPStatus.class b/scripting/java/classes/com/easysw/cups/IPPStatus.class
deleted file mode 100644 (file)
index 0326dcc..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPStatus.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPURLConnection.class b/scripting/java/classes/com/easysw/cups/IPPURLConnection.class
deleted file mode 100644 (file)
index 6293c62..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPURLConnection.class and /dev/null differ
diff --git a/scripting/java/classes/com/easysw/cups/IPPValue.class b/scripting/java/classes/com/easysw/cups/IPPValue.class
deleted file mode 100644 (file)
index 00f68ad..0000000
Binary files a/scripting/java/classes/com/easysw/cups/IPPValue.class and /dev/null differ
diff --git a/scripting/java/cups.jar b/scripting/java/cups.jar
deleted file mode 100644 (file)
index 24fa6f1..0000000
Binary files a/scripting/java/cups.jar and /dev/null differ
diff --git a/scripting/java/docs/allclasses-frame.html b/scripting/java/docs/allclasses-frame.html
deleted file mode 100644 (file)
index fd8f6a4..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
-<!--NewPage-->
-<HTML>
-<HEAD>
-<!-- Generated by javadoc on Tue Feb 11 14:29:07 PST 2003 -->
-<TITLE>
-All Classes
-</TITLE>
-<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
-</HEAD>
-<BODY BGCOLOR="white">
-<FONT size="+1" CLASS="FrameHeadingFont">
-<B>All Classes</B></FONT>
-<BR>
-
-<TABLE BORDER="0" WIDTH="100%">
-<TR>
-<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="com/easysw/cups/Cups.html" TARGET="classFrame">Cups</A>
-<BR>
-<A HREF="com/easysw/cups/CupsJob.html" TARGET="classFrame">CupsJob</A>
-<BR>
-<A HREF="com/easysw/cups/CupsPrinter.html" TARGET="classFrame">CupsPrinter</A>
-<BR>
-<A HREF="com/easysw/cups/IPP.html" TARGET="classFrame">IPP</A>
-<BR>
-<A HREF="com/easysw/cups/IPPAttribute.html" TARGET="classFrame">IPPAttribute</A>
-<BR>
-<A HREF="com/easysw/cups/IPPDefs.html" TARGET="classFrame">IPPDefs</A>
-<BR>
-<A HREF="com/easysw/cups/IPPError.html" TARGET="classFrame">IPPError</A>
-<BR>
-<A HREF="com/easysw/cups/IPPHttp.html" TARGET="classFrame">IPPHttp</A>
-<BR>
-<A HREF="com/easysw/cups/IPPMD5.html" TARGET="classFrame">IPPMD5</A>
-<BR>
-<A HREF="com/easysw/cups/IPPRequest.html" TARGET="classFrame">IPPRequest</A>
-<BR>
-<A HREF="com/easysw/cups/IPPStatus.html" TARGET="classFrame">IPPStatus</A>
-<BR>
-<A HREF="com/easysw/cups/IPPURLConnection.html" TARGET="classFrame">IPPURLConnection</A>
-<BR>
-<A HREF="com/easysw/cups/IPPValue.html" TARGET="classFrame">IPPValue</A>
-<BR>
-</FONT></TD>
-</TR>
-</TABLE>
-
-</BODY>
-</HTML>
diff --git a/scripting/java/docs/com/easysw/cups/Cups.html b/scripting/java/docs/com/easysw/cups/Cups.html
deleted file mode 100644 (file)
index 77f25a7..0000000
+++ /dev/null
@@ -1,600 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
-<!--NewPage-->
-<HTML>
-<HEAD>
-<!-- Generated by javadoc on Tue Feb 11 14:29:07 PST 2003 -->
-<TITLE>
-: Class  Cups
-</TITLE>
-<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
-</HEAD>
-<BODY BGCOLOR="white">
-
-<!-- ========== START OF NAVBAR ========== -->
-<A NAME="navbar_top"><!-- --></A>
-<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
-<TR>
-<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_top_firstrow"><!-- --></A>
-<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
-  <TR ALIGN="center" VALIGN="top">
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
-  </TR>
-</TABLE>
-</TD>
-<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
-</EM>
-</TD>
-</TR>
-
-<TR>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../com/easysw/cups/CupsJob.html"><B>NEXT CLASS</B></A></FONT></TD>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
-&nbsp;<A HREF="Cups.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
-</TR>
-<TR>
-<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
-  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
-<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
-DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
-</TR>
-</TABLE>
-<!-- =========== END OF NAVBAR =========== -->
-
-<HR>
-<!-- ======== START OF CLASS DATA ======== -->
-<H2>
-<FONT SIZE="-1">
-com.easysw.cups</FONT>
-<BR>
-Class  Cups</H2>
-<PRE>
-java.lang.Object
-  |
-  +--<B>com.easysw.cups.Cups</B>
-</PRE>
-<HR>
-<DL>
-<DT>public class <B>Cups</B><DT>extends java.lang.Object</DL>
-
-<P>
-<HR>
-
-<P>
-<!-- ======== INNER CLASS SUMMARY ======== -->
-
-
-<!-- =========== FIELD SUMMARY =========== -->
-
-
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-
-<A NAME="constructor_summary"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Constructor Summary</B></FONT></TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#Cups()">Cups</A></B>()</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Void constructor.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#Cups(java.net.URL)">Cups</A></B>(java.net.URL&nbsp;p_url)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor using a <code>URL</code>.</TD>
-</TR>
-</TABLE>
-&nbsp;
-<!-- ========== METHOD SUMMARY =========== -->
-
-<A NAME="method_summary"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Method Summary</B></FONT></TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#cupsCancelJob(java.lang.String, int, java.lang.String)">cupsCancelJob</A></B>(java.lang.String&nbsp;printer_name,
-              int&nbsp;p_job_id,
-              java.lang.String&nbsp;p_user_name)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cancel a job - send a job cancel request to the server.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#cupsGetDefault()">cupsGetDefault</A></B>()</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get default destination.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../com/easysw/cups/CupsJob.html">CupsJob</A>[]</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#cupsGetJobs(boolean, boolean)">cupsGetJobs</A></B>(boolean&nbsp;showMyJobs,
-            boolean&nbsp;showCompleted)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a list of jobs.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#cupsGetPrinterAttributes(java.lang.String)">cupsGetPrinterAttributes</A></B>(java.lang.String&nbsp;printer_name)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get printer attributes</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String[]</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#cupsGetPrinters()">cupsGetPrinters</A></B>()</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get a list of printers.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.util.List</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#cupsGetPrinterStatus(java.lang.String)">cupsGetPrinterStatus</A></B>(java.lang.String&nbsp;printer_name)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;<A HREF="../../../com/easysw/cups/CupsJob.html">CupsJob</A></CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#cupsPrintFile(java.lang.String, com.easysw.cups.IPPAttribute[])">cupsPrintFile</A></B>(java.lang.String&nbsp;p_filename,
-              <A HREF="../../../com/easysw/cups/IPPAttribute.html">IPPAttribute</A>[]&nbsp;p_attrs)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Print a file.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;boolean</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#doRequest()">doRequest</A></B>()</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do a CUPS request to the server.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;boolean</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#doRequest(java.io.File)">doRequest</A></B>(java.io.File&nbsp;file)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Send a FILE to the CUPS server.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;boolean</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#doRequest(java.lang.String)">doRequest</A></B>(java.lang.String&nbsp;from)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;boolean</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#getEncrypt()">getEncrypt</A></B>()</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the value of the <code>encrypt</code> member.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#setDest(java.lang.String)">setDest</A></B>(java.lang.String&nbsp;p_dest)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of the <code>dest</code> member.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#setEncrypt(boolean)">setEncrypt</A></B>(boolean&nbsp;p_encrypt)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of the <code>encrypt</code> member.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#setInstance(java.lang.String)">setInstance</A></B>(java.lang.String&nbsp;p_instance)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of the <code>instance</code> member.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#setPasswd(java.lang.String)">setPasswd</A></B>(java.lang.String&nbsp;p_passwd)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of the <code>passwd</code> member.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#setPath(java.lang.String)">setPath</A></B>(java.lang.String&nbsp;p_path)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of the <code>path</code> member.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#setPort(int)">setPort</A></B>(int&nbsp;p_port)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of the <code>port</code> member.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#setProtocol(java.lang.String)">setProtocol</A></B>(java.lang.String&nbsp;p_protocol)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of the <code>protocol</code> member.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#setServer(java.lang.String)">setServer</A></B>(java.lang.String&nbsp;p_server)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of the <code>server</code> member.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/Cups.html#setUser(java.lang.String)">setUser</A></B>(java.lang.String&nbsp;p_user)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the value of the <code>user</code> member.</TD>
-</TR>
-</TABLE>
-&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TD><B>Methods inherited from class java.lang.Object</B></TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
-</TR>
-</TABLE>
-&nbsp;
-<P>
-
-<!-- ============ FIELD DETAIL =========== -->
-
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-
-<A NAME="constructor_detail"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=1><FONT SIZE="+2">
-<B>Constructor Detail</B></FONT></TD>
-</TR>
-</TABLE>
-
-<A NAME="Cups()"><!-- --></A><H3>
-Cups</H3>
-<PRE>
-public <B>Cups</B>()</PRE>
-<DL>
-<DD>Void constructor.</DL>
-<HR>
-
-<A NAME="Cups(java.net.URL)"><!-- --></A><H3>
-Cups</H3>
-<PRE>
-public <B>Cups</B>(java.net.URL&nbsp;p_url)</PRE>
-<DL>
-<DD>Constructor using a <code>URL</code>.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_url</code></CODE> - A <code>URL</code> object.</DL>
-</DD>
-</DL>
-
-<!-- ============ METHOD DETAIL ========== -->
-
-<A NAME="method_detail"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=1><FONT SIZE="+2">
-<B>Method Detail</B></FONT></TD>
-</TR>
-</TABLE>
-
-<A NAME="setProtocol(java.lang.String)"><!-- --></A><H3>
-setProtocol</H3>
-<PRE>
-public void <B>setProtocol</B>(java.lang.String&nbsp;p_protocol)</PRE>
-<DL>
-<DD>Set the value of the <code>protocol</code> member.  Valid values
- are ipp or http.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_protocol</code></CODE> - String with protocol.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="setServer(java.lang.String)"><!-- --></A><H3>
-setServer</H3>
-<PRE>
-public void <B>setServer</B>(java.lang.String&nbsp;p_server)</PRE>
-<DL>
-<DD>Set the value of the <code>server</code> member.  This is an
- IP address or a hostname.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_server</code></CODE> - IP address or hostname.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="setPort(int)"><!-- --></A><H3>
-setPort</H3>
-<PRE>
-public void <B>setPort</B>(int&nbsp;p_port)</PRE>
-<DL>
-<DD>Set the value of the <code>port</code> member.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_port</code></CODE> - Port number.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="setUser(java.lang.String)"><!-- --></A><H3>
-setUser</H3>
-<PRE>
-public void <B>setUser</B>(java.lang.String&nbsp;p_user)</PRE>
-<DL>
-<DD>Set the value of the <code>user</code> member.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_user</code></CODE> - User name.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="setPasswd(java.lang.String)"><!-- --></A><H3>
-setPasswd</H3>
-<PRE>
-public void <B>setPasswd</B>(java.lang.String&nbsp;p_passwd)</PRE>
-<DL>
-<DD>Set the value of the <code>passwd</code> member.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_passwd</code></CODE> - Password.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="setDest(java.lang.String)"><!-- --></A><H3>
-setDest</H3>
-<PRE>
-public void <B>setDest</B>(java.lang.String&nbsp;p_dest)</PRE>
-<DL>
-<DD>Set the value of the <code>dest</code> member.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_dest</code></CODE> - Destination.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="setInstance(java.lang.String)"><!-- --></A><H3>
-setInstance</H3>
-<PRE>
-public void <B>setInstance</B>(java.lang.String&nbsp;p_instance)</PRE>
-<DL>
-<DD>Set the value of the <code>instance</code> member.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_instance</code></CODE> - Instance.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="setEncrypt(boolean)"><!-- --></A><H3>
-setEncrypt</H3>
-<PRE>
-public void <B>setEncrypt</B>(boolean&nbsp;p_encrypt)</PRE>
-<DL>
-<DD>Set the value of the <code>encrypt</code> member.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_enrypt</code></CODE> - Yes or no.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="getEncrypt()"><!-- --></A><H3>
-getEncrypt</H3>
-<PRE>
-public boolean <B>getEncrypt</B>()</PRE>
-<DL>
-<DD>Get the value of the <code>encrypt</code> member.<DD><DL>
-<DT><B>Returns:</B><DD><code>boolean</code>            Encryption on or off.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="setPath(java.lang.String)"><!-- --></A><H3>
-setPath</H3>
-<PRE>
-public void <B>setPath</B>(java.lang.String&nbsp;p_path)</PRE>
-<DL>
-<DD>Set the value of the <code>path</code> member.  This is the
- path that will be used in the POST method.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_path</code></CODE> - Path on server.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="doRequest(java.lang.String)"><!-- --></A><H3>
-doRequest</H3>
-<PRE>
-public boolean <B>doRequest</B>(java.lang.String&nbsp;from)
-                  throws java.io.IOException</PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="doRequest()"><!-- --></A><H3>
-doRequest</H3>
-<PRE>
-public boolean <B>doRequest</B>()
-                  throws java.io.IOException</PRE>
-<DL>
-<DD>Do a CUPS request to the server.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_dest</code></CODE> - Destination name.<DT><B>Returns:</B><DD><code>boolean</code>            True on success, false otherwise</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="doRequest(java.io.File)"><!-- --></A><H3>
-doRequest</H3>
-<PRE>
-public boolean <B>doRequest</B>(java.io.File&nbsp;file)
-                  throws java.io.IOException</PRE>
-<DL>
-<DD>Send a FILE to the CUPS server.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>file</code></CODE> - File to send.<DT><B>Returns:</B><DD><code>boolean</code>            True on success, false otherwise</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="cupsGetJobs(boolean, boolean)"><!-- --></A><H3>
-cupsGetJobs</H3>
-<PRE>
-public <A HREF="../../../com/easysw/cups/CupsJob.html">CupsJob</A>[] <B>cupsGetJobs</B>(boolean&nbsp;showMyJobs,
-                             boolean&nbsp;showCompleted)
-                      throws java.io.IOException</PRE>
-<DL>
-<DD>Get a list of jobs.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>showMyJobs</code></CODE> - Show only jobs for user.<DD><CODE><code>showCompleted</code></CODE> - Show completed OR active jobs.<DT><B>Returns:</B><DD><code>CupsJob[]</code>             Array of job objects, or null.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="cupsGetPrinters()"><!-- --></A><H3>
-cupsGetPrinters</H3>
-<PRE>
-public java.lang.String[] <B>cupsGetPrinters</B>()
-                                   throws java.io.IOException</PRE>
-<DL>
-<DD>Get a list of printers.<DD><DL>
-<DT><B>Returns:</B><DD><code>String[]</code>           Array of printers, or null.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="cupsGetDefault()"><!-- --></A><H3>
-cupsGetDefault</H3>
-<PRE>
-public java.lang.String <B>cupsGetDefault</B>()
-                                throws java.io.IOException</PRE>
-<DL>
-<DD>Get default destination.<DD><DL>
-<DT><B>Returns:</B><DD><code>String</code>     Name of default printer, or null.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="cupsGetPrinterAttributes(java.lang.String)"><!-- --></A><H3>
-cupsGetPrinterAttributes</H3>
-<PRE>
-public java.util.List <B>cupsGetPrinterAttributes</B>(java.lang.String&nbsp;printer_name)
-                                        throws java.io.IOException</PRE>
-<DL>
-<DD>Get printer attributes<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>printer_name</code></CODE> - Name of printer to get info for.<DT><B>Returns:</B><DD><code>List</code>            List of attributes.<DT><B>See Also: </B><DD><code>CupsPrinter</code></DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="cupsPrintFile(java.lang.String, com.easysw.cups.IPPAttribute[])"><!-- --></A><H3>
-cupsPrintFile</H3>
-<PRE>
-public <A HREF="../../../com/easysw/cups/CupsJob.html">CupsJob</A> <B>cupsPrintFile</B>(java.lang.String&nbsp;p_filename,
-                             <A HREF="../../../com/easysw/cups/IPPAttribute.html">IPPAttribute</A>[]&nbsp;p_attrs)
-                      throws java.io.IOException</PRE>
-<DL>
-<DD>Print a file.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>p_filename</code></CODE> - Path of file to print.<DD><CODE><code>p_attrs[]</code></CODE> - Array of print job attributes.<DT><B>Returns:</B><DD><code>CupsJob</code>             Object with job info.<DT><B>See Also: </B><DD><code>CupsJob</code></DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="cupsCancelJob(java.lang.String, int, java.lang.String)"><!-- --></A><H3>
-cupsCancelJob</H3>
-<PRE>
-public int <B>cupsCancelJob</B>(java.lang.String&nbsp;printer_name,
-                         int&nbsp;p_job_id,
-                         java.lang.String&nbsp;p_user_name)
-                  throws java.io.IOException</PRE>
-<DL>
-<DD>Cancel a job - send a job cancel request to the server.<DD><DL>
-<DT><B>Parameters:</B><DD><CODE><code>printer_name</code></CODE> - Destination.<DD><CODE><code>p_job_id</code></CODE> - ID of job.<DD><CODE><code>p_user_name</code></CODE> - Requesting user name.</DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="cupsGetPrinterStatus(java.lang.String)"><!-- --></A><H3>
-cupsGetPrinterStatus</H3>
-<PRE>
-public java.util.List <B>cupsGetPrinterStatus</B>(java.lang.String&nbsp;printer_name)
-                                    throws java.io.IOException</PRE>
-<DL>
-</DL>
-<!-- ========= END OF CLASS DATA ========= -->
-<HR>
-
-<!-- ========== START OF NAVBAR ========== -->
-<A NAME="navbar_bottom"><!-- --></A>
-<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
-<TR>
-<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_bottom_firstrow"><!-- --></A>
-<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
-  <TR ALIGN="center" VALIGN="top">
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
-  </TR>
-</TABLE>
-</TD>
-<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
-</EM>
-</TD>
-</TR>
-
-<TR>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;PREV CLASS&nbsp;
-&nbsp;<A HREF="../../../com/easysw/cups/CupsJob.html"><B>NEXT CLASS</B></A></FONT></TD>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
-&nbsp;<A HREF="Cups.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
-</TR>
-<TR>
-<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
-  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
-<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
-DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
-</TR>
-</TABLE>
-<!-- =========== END OF NAVBAR =========== -->
-
-<HR>
-
-</BODY>
-</HTML>
diff --git a/scripting/java/docs/com/easysw/cups/CupsJob.html b/scripting/java/docs/com/easysw/cups/CupsJob.html
deleted file mode 100644 (file)
index c75fb8f..0000000
+++ /dev/null
@@ -1,547 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
-<!--NewPage-->
-<HTML>
-<HEAD>
-<!-- Generated by javadoc on Tue Feb 11 14:29:07 PST 2003 -->
-<TITLE>
-: Class  CupsJob
-</TITLE>
-<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
-</HEAD>
-<BODY BGCOLOR="white">
-
-<!-- ========== START OF NAVBAR ========== -->
-<A NAME="navbar_top"><!-- --></A>
-<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
-<TR>
-<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_top_firstrow"><!-- --></A>
-<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
-  <TR ALIGN="center" VALIGN="top">
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
-  </TR>
-</TABLE>
-</TD>
-<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
-</EM>
-</TD>
-</TR>
-
-<TR>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../com/easysw/cups/Cups.html"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../com/easysw/cups/CupsPrinter.html"><B>NEXT CLASS</B></A></FONT></TD>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
-&nbsp;<A HREF="CupsJob.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
-</TR>
-<TR>
-<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
-  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
-<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
-DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
-</TR>
-</TABLE>
-<!-- =========== END OF NAVBAR =========== -->
-
-<HR>
-<!-- ======== START OF CLASS DATA ======== -->
-<H2>
-<FONT SIZE="-1">
-com.easysw.cups</FONT>
-<BR>
-Class  CupsJob</H2>
-<PRE>
-java.lang.Object
-  |
-  +--<B>com.easysw.cups.CupsJob</B>
-</PRE>
-<HR>
-<DL>
-<DT>public class <B>CupsJob</B><DT>extends java.lang.Object</DL>
-
-<P>
-<HR>
-
-<P>
-<!-- ======== INNER CLASS SUMMARY ======== -->
-
-
-<!-- =========== FIELD SUMMARY =========== -->
-
-<A NAME="field_summary"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Field Summary</B></FONT></TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#document_format">document_format</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_hold_until">job_hold_until</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_id">job_id</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_k_octets">job_k_octets</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_media_sheets_completed">job_media_sheets_completed</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_more_info">job_more_info</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_name">job_name</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_originating_host_name">job_originating_host_name</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_originating_user_name">job_originating_user_name</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;long</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_printer_up_time">job_printer_up_time</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_printer_uri">job_printer_uri</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_priority">job_priority</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_sheets">job_sheets</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;int</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_state">job_state</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_state_reasons">job_state_reasons</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#job_uri">job_uri</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;long</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#time_at_completed">time_at_completed</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;long</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#time_at_creation">time_at_creation</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;long</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#time_at_processing">time_at_processing</A></B></CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
-</TR>
-</TABLE>
-&nbsp;
-<!-- ======== CONSTRUCTOR SUMMARY ======== -->
-
-<A NAME="constructor_summary"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Constructor Summary</B></FONT></TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#CupsJob()">CupsJob</A></B>()</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor - set some default values.</TD>
-</TR>
-</TABLE>
-&nbsp;
-<!-- ========== METHOD SUMMARY =========== -->
-
-<A NAME="method_summary"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=2><FONT SIZE="+2">
-<B>Method Summary</B></FONT></TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#jobStatusText()">jobStatusText</A></B>()</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert a job status to a string.</TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
-<CODE>&nbsp;void</CODE></FONT></TD>
-<TD><CODE><B><A HREF="../../../com/easysw/cups/CupsJob.html#updateAttribute(com.easysw.cups.IPPAttribute)">updateAttribute</A></B>(<A HREF="../../../com/easysw/cups/IPPAttribute.html">IPPAttribute</A>&nbsp;a)</CODE>
-
-<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Process an attribute from a cups.doRequest() call
- and move the value into a local member.</TD>
-</TR>
-</TABLE>
-&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
-<TD><B>Methods inherited from class java.lang.Object</B></TD>
-</TR>
-<TR BGCOLOR="white" CLASS="TableRowColor">
-<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
-</TR>
-</TABLE>
-&nbsp;
-<P>
-
-<!-- ============ FIELD DETAIL =========== -->
-
-<A NAME="field_detail"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=1><FONT SIZE="+2">
-<B>Field Detail</B></FONT></TD>
-</TR>
-</TABLE>
-
-<A NAME="job_id"><!-- --></A><H3>
-job_id</H3>
-<PRE>
-public int <B>job_id</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_more_info"><!-- --></A><H3>
-job_more_info</H3>
-<PRE>
-public java.lang.String <B>job_more_info</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_uri"><!-- --></A><H3>
-job_uri</H3>
-<PRE>
-public java.lang.String <B>job_uri</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_printer_uri"><!-- --></A><H3>
-job_printer_uri</H3>
-<PRE>
-public java.lang.String <B>job_printer_uri</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_printer_up_time"><!-- --></A><H3>
-job_printer_up_time</H3>
-<PRE>
-public long <B>job_printer_up_time</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_name"><!-- --></A><H3>
-job_name</H3>
-<PRE>
-public java.lang.String <B>job_name</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_originating_user_name"><!-- --></A><H3>
-job_originating_user_name</H3>
-<PRE>
-public java.lang.String <B>job_originating_user_name</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="document_format"><!-- --></A><H3>
-document_format</H3>
-<PRE>
-public java.lang.String <B>document_format</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_originating_host_name"><!-- --></A><H3>
-job_originating_host_name</H3>
-<PRE>
-public java.lang.String <B>job_originating_host_name</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_priority"><!-- --></A><H3>
-job_priority</H3>
-<PRE>
-public int <B>job_priority</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_state"><!-- --></A><H3>
-job_state</H3>
-<PRE>
-public int <B>job_state</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_media_sheets_completed"><!-- --></A><H3>
-job_media_sheets_completed</H3>
-<PRE>
-public int <B>job_media_sheets_completed</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_k_octets"><!-- --></A><H3>
-job_k_octets</H3>
-<PRE>
-public int <B>job_k_octets</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="time_at_creation"><!-- --></A><H3>
-time_at_creation</H3>
-<PRE>
-public long <B>time_at_creation</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="time_at_processing"><!-- --></A><H3>
-time_at_processing</H3>
-<PRE>
-public long <B>time_at_processing</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="time_at_completed"><!-- --></A><H3>
-time_at_completed</H3>
-<PRE>
-public long <B>time_at_completed</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_hold_until"><!-- --></A><H3>
-job_hold_until</H3>
-<PRE>
-public java.lang.String <B>job_hold_until</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_sheets"><!-- --></A><H3>
-job_sheets</H3>
-<PRE>
-public java.lang.String <B>job_sheets</B></PRE>
-<DL>
-</DL>
-<HR>
-
-<A NAME="job_state_reasons"><!-- --></A><H3>
-job_state_reasons</H3>
-<PRE>
-public java.lang.String <B>job_state_reasons</B></PRE>
-<DL>
-</DL>
-
-<!-- ========= CONSTRUCTOR DETAIL ======== -->
-
-<A NAME="constructor_detail"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=1><FONT SIZE="+2">
-<B>Constructor Detail</B></FONT></TD>
-</TR>
-</TABLE>
-
-<A NAME="CupsJob()"><!-- --></A><H3>
-CupsJob</H3>
-<PRE>
-public <B>CupsJob</B>()</PRE>
-<DL>
-<DD>Constructor - set some default values.</DL>
-
-<!-- ============ METHOD DETAIL ========== -->
-
-<A NAME="method_detail"><!-- --></A>
-<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
-<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
-<TD COLSPAN=1><FONT SIZE="+2">
-<B>Method Detail</B></FONT></TD>
-</TR>
-</TABLE>
-
-<A NAME="updateAttribute(com.easysw.cups.IPPAttribute)"><!-- --></A><H3>
-updateAttribute</H3>
-<PRE>
-public void <B>updateAttribute</B>(<A HREF="../../../com/easysw/cups/IPPAttribute.html">IPPAttribute</A>&nbsp;a)</PRE>
-<DL>
-<DD>Process an attribute from a cups.doRequest() call
- and move the value into a local member.<DD><DL>
-<DT><B>See Also: </B><DD><code>IPPDefs</code>, 
-<code>IPPValues</code>, 
-<code>IPPAttributes</code></DL>
-</DD>
-</DL>
-<HR>
-
-<A NAME="jobStatusText()"><!-- --></A><H3>
-jobStatusText</H3>
-<PRE>
-public java.lang.String <B>jobStatusText</B>()</PRE>
-<DL>
-<DD>Convert a job status to a string.<DD><DL>
-<DT><B>See Also: </B><DD><code>IPPDefs</code></DL>
-</DD>
-</DL>
-<!-- ========= END OF CLASS DATA ========= -->
-<HR>
-
-<!-- ========== START OF NAVBAR ========== -->
-<A NAME="navbar_bottom"><!-- --></A>
-<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
-<TR>
-<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
-<A NAME="navbar_bottom_firstrow"><!-- --></A>
-<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
-  <TR ALIGN="center" VALIGN="top">
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
-  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
-  </TR>
-</TABLE>
-</TD>
-<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
-</EM>
-</TD>
-</TR>
-
-<TR>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-&nbsp;<A HREF="../../../com/easysw/cups/Cups.html"><B>PREV CLASS</B></A>&nbsp;
-&nbsp;<A HREF="../../../com/easysw/cups/CupsPrinter.html"><B>NEXT CLASS</B></A></FONT></TD>
-<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
-  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
-&nbsp;<A HREF="CupsJob.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
-</TR>
-<TR>
-<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
-  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
-<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
-DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
-</TR>
-</TABLE>
-<!-- =========== END OF NAVBAR =========== -->
-
-<HR>
-
-</BODY>
-</HTML>
diff --git a/scripting/java/docs/com/easysw/cups/CupsPrinter.html b/scripting/java/docs/com/easysw/cups/CupsPrinter.html