00001 #ifndef PRINTING_H_
00002 #define PRINTING_H_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 struct printjob {
00031 pid_t pid;
00032 int sysjob;
00033 int fd;
00034 time_t starttime;
00035 int status;
00036 size_t size;
00037 int page_count;
00038 BOOL spooled;
00039 BOOL smbjob;
00040 fstring filename;
00041 fstring jobname;
00042 fstring user;
00043 fstring queuename;
00044 NT_DEVICEMODE *nt_devmode;
00045 };
00046
00047
00048 struct printif
00049 {
00050
00051 enum printing_types type;
00052
00053 int (*queue_get)(const char *printer_name,
00054 enum printing_types printing_type,
00055 char *lpq_command,
00056 print_queue_struct **q,
00057 print_status_struct *status);
00058 int (*queue_pause)(int snum);
00059 int (*queue_resume)(int snum);
00060 int (*job_delete)(const char *sharename, const char *lprm_command, struct printjob *pjob);
00061 int (*job_pause)(int snum, struct printjob *pjob);
00062 int (*job_resume)(int snum, struct printjob *pjob);
00063 int (*job_submit)(int snum, struct printjob *pjob);
00064 };
00065
00066 extern struct printif generic_printif;
00067
00068 #ifdef HAVE_CUPS
00069 extern struct printif cups_printif;
00070 #endif
00071
00072 #ifdef HAVE_IPRINT
00073 extern struct printif iprint_printif;
00074 #endif
00075
00076 #if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
00077 extern struct printif test_printif;
00078 #endif
00079
00080
00081 #define UNIX_JOB_START PRINT_MAX_JOBID
00082 #define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID > 0 ? (j+1) % PRINT_MAX_JOBID : 1)
00083
00084 #define MAX_CACHE_VALID_TIME 3600
00085
00086 #ifndef PRINT_SPOOL_PREFIX
00087 #define PRINT_SPOOL_PREFIX "smbprn."
00088 #endif
00089 #define PRINT_DATABASE_VERSION 5
00090
00091
00092 #define MAX_PRINT_DBS_OPEN 1
00093
00094 struct tdb_print_db {
00095 struct tdb_print_db *next, *prev;
00096 TDB_CONTEXT *tdb;
00097 int ref_count;
00098 fstring printer_name;
00099 };
00100
00101
00102
00103
00104
00105 #define NOTIFY_PID_LIST_KEY "NOTIFY_PID_LIST"
00106
00107 #endif