summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-02-25 20:53:53 +0000
committerGerald Carter <jerry@samba.org>2003-02-25 20:53:53 +0000
commit23b3b29eec61860155404333f6e70ebd24b50940 (patch)
treebe9a2981266cc1cce4e9144bb5a77ed0f364a830 /source3/include
parentb8fbb3189a8b55ddc87f9b52b1c00d1acbb37e72 (diff)
downloadsamba-23b3b29eec61860155404333f6e70ebd24b50940.tar.gz
samba-23b3b29eec61860155404333f6e70ebd24b50940.tar.bz2
samba-23b3b29eec61860155404333f6e70ebd24b50940.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 31272d3b6bb9ec62fd666301c7adfa0c1720a99b)
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_ */