s3-printing: only include printing where really needed.
authorGünther Deschner <gd@samba.org>
Tue, 22 Feb 2011 18:24:31 +0000 (19:24 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 22 Feb 2011 20:52:18 +0000 (21:52 +0100)
Guenther

source3/include/printing.h
source3/include/proto.h
source3/printing/load.c
source3/printing/load.h [new file with mode: 0644]
source3/smbd/lanman.c
source3/smbd/server.c
source3/smbd/server_exit.c
source3/smbd/server_reload.c
source3/web/swat.c

index 9f0fcde28ad2c2f62eb0f3270302f7915cbed457..0316eb58c911d10a20f862c29c58a857251ae590 100644 (file)
@@ -101,6 +101,8 @@ struct tdb_print_db {
 
 #define NOTIFY_PID_LIST_KEY "NOTIFY_PID_LIST"
 
+/* The following definitions come from printing/printspoolss.c  */
+
 NTSTATUS print_spool_open(files_struct *fsp,
                          const char *fname,
                          uint16_t current_vuid);
@@ -157,5 +159,26 @@ WERROR print_queue_resume(const struct auth_serversupplied_info *server_info,
                          struct messaging_context *msg_ctx, int snum);
 WERROR print_queue_purge(const struct auth_serversupplied_info *server_info,
                         struct messaging_context *msg_ctx, int snum);
+uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
+bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
+void rap_jobid_delete(const char* sharename, uint32 jobid);
+bool print_backend_init(struct messaging_context *msg_ctx);
+void start_background_queue(struct tevent_context *ev,
+                           struct messaging_context *msg);
+void printing_end(void);
+
+/* The following definitions come from printing/lpq_parse.c  */
+
+bool parse_lpq_entry(enum printing_types printing_type,char *line,
+                    print_queue_struct *buf,
+                    print_status_struct *status,bool first);
+uint32_t print_parse_jobid(const char *fname);
+
+/* The following definitions come from printing/printing_db.c  */
+
+struct tdb_print_db *get_print_db_byname(const char *printername);
+void release_print_db( struct tdb_print_db *pdb);
+void close_all_print_db(void);
+TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist);
 
 #endif /* PRINTING_H_ */
index 8770145ef171135335b46355c9504afdc0aad44a..69585182ebed1ba808282d672b39ddff201312c1 100644 (file)
@@ -3948,35 +3948,6 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
 bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
                           struct dom_sid *sid, const char **domain);
 
-/* The following definitions come from printing/load.c  */
-
-void load_printers(struct tevent_context *ev,
-                  struct messaging_context *msg_ctx);
-
-/* The following definitions come from printing/lpq_parse.c  */
-
-bool parse_lpq_entry(enum printing_types printing_type,char *line,
-                    print_queue_struct *buf,
-                    print_status_struct *status,bool first);
-uint32_t print_parse_jobid(const char *fname);
-
-/* The following definitions come from printing/printing.c  */
-
-uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
-bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
-void rap_jobid_delete(const char* sharename, uint32 jobid);
-bool print_backend_init(struct messaging_context *msg_ctx);
-void start_background_queue(struct tevent_context *ev,
-                           struct messaging_context *msg);
-void printing_end(void);
-
-/* The following definitions come from printing/printing_db.c  */
-
-struct tdb_print_db *get_print_db_byname(const char *printername);
-void release_print_db( struct tdb_print_db *pdb);
-void close_all_print_db(void);
-TDB_DATA get_printer_notify_pid_list(TDB_CONTEXT *tdb, const char *printer_name, bool cleanlist);
-
 /* The following definitions come from profile/profile.c  */
 
 void set_profile_level(int level, struct server_id src);
index 66c3ffd22c0120e9626190f776ac76d9a3145917..5acc25833d0c2d94a0cc6d7afc02a44e1c5b6a69 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "includes.h"
 #include "printing/pcap.h"
-
+#include "printing/load.h"
 
 /***************************************************************************
 auto-load some homes and printer services
diff --git a/source3/printing/load.h b/source3/printing/load.h
new file mode 100644 (file)
index 0000000..df401a4
--- /dev/null
@@ -0,0 +1,4 @@
+/* The following definitions come from printing/load.c  */
+
+void load_printers(struct tevent_context *ev,
+                  struct messaging_context *msg_ctx);
index 259da3dc46b3dc4e32204ca8a79fd4498d7a3d39..64e0439557dab6c2d405a45a20a2e86b65373c17 100644 (file)
@@ -40,6 +40,7 @@
 #include "rpc_client/init_lsa.h"
 #include "rpc_server/rpc_ncacn_np.h"
 #include "../libcli/security/security.h"
+#include "printing.h"
 
 #ifdef CHECK_TYPES
 #undef CHECK_TYPES
index 965a0e81f7b0d8ca42556c931d7cdd4ed225d932..81283f0ec956551fb6f59dd6c2652be348a4639d 100644 (file)
@@ -34,6 +34,7 @@
 #include "printing/printer_list.h"
 #include "rpc_server/rpc_ep_setup.h"
 #include "printing/pcap.h"
+#include "printing.h"
 
 #ifdef WITH_DFS
 extern int dcelogin_atmost_once;
index 43626ae862c78addb795cf1226b83392ffb217ef..72bac8b1277f54c14733998d5c35c4151822cb59 100644 (file)
@@ -41,6 +41,7 @@
 #include "../librpc/gen_ndr/srv_winreg.h"
 #include "../librpc/gen_ndr/srv_wkssvc.h"
 #include "printing/notify.h"
+#include "printing.h"
 
 static struct files_struct *log_writeable_file_fn(
        struct files_struct *fsp, void *private_data)
index f60130bd11ecace8d4b82184142bcd23e24b5509..e4b039d18929710cd697c68412f2b1abbc66aa0d 100644 (file)
@@ -26,6 +26,7 @@
 #include "librpc/gen_ndr/messaging.h"
 #include "nt_printing.h"
 #include "printing/pcap.h"
+#include "printing/load.h"
 
 /****************************************************************************
  purge stale printers and reload from pre-populated pcap cache
index 93fe36827c8036c971527a20d1c939c2941eaf4c..00fbb878562cb4bb3fdee967db935efeb0358ed5 100644 (file)
@@ -31,6 +31,7 @@
 #include "popt_common.h"
 #include "web/swat_proto.h"
 #include "printing/pcap.h"
+#include "printing/load.h"
 
 static int demo_mode = False;
 static int passwd_only = False;