add another registry rpc (opnum 0x14). Have no idea what it's real name
[Samba.git] / source / include / printing.h
blobecf603b8fcc9f35db321db98c6be88285f757a60
1 #ifndef PRINTING_H_
2 #define PRINTING_H_
4 /*
5 Unix SMB/CIFS implementation.
6 printing definitions
7 Copyright (C) Andrew Tridgell 1992-2000
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #include "includes.h"
27 This file defines the low-level printing system interfaces used by the
28 SAMBA printing subsystem.
31 /* Information for print jobs */
32 struct printjob {
33 pid_t pid; /* which process launched the job */
34 int sysjob; /* the system (lp) job number */
35 int fd; /* file descriptor of open file if open */
36 time_t starttime; /* when the job started spooling */
37 int status; /* the status of this job */
38 size_t size; /* the size of the job so far */
39 int page_count; /* then number of pages so far */
40 BOOL spooled; /* has it been sent to the spooler yet? */
41 BOOL smbjob; /* set if the job is a SMB job */
42 fstring filename; /* the filename used to spool the file */
43 fstring jobname; /* the job name given to us by the client */
44 fstring user; /* the user who started the job */
45 fstring queuename; /* service number of printer for this job */
48 /* Information for print interfaces */
49 struct printif
51 int (*queue_get)(int snum, print_queue_struct **q,
52 print_status_struct *status);
53 int (*queue_pause)(int snum);
54 int (*queue_resume)(int snum);
55 int (*job_delete)(int snum, struct printjob *pjob);
56 int (*job_pause)(int snum, struct printjob *pjob);
57 int (*job_resume)(int snum, struct printjob *pjob);
58 int (*job_submit)(int snum, struct printjob *pjob);
61 extern struct printif generic_printif;
63 #ifdef HAVE_CUPS
64 extern struct printif cups_printif;
65 #endif /* HAVE_CUPS */
67 #define PRINT_MAX_JOBID 10000
68 #define UNIX_JOB_START PRINT_MAX_JOBID
69 #define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID > 0 ? (j+1) % PRINT_MAX_JOBID : 1)
71 #define MAX_CACHE_VALID_TIME 3600
73 #define PRINT_SPOOL_PREFIX "smbprn."
74 #define PRINT_DATABASE_VERSION 5
76 #endif /* PRINTING_H_ */