diff options
author | Simo Sorce <idra@samba.org> | 2010-06-30 15:11:41 -0400 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2010-09-10 15:49:03 +0200 |
commit | 4a8d042afa41510b557e13b2aafcff611a137f28 (patch) | |
tree | ce9c881e824ce1870267ee9e21f58ea7d97eb3df /source3 | |
parent | e257e68b4bcd49c6401b0982e71f3f3085711750 (diff) | |
download | samba-4a8d042afa41510b557e13b2aafcff611a137f28.tar.gz samba-4a8d042afa41510b557e13b2aafcff611a137f28.tar.bz2 samba-4a8d042afa41510b557e13b2aafcff611a137f28.zip |
s3-spoolss: Move Printer_entry to srv_spoolss_nt.c
It is used only there, and it is a good idea to make this one private and
opaque to the rest of the code.
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/nt_printing.h | 40 | ||||
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 44 |
2 files changed, 44 insertions, 40 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h index f56ddcbf67..52b11fe762 100644 --- a/source3/include/nt_printing.h +++ b/source3/include/nt_printing.h @@ -162,46 +162,6 @@ typedef struct { #define SPLHND_PORTMON_TCP 3 #define SPLHND_PORTMON_LOCAL 4 -/* 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; - /* * The printer attributes. * I #defined all of them (grabbed form MSDN) 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 { |