s3-printing: isolate print notification prototypes better.
authorGünther Deschner <gd@samba.org>
Tue, 22 Feb 2011 09:28:29 +0000 (10:28 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 22 Feb 2011 20:52:18 +0000 (21:52 +0100)
Guenther

source3/include/proto.h
source3/printing/notify.c
source3/printing/notify.h [new file with mode: 0644]
source3/printing/printing.c
source3/rpc_server/spoolss/srv_spoolss_nt.c
source3/smbd/server_exit.c
source3/utils/smbcontrol.c

index 30774c7f181f13fd4319c54d487a9c61821903fd..cd2740f8407d9b1be4f3db55661f12bb1db129f7 100644 (file)
@@ -3960,69 +3960,6 @@ bool parse_lpq_entry(enum printing_types printing_type,char *line,
                     print_status_struct *status,bool first);
 uint32_t print_parse_jobid(const char *fname);
 
-/* The following definitions come from printing/notify.c  */
-
-int print_queue_snum(const char *qname);
-void print_notify_send_messages(struct messaging_context *msg_ctx,
-                               unsigned int timeout);
-void notify_printer_status_byname(struct tevent_context *ev,
-                                 struct messaging_context *msg_ctx,
-                                 const char *sharename, uint32 status);
-void notify_printer_status(struct tevent_context *ev,
-                          struct messaging_context *msg_ctx,
-                          int snum, uint32 status);
-void notify_job_status_byname(struct tevent_context *ev,
-                             struct messaging_context *msg_ctx,
-                             const char *sharename, uint32 jobid,
-                             uint32 status,
-                             uint32 flags);
-void notify_job_status(struct tevent_context *ev,
-                      struct messaging_context *msg_ctx,
-                      const char *sharename, uint32 jobid, uint32 status);
-void notify_job_total_bytes(struct tevent_context *ev,
-                           struct messaging_context *msg_ctx,
-                           const char *sharename, uint32 jobid,
-                           uint32 size);
-void notify_job_total_pages(struct tevent_context *ev,
-                           struct messaging_context *msg_ctx,
-                           const char *sharename, uint32 jobid,
-                           uint32 pages);
-void notify_job_username(struct tevent_context *ev,
-                        struct messaging_context *msg_ctx,
-                        const char *sharename, uint32 jobid, char *name);
-void notify_job_name(struct tevent_context *ev,
-                    struct messaging_context *msg_ctx,
-                    const char *sharename, uint32 jobid, char *name);
-void notify_job_submitted(struct tevent_context *ev,
-                         struct messaging_context *msg_ctx,
-                         const char *sharename, uint32 jobid,
-                         time_t submitted);
-void notify_printer_driver(struct tevent_context *ev,
-                          struct messaging_context *msg_ctx,
-                          int snum, const char *driver_name);
-void notify_printer_comment(struct tevent_context *ev,
-                           struct messaging_context *msg_ctx,
-                           int snum, const char *comment);
-void notify_printer_sharename(struct tevent_context *ev,
-                             struct messaging_context *msg_ctx,
-                             int snum, const char *share_name);
-void notify_printer_printername(struct tevent_context *ev,
-                               struct messaging_context *msg_ctx,
-                               int snum, const char *printername);
-void notify_printer_port(struct tevent_context *ev,
-                        struct messaging_context *msg_ctx,
-                        int snum, const char *port_name);
-void notify_printer_location(struct tevent_context *ev,
-                            struct messaging_context *msg_ctx,
-                            int snum, const char *location);
-void notify_printer_byname(struct tevent_context *ev,
-                          struct messaging_context *msg_ctx,
-                          const char *printername, uint32 change,
-                          const char *value);
-void notify_printer_sepfile(struct tevent_context *ev,
-                           struct messaging_context *msg_ctx,
-                           int snum, const char *sepfile);
-
 /* The following definitions come from printing/pcap.c  */
 
 void pcap_cache_reload(struct tevent_context *ev,
index 84a979e1b276cba161fc48236446f4f1e6326506..f1a7e4f928cc40a9002692233e05b0a3153ccb84 100644 (file)
@@ -24,6 +24,7 @@
 #include "librpc/gen_ndr/messaging.h"
 #include "../librpc/gen_ndr/spoolss.h"
 #include "nt_printing.h"
+#include "printing/notify.h"
 
 static TALLOC_CTX *send_ctx;
 
diff --git a/source3/printing/notify.h b/source3/printing/notify.h
new file mode 100644 (file)
index 0000000..f3b9fe4
--- /dev/null
@@ -0,0 +1,87 @@
+#ifndef _PRINTING_NOTIFY_H_
+#define _PRINTING_NOTIFY_H_
+
+/*
+   Unix SMB/Netbios implementation.
+   Version 3.0
+   printing backend routines
+   Copyright (C) Tim Potter, 2002
+   Copyright (C) Gerald Carter,         2002
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* The following definitions come from printing/notify.c  */
+
+int print_queue_snum(const char *qname);
+void print_notify_send_messages(struct messaging_context *msg_ctx,
+                               unsigned int timeout);
+void notify_printer_status_byname(struct tevent_context *ev,
+                                 struct messaging_context *msg_ctx,
+                                 const char *sharename, uint32 status);
+void notify_printer_status(struct tevent_context *ev,
+                          struct messaging_context *msg_ctx,
+                          int snum, uint32 status);
+void notify_job_status_byname(struct tevent_context *ev,
+                             struct messaging_context *msg_ctx,
+                             const char *sharename, uint32 jobid,
+                             uint32 status,
+                             uint32 flags);
+void notify_job_status(struct tevent_context *ev,
+                      struct messaging_context *msg_ctx,
+                      const char *sharename, uint32 jobid, uint32 status);
+void notify_job_total_bytes(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           const char *sharename, uint32 jobid,
+                           uint32 size);
+void notify_job_total_pages(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           const char *sharename, uint32 jobid,
+                           uint32 pages);
+void notify_job_username(struct tevent_context *ev,
+                        struct messaging_context *msg_ctx,
+                        const char *sharename, uint32 jobid, char *name);
+void notify_job_name(struct tevent_context *ev,
+                    struct messaging_context *msg_ctx,
+                    const char *sharename, uint32 jobid, char *name);
+void notify_job_submitted(struct tevent_context *ev,
+                         struct messaging_context *msg_ctx,
+                         const char *sharename, uint32 jobid,
+                         time_t submitted);
+void notify_printer_driver(struct tevent_context *ev,
+                          struct messaging_context *msg_ctx,
+                          int snum, const char *driver_name);
+void notify_printer_comment(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           int snum, const char *comment);
+void notify_printer_sharename(struct tevent_context *ev,
+                             struct messaging_context *msg_ctx,
+                             int snum, const char *share_name);
+void notify_printer_printername(struct tevent_context *ev,
+                               struct messaging_context *msg_ctx,
+                               int snum, const char *printername);
+void notify_printer_port(struct tevent_context *ev,
+                        struct messaging_context *msg_ctx,
+                        int snum, const char *port_name);
+void notify_printer_location(struct tevent_context *ev,
+                            struct messaging_context *msg_ctx,
+                            int snum, const char *location);
+void notify_printer_byname(struct tevent_context *ev,
+                          struct messaging_context *msg_ctx,
+                          const char *printername, uint32 change,
+                          const char *value);
+void notify_printer_sepfile(struct tevent_context *ev,
+                           struct messaging_context *msg_ctx,
+                           int snum, const char *sepfile);
+#endif
index ee0a1004e080395546ef95bfc223067de34306c3..0e2655a3f1d5e54375e5b946dbd040a52392a952 100644 (file)
@@ -25,6 +25,7 @@
 #include "../librpc/gen_ndr/ndr_spoolss.h"
 #include "nt_printing.h"
 #include "../librpc/gen_ndr/netlogon.h"
+#include "printing/notify.h"
 
 extern struct current_user current_user;
 extern userdom_struct current_user_info;
index a303a7a321bc450c76bf0ba86e605cfba6218cb4..8d8dd6117640c5cdc0e96339d7964c07867ace3f 100644 (file)
@@ -42,6 +42,7 @@
 #include "secrets.h"
 #include "../librpc/gen_ndr/netlogon.h"
 #include "rpc_misc.h"
+#include "printing/notify.h"
 
 /* macros stolen from s4 spoolss server */
 #define SPOOLSS_BUFFER_UNION(fn,info,level) \
index ca906fad4d4ca56ea96a915cde20578cc442816e..43626ae862c78addb795cf1226b83392ffb217ef 100644 (file)
@@ -40,6 +40,7 @@
 #include "../librpc/gen_ndr/srv_svcctl.h"
 #include "../librpc/gen_ndr/srv_winreg.h"
 #include "../librpc/gen_ndr/srv_wkssvc.h"
+#include "printing/notify.h"
 
 static struct files_struct *log_writeable_file_fn(
        struct files_struct *fsp, void *private_data)
index f4daf830885a958e85533c3868754a5e9912b127..378534d87a94fb21f6fac46fbb3d7ab412211eb1 100644 (file)
@@ -28,6 +28,7 @@
 #include "librpc/gen_ndr/messaging.h"
 #include "librpc/gen_ndr/spoolss.h"
 #include "nt_printing.h"
+#include "printing/notify.h"
 
 #if HAVE_LIBUNWIND_H
 #include <libunwind.h>