Ignore:
Timestamp:
Nov 14, 2012, 12:59:34 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to 3.6.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source3/include/printing.h

    r414 r740  
    2626*/
    2727
     28/* Extra fields above "LPQ_PRINTING" are used to map extra NT status codes. */
     29
     30enum {
     31        LPQ_QUEUED = 0,
     32        LPQ_PAUSED,
     33        LPQ_SPOOLING,
     34        LPQ_PRINTING,
     35        LPQ_ERROR,
     36        LPQ_DELETING,
     37        LPQ_OFFLINE,
     38        LPQ_PAPEROUT,
     39        LPQ_PRINTED,
     40        LPQ_DELETED,
     41        LPQ_BLOCKED,
     42        LPQ_USER_INTERVENTION,
     43
     44        /* smbd is dooing the file spooling before passing control to spoolss */
     45        PJOB_SMBD_SPOOLING
     46};
     47
     48typedef struct _print_queue_struct {
     49        int job;                /* normally the UNIX jobid -- see note in
     50                                   printing.c:traverse_fn_delete() */
     51        int size;
     52        int page_count;
     53        int status;
     54        int priority;
     55        time_t time;
     56        fstring fs_user;
     57        fstring fs_file;
     58} print_queue_struct;
     59
     60enum {LPSTAT_OK, LPSTAT_STOPPED, LPSTAT_ERROR};
     61
     62typedef struct {
     63        fstring message;
     64        int qcount;
     65        int status;
     66}  print_status_struct;
     67
    2868/* Information for print jobs */
    2969struct printjob {
     
    4080        fstring jobname; /* the job name given to us by the client */
    4181        fstring user; /* the user who started the job */
     82        fstring clientmachine; /* The client machine which started this job */
    4283        fstring queuename; /* service number of printer for this job */
    43         NT_DEVICEMODE *nt_devmode;
     84        struct spoolss_DeviceMode *devmode;
    4485};
    4586
     
    83124#define PRINT_SPOOL_PREFIX "smbprn."
    84125#endif
    85 #define PRINT_DATABASE_VERSION 5
     126#define PRINT_DATABASE_VERSION 7
     127
     128#ifdef AIX
     129#define DEFAULT_PRINTING PRINT_AIX
     130#define PRINTCAP_NAME "/etc/qconfig"
     131#endif
     132
     133#ifdef HPUX
     134#define DEFAULT_PRINTING PRINT_HPUX
     135#endif
     136
     137#ifdef QNX
     138#define DEFAULT_PRINTING PRINT_QNX
     139#endif
     140
     141#ifndef DEFAULT_PRINTING
     142#ifdef HAVE_CUPS
     143#define DEFAULT_PRINTING PRINT_CUPS
     144#define PRINTCAP_NAME "cups"
     145#elif defined(SYSV)
     146#define DEFAULT_PRINTING PRINT_SYSV
     147#define PRINTCAP_NAME "lpstat"
     148#else
     149#define DEFAULT_PRINTING PRINT_BSD
     150#define PRINTCAP_NAME "/etc/printcap"
     151#endif
     152#endif
     153
     154#ifndef PRINTCAP_NAME
     155#define PRINTCAP_NAME "/etc/printcap"
     156#endif
    86157
    87158/* There can be this many printing tdb's open, plus any locked ones. */
    88159#define MAX_PRINT_DBS_OPEN 1
    89160
     161struct TDB_DATA;
     162struct tdb_context;
     163
    90164struct tdb_print_db {
    91165        struct tdb_print_db *next, *prev;
    92         TDB_CONTEXT *tdb;
     166        struct tdb_context *tdb;
    93167        int ref_count;
    94168        fstring printer_name;
     
    101175#define NOTIFY_PID_LIST_KEY "NOTIFY_PID_LIST"
    102176
     177/* The following definitions come from printing/printspoolss.c  */
     178
     179NTSTATUS print_spool_open(files_struct *fsp,
     180                          const char *fname,
     181                          uint16_t current_vuid);
     182
     183int print_spool_write(files_struct *fsp, const char *data, uint32_t size,
     184                      SMB_OFF_T offset, uint32_t *written);
     185
     186void print_spool_end(files_struct *fsp, enum file_close_type close_type);
     187
     188void print_spool_terminate(struct connection_struct *conn,
     189                           struct print_file_data *print_file);
     190
     191/* The following definitions come from printing/printing.c  */
     192
     193uint32 sysjob_to_jobid(int unix_jobid);
     194bool print_notify_register_pid(int snum);
     195bool print_notify_deregister_pid(int snum);
     196bool print_job_exists(const char* sharename, uint32 jobid);
     197char *print_job_fname(const char* sharename, uint32 jobid);
     198struct spoolss_DeviceMode *print_job_devmode(const char* sharename, uint32 jobid);
     199bool print_job_set_name(struct tevent_context *ev,
     200                        struct messaging_context *msg_ctx,
     201                        const char *sharename, uint32 jobid, const char *name);
     202bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t jobid, char **name);
     203WERROR print_job_delete(const struct auth_serversupplied_info *server_info,
     204                        struct messaging_context *msg_ctx,
     205                        int snum, uint32_t jobid);
     206bool print_job_pause(const struct auth_serversupplied_info *server_info,
     207                     struct messaging_context *msg_ctx,
     208                     int snum, uint32 jobid, WERROR *errcode);
     209bool print_job_resume(const struct auth_serversupplied_info *server_info,
     210                      struct messaging_context *msg_ctx,
     211                      int snum, uint32 jobid, WERROR *errcode);
     212ssize_t print_job_write(struct tevent_context *ev,
     213                        struct messaging_context *msg_ctx,
     214                        int snum, uint32 jobid, const char *buf, size_t size);
     215int print_queue_length(struct messaging_context *msg_ctx, int snum,
     216                       print_status_struct *pstatus);
     217WERROR print_job_start(const struct auth_serversupplied_info *server_info,
     218                       struct messaging_context *msg_ctx,
     219                       const char *clientmachine,
     220                       int snum, const char *docname, const char *filename,
     221                       struct spoolss_DeviceMode *devmode, uint32_t *_jobid);
     222void print_job_endpage(struct messaging_context *msg_ctx,
     223                       int snum, uint32 jobid);
     224NTSTATUS print_job_end(struct messaging_context *msg_ctx, int snum,
     225                       uint32 jobid, enum file_close_type close_type);
     226int print_queue_status(struct messaging_context *msg_ctx, int snum,
     227                       print_queue_struct **ppqueue,
     228                       print_status_struct *status);
     229WERROR print_queue_pause(const struct auth_serversupplied_info *server_info,
     230                         struct messaging_context *msg_ctx, int snum);
     231WERROR print_queue_resume(const struct auth_serversupplied_info *server_info,
     232                          struct messaging_context *msg_ctx, int snum);
     233WERROR print_queue_purge(const struct auth_serversupplied_info *server_info,
     234                         struct messaging_context *msg_ctx, int snum);
     235uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
     236bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
     237void rap_jobid_delete(const char* sharename, uint32 jobid);
     238bool print_backend_init(struct messaging_context *msg_ctx);
     239void start_background_queue(struct tevent_context *ev,
     240                            struct messaging_context *msg);
     241void printing_end(void);
     242
     243/* The following definitions come from printing/lpq_parse.c  */
     244
     245bool parse_lpq_entry(enum printing_types printing_type,char *line,
     246                     print_queue_struct *buf,
     247                     print_status_struct *status,bool first);
     248uint32_t print_parse_jobid(const char *fname);
     249
     250/* The following definitions come from printing/printing_db.c  */
     251
     252struct tdb_print_db *get_print_db_byname(const char *printername);
     253void release_print_db( struct tdb_print_db *pdb);
     254void close_all_print_db(void);
     255struct TDB_DATA get_printer_notify_pid_list(struct tdb_context *tdb, const char *printer_name, bool cleanlist);
     256
     257void print_queue_receive(struct messaging_context *msg,
     258                                void *private_data,
     259                                uint32_t msg_type,
     260                                struct server_id server_id,
     261                                DATA_BLOB *data);
    103262#endif /* PRINTING_H_ */
Note: See TracChangeset for help on using the changeset viewer.