summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 181868d186..99f2ca1a24 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -57,6 +57,50 @@
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
+#ifndef MAX_OPEN_PRINTER_EXS
+#define MAX_OPEN_PRINTER_EXS 50
+#endif
+
+/* 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 */
+ int printer_type;
+ fstring servername;
+ fstring sharename;
+ uint32 type;
+ uint32 access_granted;
+ struct {
+ uint32 flags;
+ uint32 options;
+ fstring localmachine;
+ uint32 printerlocal;
+ struct spoolss_NotifyOption *option;
+ struct policy_handle client_hnd;
+ bool client_connected;
+ uint32 change;
+ /* are we in a FindNextPrinterChangeNotify() call? */
+ bool fnpcn;
+ struct messaging_context *msg_ctx;
+ } notify;
+ struct {
+ fstring machine;
+ fstring user;
+ } client;
+
+ /* devmode sent in the OpenPrinter() call */
+ struct spoolss_DeviceMode *devmode;
+
+ /* TODO cache the printer info2 structure */
+ struct spoolss_PrinterInfo2 *info2;
+
+} Printer_entry;
+
static Printer_entry *printers_list;
struct printer_session_counter {