From 1c7ae5ffd831a61fd5f63acfc7fbc8798511b7e2 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Tue, 21 Aug 2012 08:17:36 +0200 Subject: [PATCH] Moved log/access_log.cc prototypes to log/access_log.h --- src/Makefile.am | 8 +++++++ src/client_db.cc | 1 + src/client_side.cc | 1 + src/client_side_reply.cc | 1 + src/client_side_request.cc | 1 + src/esi/Include.cc | 1 + src/http.cc | 1 + src/log/Makefile.am | 1 + src/log/access_log.cc | 1 + src/log/access_log.h | 46 ++++++++++++++++++++++++++++++++++++++ src/protos.h | 9 -------- 11 files changed, 62 insertions(+), 9 deletions(-) create mode 100644 src/log/access_log.h diff --git a/src/Makefile.am b/src/Makefile.am index ae82d0d910..3df15313fb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1110,6 +1110,7 @@ tests_testHttpReply_SOURCES=\ SquidString.h \ SquidTime.h \ String.cc \ + log/access_log.h \ tests/stub_access_log.cc \ tests/stub_cache_cf.cc \ tests/stub_cache_manager.cc \ @@ -1211,6 +1212,7 @@ tests_testACLMaxUserIP_SOURCES= \ swap_log_op.h \ SwapDir.cc \ SwapDir.h \ + log/access_log.h \ tests/stub_access_log.cc \ tests/stub_cache_cf.cc \ tests/stub_debug.cc \ @@ -1573,6 +1575,7 @@ tests_testDiskIO_SOURCES = \ store.cc \ String.cc \ SwapDir.cc \ + log/access_log.h \ tests/stub_access_log.cc \ tests/stub_acl.cc \ tests/stub_cache_cf.cc \ @@ -2585,6 +2588,7 @@ tests_testStore_SOURCES= \ String.cc \ SwapDir.cc \ tests/CapturingStoreEntry.h \ + log/access_log.h \ tests/stub_access_log.cc \ tests/stub_acl.cc \ tests/stub_cache_cf.cc \ @@ -2820,6 +2824,7 @@ tests_testUfs_SOURCES = \ ETag.cc \ tests/stub_errorpage.cc \ tests/stub_HttpRequest.cc \ + log/access_log.h \ tests/stub_access_log.cc \ refresh.h \ refresh.cc \ @@ -2943,6 +2948,7 @@ tests_testRock_SOURCES = \ tests/testRock.h \ tests/testStoreSupport.cc \ tests/testStoreSupport.h \ + log/access_log.h \ tests/stub_access_log.cc \ tests/stub_cache_cf.cc \ tests/stub_cache_manager.cc \ @@ -3101,6 +3107,7 @@ tests_testCoss_SOURCES = \ tests/stub_StatHist.cc \ tests/stub_errorpage.cc \ tests/stub_HttpRequest.cc \ + log/access_log.h \ tests/stub_access_log.cc \ refresh.h \ refresh.cc \ @@ -3244,6 +3251,7 @@ tests_testNull_SOURCES = \ tests/stub_StatHist.cc \ tests/stub_errorpage.cc \ tests/stub_HttpRequest.cc \ + log/access_log.h \ tests/stub_access_log.cc \ refresh.h \ refresh.cc \ diff --git a/src/client_db.cc b/src/client_db.cc index 38d76cb122..d3eb6e6ab4 100644 --- a/src/client_db.cc +++ b/src/client_db.cc @@ -39,6 +39,7 @@ #include "ClientInfo.h" #include "fqdncache.h" #include "ip/Address.h" +#include "log/access_log.h" #include "Mem.h" #include "mgr/Registration.h" #include "protos.h" diff --git a/src/client_side.cc b/src/client_side.cc index 5c358896f4..a607cb357c 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -112,6 +112,7 @@ #include "internal.h" #include "ipc/FdNotes.h" #include "ipc/StartListening.h" +#include "log/access_log.h" #include "Mem.h" #include "MemBuf.h" #include "MemObject.h" diff --git a/src/client_side_reply.cc b/src/client_side_reply.cc index 68faaae426..75eff7c1ba 100644 --- a/src/client_side_reply.cc +++ b/src/client_side_reply.cc @@ -49,6 +49,7 @@ #include "HttpRequest.h" #include "ip/QosConfig.h" #include "ipcache.h" +#include "log/access_log.h" #include "MemObject.h" #include "neighbors.h" #include "protos.h" diff --git a/src/client_side_request.cc b/src/client_side_request.cc index b80142a503..8f8cff7dac 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -64,6 +64,7 @@ #include "HttpRequest.h" #include "ipcache.h" #include "ip/QosConfig.h" +#include "log/access_log.h" #include "MemObject.h" #include "profiler/Profiler.h" #include "protos.h" diff --git a/src/esi/Include.cc b/src/esi/Include.cc index 523b5420bd..1b65dc0493 100644 --- a/src/esi/Include.cc +++ b/src/esi/Include.cc @@ -45,6 +45,7 @@ #include "esi/Include.h" #include "esi/VarState.h" #include "HttpReply.h" +#include "log/access_log.h" #include "protos.h" CBDATA_CLASS_INIT (ESIStreamContext); diff --git a/src/http.cc b/src/http.cc index c3974b2205..a679c71c06 100644 --- a/src/http.cc +++ b/src/http.cc @@ -57,6 +57,7 @@ #include "HttpHdrScTarget.h" #include "HttpReply.h" #include "HttpRequest.h" +#include "log/access_log.h" #include "MemBuf.h" #include "MemObject.h" #include "neighbors.h" diff --git a/src/log/Makefile.am b/src/log/Makefile.am index 48a083b603..5018962d74 100644 --- a/src/log/Makefile.am +++ b/src/log/Makefile.am @@ -4,6 +4,7 @@ include $(top_srcdir)/src/TestHeaders.am noinst_LTLIBRARIES = liblog.la liblog_la_SOURCES = \ + access_log.h \ access_log.cc \ Config.cc \ Config.h \ diff --git a/src/log/access_log.cc b/src/log/access_log.cc index b30d9eefd4..8956988e40 100644 --- a/src/log/access_log.cc +++ b/src/log/access_log.cc @@ -52,6 +52,7 @@ #include "hier_code.h" #include "HttpReply.h" #include "HttpRequest.h" +#include "log/access_log.h" #include "log/Config.h" #include "log/File.h" #include "log/Formats.h" diff --git a/src/log/access_log.h b/src/log/access_log.h new file mode 100644 index 0000000000..1c39737fb0 --- /dev/null +++ b/src/log/access_log.h @@ -0,0 +1,46 @@ +/* + * access_log.h + * + * SQUID Web Proxy Cache http://www.squid-cache.org/ + * ---------------------------------------------------------- + * + * Squid is the result of efforts by numerous individuals from + * the Internet community; see the CONTRIBUTORS file for full + * details. Many organizations have provided support for Squid's + * development; see the SPONSORS file for full details. Squid is + * Copyrighted (C) 2001 by the Regents of the University of + * California; see the COPYRIGHT file for full details. Squid + * incorporates software developed and/or copyrighted by other + * sources; see the CREDITS file for full details. + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. + * + */ + +#ifndef SQUID_LOG_ACCESS_LOG_H_ +#define SQUID_LOG_ACCESS_LOG_H_ + + +extern int logTypeIsATcpHit(log_type); +extern void fvdbCountVia(const char *key); +extern void fvdbCountForw(const char *key); + +#if HEADERS_LOG +class HttpRequestMethod; +extern void headersLog(int cs, int pq, const HttpRequestMethod& m, void *data); +#endif + + +#endif /* SQUID_LOG_ACCESS_LOG_H_ */ diff --git a/src/protos.h b/src/protos.h index d230650402..287ebe0785 100644 --- a/src/protos.h +++ b/src/protos.h @@ -52,15 +52,6 @@ class ClientInfo; #endif -#if USE_FORW_VIA_DB -extern void fvdbCountVia(const char *key); -extern void fvdbCountForw(const char *key); -#endif -#if HEADERS_LOG -SQUIDCEXTERN void headersLog(int cs, int pq, const HttpRequestMethod& m, void *data); -#endif -extern int logTypeIsATcpHit(log_type); - /* * cache_cf.c */ -- 2.47.2