From 348b4b9bab0cd0f87860441218658802e8aba410 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 13 May 2010 16:24:35 -0400 Subject: Make pcap headers private MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/printing/load.c | 1 + source3/printing/nt_printing.c | 1 + source3/printing/pcap.c | 2 +- source3/printing/pcap.h | 52 +++++++++++++++++++++++++++++++++++++++ source3/printing/print_aix.c | 1 + source3/printing/print_cups.c | 1 + source3/printing/print_iprint.c | 1 + source3/printing/print_standard.c | 1 + source3/printing/print_svid.c | 1 + 9 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 source3/printing/pcap.h (limited to 'source3/printing') diff --git a/source3/printing/load.c b/source3/printing/load.c index fc21f271bd..d440a22ee5 100644 --- a/source3/printing/load.c +++ b/source3/printing/load.c @@ -18,6 +18,7 @@ */ #include "includes.h" +#include "pcap.h" /*************************************************************************** diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index d59e3c5ffd..a8bc577370 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -21,6 +21,7 @@ #include "includes.h" #include "librpc/gen_ndr/messaging.h" +#include "printing/pcap.h" static TDB_CONTEXT *tdb_forms; /* used for forms files */ static TDB_CONTEXT *tdb_drivers; /* used for driver files */ diff --git a/source3/printing/pcap.c b/source3/printing/pcap.c index f1cf58d6bc..2b1ab632ac 100644 --- a/source3/printing/pcap.c +++ b/source3/printing/pcap.c @@ -37,7 +37,7 @@ */ #include "includes.h" - +#include "pcap.h" struct pcap_cache { char *name; diff --git a/source3/printing/pcap.h b/source3/printing/pcap.h new file mode 100644 index 0000000000..47abc0fe6e --- /dev/null +++ b/source3/printing/pcap.h @@ -0,0 +1,52 @@ +/* + Unix SMB/CIFS implementation. + printcap headers + + 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 . +*/ + +struct pcap_cache; + +/* The following definitions come from printing/pcap.c */ + +bool pcap_cache_add_specific(struct pcap_cache **ppcache, const char *name, const char *comment); +void pcap_cache_destroy_specific(struct pcap_cache **ppcache); +bool pcap_cache_add(const char *name, const char *comment); +bool pcap_cache_loaded(void); +void pcap_cache_replace(const struct pcap_cache *cache); +void pcap_printer_fn_specific(const struct pcap_cache *, void (*fn)(const char *, const char *, void *), void *); +void pcap_printer_fn(void (*fn)(const char *, const char *, void *), void *); + +/* The following definitions come from printing/print_aix.c */ + +bool aix_cache_reload(void); + +/* The following definitions come from printing/print_cups.c */ + +bool cups_cache_reload(void); +bool cups_pull_comment_location(TALLOC_CTX *mem_ctx, + const char *printername, + char **comment, + char **location); + +/* The following definitions come from printing/print_iprint.c */ + +bool iprint_cache_reload(void); + +/* The following definitions come from printing/print_svid.c */ + +bool sysv_cache_reload(void); + +/* The following definitions come from printing/print_standard.c */ +bool std_pcap_cache_reload(const char *pcap_name); diff --git a/source3/printing/print_aix.c b/source3/printing/print_aix.c index 523be77f35..dbdfbc7a0d 100644 --- a/source3/printing/print_aix.c +++ b/source3/printing/print_aix.c @@ -25,6 +25,7 @@ */ #include "includes.h" +#include "pcap.h" #ifdef AIX bool aix_cache_reload(void) diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c index 6735f14f70..1db0518dfa 100644 --- a/source3/printing/print_cups.c +++ b/source3/printing/print_cups.c @@ -24,6 +24,7 @@ #include "includes.h" #include "printing.h" +#include "pcap.h" #ifdef HAVE_CUPS #include diff --git a/source3/printing/print_iprint.c b/source3/printing/print_iprint.c index b038f8d1fe..4f483d9d2d 100644 --- a/source3/printing/print_iprint.c +++ b/source3/printing/print_iprint.c @@ -21,6 +21,7 @@ #include "includes.h" #include "printing.h" +#include "pcap.h" #ifdef HAVE_IPRINT #include diff --git a/source3/printing/print_standard.c b/source3/printing/print_standard.c index 91d1c336e3..9945699563 100644 --- a/source3/printing/print_standard.c +++ b/source3/printing/print_standard.c @@ -55,6 +55,7 @@ #include "includes.h" +#include "pcap.h" /* handle standard printcap - moved from pcap_printer_fn() */ bool std_pcap_cache_reload(const char *pcap_name) diff --git a/source3/printing/print_svid.c b/source3/printing/print_svid.c index 681b2bf459..4d4e92e82e 100644 --- a/source3/printing/print_svid.c +++ b/source3/printing/print_svid.c @@ -32,6 +32,7 @@ #include "includes.h" +#include "pcap.h" #if defined(SYSV) || defined(HPUX) bool sysv_cache_reload(void) -- cgit