]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - backend/backend-private.h
Update svn:keyword properties.
[thirdparty/cups.git] / backend / backend-private.h
index c124274a9d879f5baed2502258f2a675058c4fcb..3729bb020482b3ec99bcd0cbe0dc63c4ca7e3544 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: backend-private.h 7586 2008-05-16 23:39:39Z mike $"
+ * "$Id$"
  *
- *   Backend support definitions for the Common UNIX Printing System (CUPS).
+ *   Backend support definitions for CUPS.
  *
- *   Copyright 2007-2008 by Apple Inc.
+ *   Copyright 2007-2012 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
  * 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 +93,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 +103,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 +259,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...
@@ -254,19 +314,18 @@ extern int                backendGetDeviceID(int fd, char *device_id,
 extern int             backendGetMakeModel(const char *device_id,
                                            char *make_model,
                                            int make_model_size);
-extern void            backendNetworkSideCB(int print_fd, int device_fd,
+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
 }
@@ -275,5 +334,5 @@ extern int          backendSNMPSupplies(int snmp_fd, http_addr_t *addr,
 
 
 /*
- * End of "$Id: backend-private.h 7586 2008-05-16 23:39:39Z mike $".
+ * End of "$Id$".
  */