From 23b3b29eec61860155404333f6e70ebd24b50940 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 25 Feb 2003 20:53:53 +0000 Subject: Progress on CR 601 cache the printer_info_2 with the open printer handle. cache is invalidated on a mod_a_printer() call **on that smbd**. Yes, this means that the window for admins to step on each other from different clients just got larger, but since handles a generally short lived this is probably ok. (This used to be commit 31272d3b6bb9ec62fd666301c7adfa0c1720a99b) --- source3/include/nt_printing.h | 45 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'source3/include') diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index 6d952a89a5..ca65a40d48 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -434,4 +434,49 @@ typedef struct { SPOOLSS_NOTIFY_MSG_GROUP *msg_groups; } SPOOLSS_NOTIFY_MSG_CTR; +#define PRINTER_HANDLE_IS_PRINTER 0 +#define PRINTER_HANDLE_IS_PRINTSERVER 1 + +/* structure to store the printer handles */ +/* and a reference to what it's pointing to */ +/* and the notify info asked about */ +/* that's the central struct */ +typedef struct _Printer{ + struct _Printer *prev, *next; + BOOL document_started; + BOOL page_started; + uint32 jobid; /* jobid in printing backend */ + BOOL printer_type; + TALLOC_CTX *ctx; + union { + fstring handlename; + fstring printerservername; + } dev; + uint32 type; + uint32 access_granted; + struct { + uint32 flags; + uint32 options; + fstring localmachine; + uint32 printerlocal; + SPOOL_NOTIFY_OPTION *option; + POLICY_HND client_hnd; + BOOL client_connected; + uint32 change; + /* are we in a FindNextPrinterChangeNotify() call? */ + BOOL fnpcn; + } notify; + struct { + fstring machine; + fstring user; + } client; + + /* devmode sent in the OpenPrinter() call */ + NT_DEVICEMODE *nt_devmode; + + /* cache the printer info */ + NT_PRINTER_INFO_LEVEL *printer_info; + +} Printer_entry; + #endif /* NT_PRINTING_H_ */ -- cgit