include/printing.h

説明を見る。
00001 #ifndef PRINTING_H_
00002 #define PRINTING_H_
00003 
00004 /* 
00005    Unix SMB/CIFS implementation.
00006    printing definitions
00007    Copyright (C) Andrew Tridgell 1992-2000
00008    
00009    This program is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; either version 2 of the License, or
00012    (at your option) any later version.
00013    
00014    This program is distributed in the hope that it will be useful,
00015    but WITHOUT ANY WARRANTY; without even the implied warranty of
00016    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017    GNU General Public License for more details.
00018    
00019    You should have received a copy of the GNU General Public License
00020    along with this program; if not, write to the Free Software
00021    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00022 */
00023 
00024 /*
00025    This file defines the low-level printing system interfaces used by the
00026    SAMBA printing subsystem.
00027 */
00028 
00029 /* Information for print jobs */
00030 struct printjob {
00031         pid_t pid; /* which process launched the job */
00032         int sysjob; /* the system (lp) job number */
00033         int fd; /* file descriptor of open file if open */
00034         time_t starttime; /* when the job started spooling */
00035         int status; /* the status of this job */
00036         size_t size; /* the size of the job so far */
00037         int page_count; /* then number of pages so far */
00038         BOOL spooled; /* has it been sent to the spooler yet? */
00039         BOOL smbjob; /* set if the job is a SMB job */
00040         fstring filename; /* the filename used to spool the file */
00041         fstring jobname; /* the job name given to us by the client */
00042         fstring user; /* the user who started the job */
00043         fstring queuename; /* service number of printer for this job */
00044         NT_DEVICEMODE *nt_devmode;
00045 };
00046 
00047 /* Information for print interfaces */
00048 struct printif
00049 {
00050   /* value of the 'printing' option for this service */
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 /* HAVE_CUPS */
00071 
00072 #ifdef HAVE_IPRINT
00073 extern struct printif   iprint_printif;
00074 #endif /* HAVE_IPRINT */
00075 
00076 #if defined(DEVELOPER) || defined(ENABLE_BUILD_FARM_HACKS)
00077 extern struct printif test_printif;
00078 #endif /* DEVELOPER||ENABLE_BUILD_FARM_HACKS */
00079 
00080 /* PRINT_MAX_JOBID is now defined in local.h */
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 /* There can be this many printing tdb's open, plus any locked ones. */
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  * Used for print notify
00103  */
00104 
00105 #define NOTIFY_PID_LIST_KEY "NOTIFY_PID_LIST"
00106 
00107 #endif /* PRINTING_H_ */

Sambaに対してSat Aug 29 21:22:54 2009に生成されました。  doxygen 1.4.7