summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-02-25 20:51:23 +0000
committerGerald Carter <jerry@samba.org>2003-02-25 20:51:23 +0000
commit7c7d796b6d292a7c98b099ad1e1adbc4f2363512 (patch)
treecbd12e1a85aa8f470a598e87be47c7be097895fe /source3/include
parent3a2f56cb630a7566ef0a70052b3102651bf653cc (diff)
downloadsamba-7c7d796b6d292a7c98b099ad1e1adbc4f2363512.tar.gz
samba-7c7d796b6d292a7c98b099ad1e1adbc4f2363512.tar.bz2
samba-7c7d796b6d292a7c98b099ad1e1adbc4f2363512.zip
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 33c7b7522504fb15989f32add8e9a087c8d9d0fa)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/nt_printing.h45
1 files changed, 45 insertions, 0 deletions
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_ */