From: Francesco Chemolli Date: Mon, 20 Aug 2012 17:07:54 +0000 (+0200) Subject: Moved store_key_md5.cc prototypes to store_key_md5.h X-Git-Tag: sourceformat-review-1~81 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb548aafe9b04844a28ade39fe6beae5047e3501;p=thirdparty%2Fsquid.git Moved store_key_md5.cc prototypes to store_key_md5.h --- diff --git a/src/CacheDigest.cc b/src/CacheDigest.cc index 5059ccffb0..7f401b01be 100644 --- a/src/CacheDigest.cc +++ b/src/CacheDigest.cc @@ -39,6 +39,7 @@ #include "protos.h" #include "StatCounters.h" #include "Store.h" +#include "store_key_md5.h" #if USE_CACHE_DIGESTS diff --git a/src/Makefile.am b/src/Makefile.am index 36740cd918..ae82d0d910 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -462,6 +462,7 @@ squid_SOURCES = \ StoreClient.h \ store_digest.cc \ store_dir.cc \ + store_key_md5.h \ store_key_md5.cc \ store_log.cc \ store_rebuild.cc \ @@ -690,6 +691,7 @@ ufsdump_SOURCES = \ MemBuf.cci \ MemBuf.h \ Parsing.h \ + store_key_md5.h \ store_key_md5.cc \ StoreMeta.cc \ StoreMetaMD5.cc \ @@ -1203,6 +1205,7 @@ tests_testACLMaxUserIP_SOURCES= \ StoreMetaURL.cc \ StoreMetaVary.cc \ StoreSwapLogData.cc \ + store_key_md5.h \ store_key_md5.cc \ swap_log_op.cc \ swap_log_op.h \ @@ -1423,6 +1426,7 @@ tests_testCacheManager_SOURCES = \ store_digest.cc \ store_dir.cc \ store_io.cc \ + store_key_md5.h \ store_key_md5.cc \ store_log.cc \ store_rebuild.cc \ @@ -1562,6 +1566,7 @@ tests_testDiskIO_SOURCES = \ StoreSwapLogData.cc \ store_dir.cc \ store_io.cc \ + store_key_md5.h \ store_key_md5.cc \ store_swapout.cc \ store_swapmeta.cc \ @@ -1778,6 +1783,7 @@ tests_testEvent_SOURCES = \ store_digest.cc \ store_dir.cc \ store_io.cc \ + store_key_md5.h \ store_key_md5.cc \ store_log.cc \ store_rebuild.cc \ @@ -1987,6 +1993,7 @@ tests_testEventLoop_SOURCES = \ store_digest.cc \ store_dir.cc \ store_io.cc \ + store_key_md5.h \ store_key_md5.cc \ store_log.cc \ store_rebuild.cc \ @@ -2190,6 +2197,7 @@ tests_test_http_range_SOURCES = \ store_client.cc \ store_digest.cc \ store_dir.cc \ + store_key_md5.h \ store_key_md5.cc \ store_io.cc \ store_log.cc \ @@ -2437,6 +2445,7 @@ tests_testHttpRequest_SOURCES = \ store_digest.cc \ store_dir.cc \ store_io.cc \ + store_key_md5.h \ store_key_md5.cc \ store_log.cc \ store_rebuild.cc \ @@ -2571,6 +2580,7 @@ tests_testStore_SOURCES= \ StoreMetaURL.cc \ StoreMetaVary.cc \ StoreSwapLogData.cc \ + store_key_md5.h \ store_key_md5.cc \ String.cc \ SwapDir.cc \ @@ -2771,6 +2781,7 @@ tests_testUfs_SOURCES = \ store_dir.cc \ store.cc \ HttpRequestMethod.cc \ + store_key_md5.h \ store_key_md5.cc \ Parsing.cc \ ConfigOption.cc \ @@ -2921,6 +2932,7 @@ tests_testRock_SOURCES = \ StoreSwapLogData.cc \ store_dir.cc \ store_io.cc \ + store_key_md5.h \ store_key_md5.cc \ store_swapmeta.cc \ store_swapout.cc \ @@ -3053,6 +3065,7 @@ tests_testCoss_SOURCES = \ store_dir.cc \ store.cc \ HttpRequestMethod.cc \ + store_key_md5.h \ store_key_md5.cc \ Parsing.cc \ ConfigOption.cc \ @@ -3193,6 +3206,7 @@ tests_testNull_SOURCES = \ store_dir.cc \ store.cc \ HttpRequestMethod.cc \ + store_key_md5.h \ store_key_md5.cc \ Parsing.cc \ ConfigOption.cc \ @@ -3400,6 +3414,7 @@ tests_testURL_SOURCES = \ store_digest.cc \ store_dir.cc \ store_io.cc \ + store_key_md5.h \ store_key_md5.cc \ store_log.cc \ store_rebuild.cc \ diff --git a/src/fs/coss/store_dir_coss.cc b/src/fs/coss/store_dir_coss.cc index 5a83b4449f..36ad8a18fc 100644 --- a/src/fs/coss/store_dir_coss.cc +++ b/src/fs/coss/store_dir_coss.cc @@ -47,6 +47,7 @@ #include "ConfigOption.h" #include "StoreFScoss.h" #include "Parsing.h" +#include "store_key_md5.h" #include "swap_log_op.h" #include "SquidMath.h" diff --git a/src/fs/ufs/RebuildState.cc b/src/fs/ufs/RebuildState.cc index 976b276ad8..f0c5767e26 100644 --- a/src/fs/ufs/RebuildState.cc +++ b/src/fs/ufs/RebuildState.cc @@ -35,6 +35,7 @@ #include "protos.h" #include "RebuildState.h" #include "SquidTime.h" +#include "store_key_md5.h" #include "StoreSwapLogData.h" #include "UFSSwapLogParser.h" diff --git a/src/fs/ufs/UFSSwapDir.cc b/src/fs/ufs/UFSSwapDir.cc index a1c2fff98d..84d6629f73 100644 --- a/src/fs/ufs/UFSSwapDir.cc +++ b/src/fs/ufs/UFSSwapDir.cc @@ -42,6 +42,7 @@ #include "RebuildState.h" #include "SquidMath.h" #include "DiskIO/DiskIOStrategy.h" +#include "store_key_md5.h" #include "StoreSearchUFS.h" #include "StoreSwapLogData.h" #include "SquidTime.h" diff --git a/src/htcp.cc b/src/htcp.cc index 9775216773..3c7d8ffc9f 100644 --- a/src/htcp.cc +++ b/src/htcp.cc @@ -54,6 +54,7 @@ #include "refresh.h" #include "SquidTime.h" #include "StatCounters.h" +#include "store_key_md5.h" #include "Store.h" #include "StoreClient.h" #include "URL.h" diff --git a/src/icp_v2.cc b/src/icp_v2.cc index 9ffb8ff2c0..07feaf3877 100644 --- a/src/icp_v2.cc +++ b/src/icp_v2.cc @@ -58,6 +58,7 @@ #include "SquidTime.h" #include "StatCounters.h" #include "Store.h" +#include "store_key_md5.h" #include "SwapDir.h" #include "tools.h" #include "wordlist.h" diff --git a/src/ipc/StoreMap.cc b/src/ipc/StoreMap.cc index 22185ed0f9..8f5c116e7e 100644 --- a/src/ipc/StoreMap.cc +++ b/src/ipc/StoreMap.cc @@ -8,6 +8,7 @@ #include "protos.h" #include "Store.h" +#include "store_key_md5.h" #include "ipc/StoreMap.h" Ipc::StoreMap::Owner * diff --git a/src/neighbors.cc b/src/neighbors.cc index 10a2dc7224..c3b64b784a 100644 --- a/src/neighbors.cc +++ b/src/neighbors.cc @@ -55,6 +55,7 @@ #include "SquidTime.h" #include "stat.h" #include "Store.h" +#include "store_key_md5.h" #include "URL.h" /* count mcast group peers every 15 minutes */ diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 74238503c9..0214114a8f 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -47,6 +47,7 @@ #include "protos.h" #include "SquidTime.h" #include "Store.h" +#include "store_key_md5.h" #include "StoreClient.h" #include "tools.h" diff --git a/src/protos.h b/src/protos.h index 9f5691d05b..d230650402 100644 --- a/src/protos.h +++ b/src/protos.h @@ -255,24 +255,6 @@ extern void storeLogClose(void); extern void storeLogOpen(void); -/* - * store_key_*.c - */ -SQUIDCEXTERN cache_key *storeKeyDup(const cache_key *); -SQUIDCEXTERN cache_key *storeKeyCopy(cache_key *, const cache_key *); -SQUIDCEXTERN void storeKeyFree(const cache_key *); -SQUIDCEXTERN const cache_key *storeKeyScan(const char *); -SQUIDCEXTERN const char *storeKeyText(const cache_key *); -SQUIDCEXTERN const cache_key *storeKeyPublic(const char *, const HttpRequestMethod&); -SQUIDCEXTERN const cache_key *storeKeyPublicByRequest(HttpRequest *); -SQUIDCEXTERN const cache_key *storeKeyPublicByRequestMethod(HttpRequest *, const HttpRequestMethod&); -SQUIDCEXTERN const cache_key *storeKeyPrivate(const char *, const HttpRequestMethod&, int); -SQUIDCEXTERN int storeKeyHashBuckets(int); -SQUIDCEXTERN int storeKeyNull(const cache_key *); -SQUIDCEXTERN void storeKeyInit(void); -SQUIDCEXTERN HASHHASH storeKeyHashHash; -SQUIDCEXTERN HASHCMP storeKeyHashCmp; - /* * store_digest.c */ diff --git a/src/store.cc b/src/store.cc index 77d4e3f2c6..5ee1828d94 100644 --- a/src/store.cc +++ b/src/store.cc @@ -55,8 +55,10 @@ #include "stmem.h" #include "StoreClient.h" #include "Store.h" +#include "store_key_md5.h" #include "StoreIOState.h" #include "StoreMeta.h" +#include "store_key_md5.h" #include "SwapDir.h" #include "swap_log_op.h" #if USE_DELAY_POOLS diff --git a/src/store_dir.cc b/src/store_dir.cc index 46919af47e..11e3b86e4e 100644 --- a/src/store_dir.cc +++ b/src/store_dir.cc @@ -43,6 +43,7 @@ #include "SquidMath.h" #include "SquidTime.h" #include "Store.h" +#include "store_key_md5.h" #include "StoreHashIndex.h" #include "SwapDir.h" #include "swap_log_op.h" diff --git a/src/store_key_md5.cc b/src/store_key_md5.cc index ac62eb89d8..2bd7a9d534 100644 --- a/src/store_key_md5.cc +++ b/src/store_key_md5.cc @@ -37,7 +37,7 @@ #include "HttpRequest.h" #include "md5.h" #include "Mem.h" -#include "protos.h" +#include "store_key_md5.h" #include "URL.h" static cache_key null_key[SQUID_MD5_DIGEST_LENGTH]; diff --git a/src/store_key_md5.h b/src/store_key_md5.h new file mode 100644 index 0000000000..54b35d4d7a --- /dev/null +++ b/src/store_key_md5.h @@ -0,0 +1,58 @@ +/* + * DEBUG: section 20 Storage Manager MD5 Cache Keys + * AUTHOR: Duane Wessels + * + * 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_STORE_KEY_MD5_H_ +#define SQUID_STORE_KEY_MD5_H_ + +#include "hash.h" +#include "typedefs.h" + +class HttpRequestMethod; +class HttpRequest; + +extern cache_key *storeKeyDup(const cache_key *); +extern cache_key *storeKeyCopy(cache_key *, const cache_key *); +extern void storeKeyFree(const cache_key *); +extern const cache_key *storeKeyScan(const char *); +extern const char *storeKeyText(const cache_key *); +extern const cache_key *storeKeyPublic(const char *, const HttpRequestMethod&); +extern const cache_key *storeKeyPublicByRequest(HttpRequest *); +extern const cache_key *storeKeyPublicByRequestMethod(HttpRequest *, const HttpRequestMethod&); +extern const cache_key *storeKeyPrivate(const char *, const HttpRequestMethod&, int); +extern int storeKeyHashBuckets(int); +extern int storeKeyNull(const cache_key *); +extern void storeKeyInit(void); + +extern HASHHASH storeKeyHashHash; +extern HASHCMP storeKeyHashCmp; + +#endif /* SQUID_STORE_KEY_MD5_H_ */ diff --git a/src/store_rebuild.cc b/src/store_rebuild.cc index b85269d879..f7d9bdd9fb 100644 --- a/src/store_rebuild.cc +++ b/src/store_rebuild.cc @@ -40,6 +40,7 @@ #include "protos.h" #include "StatCounters.h" #include "Store.h" +#include "store_key_md5.h" #include "SwapDir.h" #include "StoreSearch.h" #include "SquidTime.h" diff --git a/src/test_cache_digest.cc b/src/test_cache_digest.cc index 31109e3dc4..7fcdf59142 100644 --- a/src/test_cache_digest.cc +++ b/src/test_cache_digest.cc @@ -38,6 +38,7 @@ #include "squid.h" #include "CacheDigest.h" +#include "store_key_md5.h" #if HAVE_ERRNO_H #include diff --git a/src/ufsdump.cc b/src/ufsdump.cc index 46c416e3a8..7c5da5de89 100644 --- a/src/ufsdump.cc +++ b/src/ufsdump.cc @@ -36,6 +36,7 @@ #include "StoreMeta.h" #include "StoreMetaUnpacker.h" #include "Store.h" +#include "store_key_md5.h" #include "Generic.h" #include "mgr/Registration.h"