]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/backend-private.h
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / backend / backend-private.h
index b44270c1a67c6f9ee7f2a7066b82f8b4a234af16..04bf5167405d4f5918ec2cac1e3f6b0771957d73 100644 (file)
@@ -1,18 +1,16 @@
 /*
- * "$Id: backend-private.h 7810 2008-07-29 01:11:15Z mike $"
+ * Backend support definitions for CUPS.
  *
- *   Backend support definitions for the Common UNIX Printing System (CUPS).
+ * Copyright 2007-2014 by Apple Inc.
+ * Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
- *   Copyright 2007-2008 by Apple Inc.
- *   Copyright 1997-2007 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/".
  *
- *   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.
+ * This file is subject to the Apple OS-Developed Software exception.
  */
 
 #ifndef _CUPS_BACKEND_PRIVATE_H_
  * Include necessary headers.
  */
 
+#  include <cups/cups-private.h>
+#  include <cups/snmp-private.h>
 #  include <cups/backend.h>
 #  include <cups/sidechannel.h>
-#  include <cups/ppd-private.h>
-#  include <cups/debug.h>
-#  include <cups/i18n.h>
-#  include <cups/snmp-private.h>
-#  include <stdlib.h>
-#  include <errno.h>
-#  include <cups/string.h>
 #  include <signal.h>
 
+#  ifdef __linux
+#    include <sys/ioctl.h>
+#    include <linux/lp.h>
+#    define IOCNR_GET_DEVICE_ID                1
+#    define LPIOC_GET_DEVICE_ID(len)   _IOC(_IOC_READ, 'P', IOCNR_GET_DEVICE_ID, len)
+#    include <linux/parport.h>
+#    include <linux/ppdev.h>
+#    include <unistd.h>
+#    include <fcntl.h>
+#  endif /* __linux */
+
+#  ifdef __sun
+#    ifdef __sparc
+#      include <sys/ecppio.h>
+#    else
+#      include <sys/ioccom.h>
+#      include <sys/ecppsys.h>
+#    endif /* __sparc */
+#  endif /* __sun */
+
 
 /*
  * C++ magic...
@@ -78,6 +91,7 @@ extern "C" {
 #define CUPS_OID_prtGeneral                    CUPS_OID_printmib,5
 #define CUPS_OID_prtGeneralTable               CUPS_OID_prtGeneral,1
 #define CUPS_OID_prtGeneralEntry               CUPS_OID_prtGeneralTable,1
+#define CUPS_OID_prtGeneralCurrentLocalization CUPS_OID_prtGeneralEntry,2
 #define CUPS_OID_prtGeneralPrinterName         CUPS_OID_prtGeneralEntry,16
 #define CUPS_OID_prtGeneralSerialNumber                CUPS_OID_prtGeneralEntry,17
 
@@ -87,6 +101,11 @@ extern "C" {
 #define CUPS_OID_prtCoverDescription           CUPS_OID_prtCoverEntry,2
 #define CUPS_OID_prtCoverStatus                        CUPS_OID_prtCoverEntry,3
 
+#define CUPS_OID_prtLocalization               CUPS_OID_printmib,7
+#define CUPS_OID_prtLocalizationTable          CUPS_OID_prtLocalization,1
+#define CUPS_OID_prtLocalizationEntry          CUPS_OID_prtLocalizationTable,1
+#define CUPS_OID_prtLocalizationCharacterSet   CUPS_OID_prtLocalizationEntry,4
+
 #define CUPS_OID_prtMarker                     CUPS_OID_printmib,10
 #define CUPS_OID_prtMarkerTable                        CUPS_OID_prtMarker,2
 #define CUPS_OID_prtMarkerEntry                        CUPS_OID_prtMarkerTable,1
@@ -238,6 +257,45 @@ extern "C" {
 #define CUPS_TC_inserts                                33
 #define CUPS_TC_covers                         34
 
+#define CUPS_TC_tenThousandthsOfInches         3
+#define CUPS_TC_micrometers                    4
+#define CUPS_TC_impressions                    7
+#define CUPS_TC_sheets                         8
+#define CUPS_TC_hours                          11
+#define CUPS_TC_thousandthsOfOunces            12
+#define CUPS_TC_tenthsOfGrams                  13
+#define CUPS_TC_hundrethsOfFluidOunces         14
+#define CUPS_TC_tenthsOfMilliliters            15
+#define CUPS_TC_feet                           16
+#define CUPS_TC_meters                         17
+#define CUPS_TC_items                          18
+#define CUPS_TC_percent                                19
+
+/* These come from RFC 3808 to define character sets we support */
+/* Also see http://www.iana.org/assignments/character-sets */
+#define CUPS_TC_csASCII                                3
+#define CUPS_TC_csISOLatin1                    4
+#define CUPS_TC_csShiftJIS                     17
+#define CUPS_TC_csUTF8                         106
+#define CUPS_TC_csUnicode                      1000 /* UCS2 BE */
+#define CUPS_TC_csUCS4                         1001 /* UCS4 BE */
+#define CUPS_TC_csUnicodeASCII                 1002
+#define CUPS_TC_csUnicodeLatin1                        1003
+#define CUPS_TC_csUTF16BE                      1013
+#define CUPS_TC_csUTF16LE                      1014
+#define CUPS_TC_csUTF32                                1017
+#define CUPS_TC_csUTF32BE                      1018
+#define CUPS_TC_csUTF32LE                      1019
+#define CUPS_TC_csWindows31J                   2024
+
+
+/*
+ * Types...
+ */
+
+typedef int (*_cups_sccb_t)(int print_fd, int device_fd, int snmp_fd,
+                           http_addr_t *addr, int use_bc);
+
 
 /*
  * Prototypes...
@@ -253,27 +311,21 @@ extern int                backendGetDeviceID(int fd, char *device_id,
                                           int uri_size);
 extern int             backendGetMakeModel(const char *device_id,
                                            char *make_model,
-                                           int make_model_size);
-extern void            backendNetworkSideCB(int print_fd, int device_fd,
+                                           size_t make_model_size);
+extern int             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));
+                                      int update_state, _cups_sccb_t side_cb);
 extern int             backendSNMPSupplies(int snmp_fd, http_addr_t *addr,
                                            int *page_count,
                                            int *printer_state);
+extern int             backendWaitLoop(int snmp_fd, http_addr_t *addr,
+                                       int use_bc, _cups_sccb_t side_cb);
+
 
 #  ifdef __cplusplus
 }
 #  endif /* __cplusplus */
 #endif /* !_CUPS_BACKEND_PRIVATE_H_ */
-
-
-/*
- * End of "$Id: backend-private.h 7810 2008-07-29 01:11:15Z mike $".
- */