s3-spoolss: remove device mode defines from nt_printing.h.
[ira/wip.git] / source3 / include / nt_printing.h
index 968e63d8e2eb974ccff571c96c435577b6065109..12096c847a5ab30aa84918f6c0fd266c55219a2d 100644 (file)
 #ifndef NT_PRINTING_H_
 #define NT_PRINTING_H_
 
-#define ORIENTATION      0x00000001L
-#define PAPERSIZE        0x00000002L
-#define PAPERLENGTH      0x00000004L
-#define PAPERWIDTH       0x00000008L
-#define SCALE            0x00000010L
-#define COPIES           0x00000100L
-#define DEFAULTSOURCE    0x00000200L
-#define PRINTQUALITY     0x00000400L
-#define COLOR            0x00000800L
-#define DUPLEX           0x00001000L
-#define YRESOLUTION      0x00002000L
-#define TTOPTION         0x00004000L
-#define COLLATE          0x00008000L
-#define FORMNAME         0x00010000L
-#define LOGPIXELS        0x00020000L
-#define BITSPERPEL       0x00040000L
-#define PELSWIDTH        0x00080000L
-#define PELSHEIGHT       0x00100000L
-#define DISPLAYFLAGS     0x00200000L
-#define DISPLAYFREQUENCY 0x00400000L
-#define PANNINGWIDTH     0x00800000L
-#define PANNINGHEIGHT    0x01000000L
-
-#define ORIENT_PORTRAIT   1
-#define ORIENT_LANDSCAPE  2
-
-#define PAPER_FIRST                PAPER_LETTER
-#define PAPER_LETTER               1  /* Letter 8 1/2 x 11 in               */
-#define PAPER_LETTERSMALL          2  /* Letter Small 8 1/2 x 11 in         */
-#define PAPER_TABLOID              3  /* Tabloid 11 x 17 in                 */
-#define PAPER_LEDGER               4  /* Ledger 17 x 11 in                  */
-#define PAPER_LEGAL                5  /* Legal 8 1/2 x 14 in                */
-#define PAPER_STATEMENT            6  /* Statement 5 1/2 x 8 1/2 in         */
-#define PAPER_EXECUTIVE            7  /* Executive 7 1/4 x 10 1/2 in        */
-#define PAPER_A3                   8  /* A3 297 x 420 mm                    */
-#define PAPER_A4                   9  /* A4 210 x 297 mm                    */
-#define PAPER_A4SMALL             10  /* A4 Small 210 x 297 mm              */
-#define PAPER_A5                  11  /* A5 148 x 210 mm                    */
-#define PAPER_B4                  12  /* B4 (JIS) 250 x 354                 */
-#define PAPER_B5                  13  /* B5 (JIS) 182 x 257 mm              */
-#define PAPER_FOLIO               14  /* Folio 8 1/2 x 13 in                */
-#define PAPER_QUARTO              15  /* Quarto 215 x 275 mm                */
-#define PAPER_10X14               16  /* 10x14 in                           */
-#define PAPER_11X17               17  /* 11x17 in                           */
-#define PAPER_NOTE                18  /* Note 8 1/2 x 11 in                 */
-#define PAPER_ENV_9               19  /* Envelope #9 3 7/8 x 8 7/8          */
-#define PAPER_ENV_10              20  /* Envelope #10 4 1/8 x 9 1/2         */
-#define PAPER_ENV_11              21  /* Envelope #11 4 1/2 x 10 3/8        */
-#define PAPER_ENV_12              22  /* Envelope #12 4 \276 x 11           */
-#define PAPER_ENV_14              23  /* Envelope #14 5 x 11 1/2            */
-#define PAPER_CSHEET              24  /* C size sheet                       */
-#define PAPER_DSHEET              25  /* D size sheet                       */
-#define PAPER_ESHEET              26  /* E size sheet                       */
-#define PAPER_ENV_DL              27  /* Envelope DL 110 x 220mm            */
-#define PAPER_ENV_C5              28  /* Envelope C5 162 x 229 mm           */
-#define PAPER_ENV_C3              29  /* Envelope C3  324 x 458 mm          */
-#define PAPER_ENV_C4              30  /* Envelope C4  229 x 324 mm          */
-#define PAPER_ENV_C6              31  /* Envelope C6  114 x 162 mm          */
-#define PAPER_ENV_C65             32  /* Envelope C65 114 x 229 mm          */
-#define PAPER_ENV_B4              33  /* Envelope B4  250 x 353 mm          */
-#define PAPER_ENV_B5              34  /* Envelope B5  176 x 250 mm          */
-#define PAPER_ENV_B6              35  /* Envelope B6  176 x 125 mm          */
-#define PAPER_ENV_ITALY           36  /* Envelope 110 x 230 mm              */
-#define PAPER_ENV_MONARCH         37  /* Envelope Monarch 3.875 x 7.5 in    */
-#define PAPER_ENV_PERSONAL        38  /* 6 3/4 Envelope 3 5/8 x 6 1/2 in    */
-#define PAPER_FANFOLD_US          39  /* US Std Fanfold 14 7/8 x 11 in      */
-#define PAPER_FANFOLD_STD_GERMAN  40  /* German Std Fanfold 8 1/2 x 12 in   */
-#define PAPER_FANFOLD_LGL_GERMAN  41  /* German Legal Fanfold 8 1/2 x 13 in */
-
-#define PAPER_LAST                PAPER_FANFOLD_LGL_GERMAN
-#define PAPER_USER                256
-
-#define BIN_FIRST         BIN_UPPER
-#define BIN_UPPER         1
-#define BIN_ONLYONE       1
-#define BIN_LOWER         2
-#define BIN_MIDDLE        3
-#define BIN_MANUAL        4
-#define BIN_ENVELOPE      5
-#define BIN_ENVMANUAL     6
-#define BIN_AUTO          7
-#define BIN_TRACTOR       8
-#define BIN_SMALLFMT      9
-#define BIN_LARGEFMT      10
-#define BIN_LARGECAPACITY 11
-#define BIN_CASSETTE      14
-#define BIN_FORMSOURCE    15
-#define BIN_LAST          BIN_FORMSOURCE
-
-#define BIN_USER          256     /* device specific bins start here */
-
-#define RES_DRAFT         (-1)
-#define RES_LOW           (-2)
-#define RES_MEDIUM        (-3)
-#define RES_HIGH          (-4)
-
-#define COLOR_MONOCHROME  1
-#define COLOR_COLOR       2
-
-#define DUP_SIMPLEX    1
-#define DUP_VERTICAL   2
-#define DUP_HORIZONTAL 3
-
-#define TT_BITMAP     1       /* print TT fonts as graphics */
-#define TT_DOWNLOAD   2       /* download TT fonts as soft fonts */
-#define TT_SUBDEV     3       /* substitute device fonts for TT fonts */
-
-#define COLLATE_FALSE  0
-#define COLLATE_TRUE   1
-
 typedef struct nt_printer_driver_info_level_3
 {
        uint32 cversion;
@@ -243,8 +133,8 @@ typedef struct nt_printer_driver_info_level
 /* container for a single registry key */
 
 typedef struct {
-       char            *name;
-       REGVAL_CTR      *values;
+       char                    *name;
+       struct regval_ctr       *values;
 } NT_PRINTER_KEY;
 
 /* container for all printer data */
@@ -312,7 +202,7 @@ typedef struct nt_printer_info_level_2
        fstring sharename;
        fstring portname;
        fstring drivername;
-       pstring comment;
+       char comment[1024];
        fstring location;
        NT_DEVICEMODE *devmode;
        fstring sepfile;
@@ -347,28 +237,6 @@ typedef struct
 #define SAMBA_PRINTER_PORT_NAME "Samba Printer Port"
 #endif
 
-
-/*
- * Structures for the XcvDataPort() calls
- */
-
-#define PORT_PROTOCOL_DIRECT   1
-#define PORT_PROTOCOL_LPR      2
-
-typedef struct {
-       fstring name;
-       uint32 version;
-       uint32 protocol;
-       fstring hostaddr;
-       fstring snmpcommunity;
-       fstring queue;
-       uint32 dblspool;
-       fstring ipaddr;
-       uint32 port;
-       BOOL enable_snmp;
-       uint32 snmp_index;
-} NT_PORT_DATA_1;
-
 /* DOS header format */
 #define DOS_HEADER_SIZE                 64
 #define DOS_HEADER_MAGIC_OFFSET         0
@@ -448,11 +316,10 @@ typedef struct {
 /* that's the central struct */
 typedef struct _Printer{
        struct _Printer *prev, *next;
-       BOOL document_started;
-       BOOL page_started;
+       bool document_started;
+       bool page_started;
        uint32 jobid; /* jobid in printing backend */
-       BOOL printer_type;
-       TALLOC_CTX *ctx;
+       int printer_type;
        fstring servername;
        fstring sharename;
        uint32 type;
@@ -462,12 +329,12 @@ typedef struct _Printer{
                uint32 options;
                fstring localmachine;
                uint32 printerlocal;
-               SPOOL_NOTIFY_OPTION *option;
-               POLICY_HND client_hnd;
-               BOOL client_connected;
+               struct spoolss_NotifyOption *option;
+               struct policy_handle client_hnd;
+               bool client_connected;
                uint32 change;
                /* are we in a FindNextPrinterChangeNotify() call? */
-               BOOL fnpcn;
+               bool fnpcn;
        } notify;
        struct {
                fstring machine;
@@ -482,4 +349,26 @@ typedef struct _Printer{
        
 } Printer_entry;
 
+/*
+ * The printer attributes.
+ * I #defined all of them (grabbed form MSDN)
+ * I'm only using:
+ * ( SHARED | NETWORK | RAW_ONLY )
+ * RAW_ONLY _MUST_ be present otherwise NT will send an EMF file
+ */
+
+#define PRINTER_ATTRIBUTE_SAMBA                        (PRINTER_ATTRIBUTE_RAW_ONLY|\
+                                                PRINTER_ATTRIBUTE_SHARED|\
+                                                PRINTER_ATTRIBUTE_LOCAL)
+#define PRINTER_ATTRIBUTE_NOT_SAMBA            (PRINTER_ATTRIBUTE_NETWORK)
+
+#define DRIVER_ANY_VERSION             0xffffffff
+#define DRIVER_MAX_VERSION             4
+
+struct print_architecture_table_node {
+       const char      *long_archi;
+       const char      *short_archi;
+       int     version;
+};
+
 #endif /* NT_PRINTING_H_ */