From: Francesco Chemolli Date: Mon, 20 Aug 2012 12:07:30 +0000 (+0200) Subject: Moved peer userhash prototypes to peer_userhash.h X-Git-Tag: sourceformat-review-1~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=37236ba1e39090f1dd532632b95aecd01d4572ba;p=thirdparty%2Fsquid.git Moved peer userhash prototypes to peer_userhash.h --- diff --git a/src/Makefile.am b/src/Makefile.am index c66f76bd3f..a0f2f83048 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -422,6 +422,7 @@ squid_SOURCES = \ peer_select.cc \ peer_sourcehash.h \ peer_sourcehash.cc \ + peer_userhash.h \ peer_userhash.cc \ PeerSelectState.h \ PingData.h \ @@ -1389,6 +1390,7 @@ tests_testCacheManager_SOURCES = \ peer_select.cc \ peer_sourcehash.h \ peer_sourcehash.cc \ + peer_userhash.h \ peer_userhash.cc \ redirect.cc \ refresh.h \ @@ -1737,6 +1739,7 @@ tests_testEvent_SOURCES = \ peer_select.cc \ peer_sourcehash.h \ peer_sourcehash.cc \ + peer_userhash.h \ peer_userhash.cc \ redirect.cc \ refresh.h \ @@ -1940,6 +1943,7 @@ tests_testEventLoop_SOURCES = \ peer_select.cc \ peer_sourcehash.h \ peer_sourcehash.cc \ + peer_userhash.h \ peer_userhash.cc \ RemovalPolicy.cc \ redirect.cc \ @@ -2138,6 +2142,7 @@ tests_test_http_range_SOURCES = \ peer_select.cc \ peer_sourcehash.h \ peer_sourcehash.cc \ + peer_userhash.h \ peer_userhash.cc \ pconn.cc \ redirect.cc \ @@ -2378,6 +2383,7 @@ tests_testHttpRequest_SOURCES = \ peer_select.cc \ peer_sourcehash.h \ peer_sourcehash.cc \ + peer_userhash.h \ peer_userhash.cc \ redirect.cc \ refresh.h \ @@ -3324,6 +3330,7 @@ tests_testURL_SOURCES = \ peer_select.cc \ peer_sourcehash.h \ peer_sourcehash.cc \ + peer_userhash.h \ peer_userhash.cc \ redirect.cc \ refresh.h \ diff --git a/src/main.cc b/src/main.cc index 14226062e6..460de93ef3 100644 --- a/src/main.cc +++ b/src/main.cc @@ -69,6 +69,7 @@ #include "pconn.h" #include "PeerSelectState.h" #include "peer_sourcehash.h" +#include "peer_userhash.h" #include "profiler/Profiler.h" #include "protos.h" #include "refresh.h" diff --git a/src/peer_select.cc b/src/peer_select.cc index bb6f23118d..f454c4d4f4 100644 --- a/src/peer_select.cc +++ b/src/peer_select.cc @@ -47,6 +47,7 @@ #include "ipcache.h" #include "neighbors.h" #include "peer_sourcehash.h" +#include "peer_userhash.h" #include "PeerSelectState.h" #include "protos.h" #include "SquidTime.h" diff --git a/src/peer_userhash.h b/src/peer_userhash.h new file mode 100644 index 0000000000..7d196438c0 --- /dev/null +++ b/src/peer_userhash.h @@ -0,0 +1,43 @@ +/* + * DEBUG: section + * AUTHOR: + * + * 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_PEER_USERHASH_H_ +#define SQUID_PEER_USERHASH_H_ + +class peer; +class HttpRequest; + +extern void peerUserHashInit(void); +extern peer * peerUserHashSelectParent(HttpRequest * request); + +#endif /* SQUID_PEER_USERHASH_H_ */ diff --git a/src/protos.h b/src/protos.h index 7283e2bc07..19edeaa218 100644 --- a/src/protos.h +++ b/src/protos.h @@ -472,9 +472,6 @@ SQUIDCEXTERN pid_t ipcCreate(int type, SQUIDCEXTERN void carpInit(void); SQUIDCEXTERN peer *carpSelectParent(HttpRequest *); -SQUIDCEXTERN void peerUserHashInit(void); -SQUIDCEXTERN peer * peerUserHashSelectParent(HttpRequest * request); - /* * prototypes for system functions missing from system includes */