2 Unix SMB/CIFS implementation.
4 Copyright (C) Andrew Tridgell 1992-2000
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 This file defines the low-level printing system interfaces used by the
25 SAMBA printing subsystem.
28 /* Information for print jobs */
30 pid_t pid; /* which process launched the job */
31 int sysjob; /* the system (lp) job number */
32 int fd; /* file descriptor of open file if open */
33 time_t starttime; /* when the job started spooling */
34 int status; /* the status of this job */
35 size_t size; /* the size of the job so far */
36 BOOL spooled; /* has it been sent to the spooler yet? */
37 BOOL smbjob; /* set if the job is a SMB job */
38 fstring filename; /* the filename used to spool the file */
39 fstring jobname; /* the job name given to us by the client */
40 fstring user; /* the user who started the job */
41 fstring qname; /* name of the print queue the job was sent to */
44 /* Information for print interfaces */
47 int (*queue_get)(int snum, print_queue_struct **q,
48 print_status_struct *status);
49 int (*queue_pause)(int snum);
50 int (*queue_resume)(int snum);
51 int (*job_delete)(int snum, struct printjob *pjob);
52 int (*job_pause)(int snum, struct printjob *pjob);
53 int (*job_resume)(int snum, struct printjob *pjob);
54 int (*job_submit)(int snum, struct printjob *pjob);
57 extern struct printif generic_printif;
60 extern struct printif cups_printif;
61 #endif /* HAVE_CUPS */
63 #define PRINT_MAX_JOBID 10000
64 #define UNIX_JOB_START PRINT_MAX_JOBID
65 #define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID > 0 ? (j+1) % PRINT_MAX_JOBID : 1)
67 #define PRINT_SPOOL_PREFIX "smbprn."
68 #define PRINT_DATABASE_VERSION 2