[print notify fixes from APP_HEAD]
[garming/samba-autobuild/.git] / source3 / include / printing.h
index 9002fea582bc66d3cd638b211a3e9a9d5b24e3ce..1d658a07681e2330d70d1faf0d45ca72aaa8cf3b 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef PRINTING_H_
+#define PRINTING_H_
+
 /* 
    Unix SMB/CIFS implementation.
    printing definitions
@@ -33,12 +36,14 @@ struct printjob {
        time_t starttime; /* when the job started spooling */
        int status; /* the status of this job */
        size_t size; /* the size of the job so far */
+       int page_count; /* then number of pages so far */
        BOOL spooled; /* has it been sent to the spooler yet? */
        BOOL smbjob; /* set if the job is a SMB job */
        fstring filename; /* the filename used to spool the file */
        fstring jobname; /* the job name given to us by the client */
        fstring user; /* the user who started the job */
-       int snum;     /* service number of printer for this job */
+       fstring queuename; /* service number of printer for this job */
+       NT_DEVICEMODE *nt_devmode;
 };
 
 /* Information for print interfaces */
@@ -60,9 +65,29 @@ extern struct printif        generic_printif;
 extern struct printif  cups_printif;
 #endif /* HAVE_CUPS */
 
-#define PRINT_MAX_JOBID 10000
+/* PRINT_MAX_JOBID is now defined in local.h */
 #define UNIX_JOB_START PRINT_MAX_JOBID
 #define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID > 0 ? (j+1) % PRINT_MAX_JOBID : 1)
 
+#define MAX_CACHE_VALID_TIME 3600
+
 #define PRINT_SPOOL_PREFIX "smbprn."
-#define PRINT_DATABASE_VERSION 2
+#define PRINT_DATABASE_VERSION 5
+
+/* There can be this many printing tdb's open, plus any locked ones. */
+#define MAX_PRINT_DBS_OPEN 1
+
+struct tdb_print_db {
+       struct tdb_print_db *next, *prev;
+       TDB_CONTEXT *tdb;
+       int ref_count;
+       fstring printer_name;
+};
+
+/* 
+ * Used for print notify
+ */
+
+#define NOTIFY_PID_LIST_KEY "NOTIFY_PID_LIST"
+
+#endif /* PRINTING_H_ */