unlinkd_SOURCES = unlinkd_daemon.cc SquidNew.cc
-dnsserver_SOURCES = dnsserver.cc SquidNew.cc stub_debug.cc
+dnsserver_SOURCES = dnsserver.cc SquidNew.cc
recv_announce_SOURCES = recv-announce.cc SquidNew.cc
## What requires what..
mk-string-arrays.awk \
repl_modules.sh \
stub_debug.cc \
+ tests/STUB.h \
mib.txt \
mime.conf.default
# globals.cc is needed by test_tools.cc.
# Neither of these should be disted from here.
TESTSOURCES= \
+ tests/STUB.h \
test_tools.cc \
globals.cc
event.cc
-check_PROGRAMS+= tests/testAuth \
+check_PROGRAMS+= \
tests/testACLMaxUserIP \
tests/testBoilerplate \
tests/testCacheManager \
tests_testHttpReply_DEPENDENCIES= $(SQUID_CPPUNIT_LA) \
$(top_builddir)/lib/libmiscutil.a
-tests_testAuth_SOURCES = \
- tests/testAuth.cc tests/testMain.cc tests/testAuth.h \
- ConfigParser.cc \
- tests/stub_acl.cc tests/stub_cache_cf.cc \
- tests/stub_helper.cc cbdata.cc String.cc \
- tests/stub_store.cc HttpHeaderTools.cc HttpHeader.cc mem.cc ClientInfo.h \
- MemBuf.cc HttpHdrContRange.cc Packer.cc HttpHdrCc.cc HttpHdrSc.cc \
- HttpHdrScTarget.cc url.cc \
- StatHist.cc HttpHdrRange.cc ETag.cc tests/stub_errorpage.cc \
- tests/stub_HttpRequest.cc tests/stub_DelayId.cc \
- tests/stub_MemObject.cc mem_node.cc \
- tests/stub_cache_manager.cc \
- stmem.cc \
- tests/stub_comm.cc \
- tests/stub_http.cc \
- HttpMsg.cc \
- HttpRequestMethod.cc \
- tests/stub_mime.cc \
- tests/stub_access_log.cc \
- time.cc \
- URLScheme.cc \
- $(TEST_CALL_SOURCES) \
- wordlist.cc
-## acl.cc cache_cf.cc tools.cc \
-## helper.cc String.cc cbdata.cc HttpHeaderTools.cc store.cc cache_manager.cc \
-## HttpHeader.cc url.cc mem.cc HttpRequest.cc Packer.cc access_log.cc \
-## MemBuf.cc StatHist.cc logfile.cc
-nodist_tests_testAuth_SOURCES = \
- $(TESTSOURCES)
-
-tests_testAuth_LDADD= \
- $(COMMON_LIBS) \
- -L../lib -lmiscutil \
- $(REGEXLIB) \
- $(SQUID_CPPUNIT_LIBS) \
- $(SSLLIB) \
- $(XTRA_LIBS)
-tests_testAuth_LDFLAGS = $(LIBADD_DL)
-tests_testAuth_DEPENDENCIES = $(top_builddir)/lib/libmiscutil.a \
- $(SQUID_CPPUNIT_LA)
-
## Tests for the ACLMaxUserIP class
## acl needs wordlist. wordlist needs MemBug
## MemBuf needs mem, MemBuf needs event,
tests_testACLMaxUserIP_SOURCES= \
cbdata.cc \
ClientInfo.h \
+ ConfigOption.cc \
ConfigParser.cc \
+ disk.cc \
+ DiskIO/ReadRequest.cc \
+ DiskIO/WriteRequest.cc \
ETag.cc \
+ filemap.cc \
HttpHeader.cc \
HttpHeaderTools.cc \
HttpHdrContRange.cc \
HttpHdrCc.cc \
HttpHdrSc.cc \
HttpHdrScTarget.cc \
+ HttpMsg.cc \
+ HttpRequestMethod.cc \
+ int.cc \
+ list.cc \
mem_node.cc \
Packer.cc \
Parsing.cc \
+ SquidMath.cc \
StatHist.cc \
stmem.cc \
String.cc \
- $(TEST_CALL_SOURCES) \
+ store_dir.cc \
+ StoreIOState.cc \
+ StoreMeta.cc \
+ StoreMetaMD5.cc \
+ StoreMetaSTD.cc \
+ StoreMetaSTDLFS.cc \
+ StoreMetaUnpacker.cc \
+ StoreMetaURL.cc \
+ StoreMetaVary.cc \
+ StoreSwapLogData.cc \
+ store_key_md5.cc \
+ string_arrays.c \
+ SwapDir.cc \
+ SwapDir.h \
+ tests/stub_access_log.cc \
tests/stub_cache_cf.cc \
tests/stub_comm.cc \
tests/stub_DelayId.cc \
+ tests/stub_DiskIOModule.cc \
+ tests/stub_fd.cc \
+ tests/stub_HttpRequest.cc \
tests/stub_MemObject.cc \
+ tests/stub_mime.cc \
tests/stub_store.cc \
+ tests/stub_store_rebuild.cc \
+ tests/stub_store_swapout.cc \
tests/stub_cache_manager.cc \
tests/testACLMaxUserIP.cc \
tests/testACLMaxUserIP.h \
tests/testMain.cc \
time.cc \
+ url.cc \
+ URL.h \
+ URLScheme.cc \
+ URLScheme.h \
mem.cc \
MemBuf.cc \
wordlist.cc
## why so many sources? well httpHeaderTools requites ACLChecklist & friends.
## first line - what we are testing.
tests_testStore_SOURCES= \
+ CacheDigest.cc \
+ cbdata.cc \
+ ClientInfo.h \
+ ConfigOption.cc \
+ ConfigParser.cc \
+ $(DELAY_POOL_SOURCE) \
+ disk.cc \
+ DiskIO/ReadRequest.cc \
+ DiskIO/WriteRequest.cc \
+ ETag.cc \
+ event.cc \
+ EventLoop.cc \
+ filemap.cc \
+ HttpHdrCc.cc \
+ HttpHdrContRange.cc \
+ HttpHdrRange.cc \
+ HttpHdrSc.cc \
+ HttpHdrScTarget.cc \
+ HttpHeaderTools.cc \
+ HttpHeader.cc \
+ HttpMsg.cc \
+ HttpRequestMethod.cc \
+ int.cc \
+ list.cc \
+ mem.cc \
+ mem_node.cc \
+ MemBuf.cc \
+ Packer.cc \
+ Parsing.cc \
+ RemovalPolicy.cc \
+ refresh.cc \
+ StatHist.cc \
+ stmem.cc \
+ store.cc \
+ store_dir.cc \
+ store_io.cc \
+ store_swapout.cc \
+ StoreIOState.cc \
+ StoreMeta.cc \
+ StoreMetaMD5.cc \
+ StoreMetaSTD.cc \
+ StoreMetaSTDLFS.cc \
+ StoreMetaUnpacker.cc \
+ StoreMetaURL.cc \
+ StoreMetaVary.cc \
+ StoreSwapLogData.cc \
+ store_key_md5.cc \
+ String.cc \
+ SwapDir.cc \
+ tests/CapturingStoreEntry.h \
+ tests/stub_access_log.cc \
+ tests/stub_acl.cc \
+ tests/stub_cache_cf.cc \
+ tests/stub_cache_manager.cc \
+ tests/stub_client_side_request.cc \
+ tests/stub_comm.cc \
+ tests/stub_DiskIOModule.cc \
+ tests/stub_errorpage.cc \
+ tests/stub_fd.cc \
+ tests/stub_helper.cc \
+ tests/stub_http.cc \
+ tests/stub_HttpReply.cc \
+ tests/stub_HttpRequest.cc \
+ tests/stub_MemObject.cc \
+ tests/stub_mime.cc \
+ tests/stub_store_client.cc \
+ tests/stub_store_rebuild.cc \
tests/stub_store_swapout.cc \
+ tests/stub_tools.cc \
tests/testMain.cc \
- tests/stub_MemObject.cc \
tests/testStore.cc \
tests/testStore.h \
- tests/CapturingStoreEntry.h \
tests/testStoreEntryStream.cc \
tests/testStoreEntryStream.h \
tests/testStoreController.cc \
tests/testStoreController.h \
tests/testStoreHashIndex.cc \
tests/testStoreHashIndex.h \
+ tests/testStoreSupport.cc \
+ tests/testStoreSupport.h \
tests/TestSwapDir.cc \
tests/TestSwapDir.h \
- tests/stub_fd.cc \
- tests/stub_HttpReply.cc \
- tests/stub_cache_manager.cc \
- $(STORE_TEST_SOURCES)
+ time.cc \
+ url.cc \
+ URLScheme.cc \
+ URLScheme.h \
+ wordlist.cc
nodist_tests_testStore_SOURCES= \
$(STORE_TEST_GEN_SOURCES) \
## Tests of the URL module.
## TODO: Trim this down once the insanity is over.
tests_testURL_SOURCES = \
- debug.cc \
- url.cc \
- URLScheme.cc \
- HttpRequest.cc \
- HttpRequestMethod.cc \
- mem.cc \
- RemovalPolicy.cc \
- String.cc \
- tests/testURL.cc \
- tests/testURL.h \
- tests/testURLScheme.cc \
- tests/testURLScheme.h \
- tests/testMain.cc \
- time.cc \
access_log.cc \
BodyPipe.cc \
- cache_manager.cc \
cache_cf.cc \
- ProtoPort.cc \
- ProtoPort.h \
+ cache_manager.cc \
CacheDigest.cc \
carp.cc \
cbdata.cc \
client_side_request.cc \
ClientInfo.h \
clientStream.cc \
- $(squid_COMMSOURCES) \
ConfigOption.cc \
ConfigParser.cc \
+ debug.cc \
$(DELAY_POOL_SOURCE) \
disk.cc \
+ DiskIO/ReadRequest.cc \
+ DiskIO/WriteRequest.cc \
dlink.h \
dlink.cc \
$(DNSSOURCE) \
errorpage.cc \
ETag.cc \
+ event.cc \
external_acl.cc \
ExternalACLEntry.cc \
fd.cc \
fde.cc \
+ filemap.cc \
forward.cc \
fqdncache.cc \
ftp.cc \
$(HTCPSOURCE) \
http.cc \
HttpBody.cc \
- HttpHeader.cc \
- HttpHeaderTools.cc \
HttpHdrCc.cc \
HttpHdrContRange.cc \
HttpHdrRange.cc \
HttpHdrSc.cc \
HttpHdrScTarget.cc \
+ HttpHeader.cc \
+ HttpHeaderTools.cc \
HttpMsg.cc \
HttpReply.cc \
+ HttpRequest.cc \
+ HttpRequestMethod.cc \
HttpStatusLine.cc \
icp_v2.cc \
icp_v3.cc \
list.cc \
logfile.cc \
multicast.cc \
+ mem.cc \
mem_node.cc \
MemBuf.cc \
MemObject.cc \
peer_select.cc \
peer_sourcehash.cc \
peer_userhash.cc \
+ ProtoPort.cc \
+ ProtoPort.h \
redirect.cc \
referer.cc \
refresh.cc \
+ RemovalPolicy.cc \
Server.cc \
$(SNMP_SOURCE) \
- $(SSL_SOURCE) \
SquidMath.h \
SquidMath.cc \
+ ssl_support.cc \
stat.cc \
StatHist.cc \
stmem.cc \
StoreMetaURL.cc \
StoreMetaVary.cc \
StoreSwapLogData.cc \
- $(TEST_CALL_SOURCES) \
+ String.cc \
+ SwapDir.cc \
+ tests/stub_DiskIOModule.cc \
+ tests/testURL.cc \
+ tests/testURL.h \
+ tests/testURLScheme.cc \
+ tests/testURLScheme.h \
+ tests/testMain.cc \
+ time.cc \
tools.cc \
tunnel.cc \
- SwapDir.cc \
+ url.cc \
+ URLScheme.cc \
urn.cc \
useragent.cc \
wccp2.cc \
-/*
- * $Id$
- *
- * DEBUG: section 20 Storage Manager
- * AUTHOR: Robert Collins
- *
- * 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.
- *
- */
-
#include "squid.h"
-#include "Store.h"
-StorePointer Store::CurrentRoot = NULL;
+#define STUB_API "store.cc"
+#include "tests/STUB.h"
+
+/* and code defined in the wrong .cc file */
+#include "SwapDir.h"
+void StoreController::maintain() STUB
+#include "RemovalPolicy.h"
+RemovalPolicy * createRemovalPolicy(RemovalPolicySettings * settings) STUB_RETVAL(NULL)
-extern "C" void
-storeAppendPrintf(StoreEntry * e, const char *fmt,...)
-{
- fatal("storeAppendPrintf: Not implemented");
-}
-extern "C" void
-storeAppendVPrintf(StoreEntry * e, const char *fmt, va_list vargs)
+#include "Store.h"
+StorePointer Store::CurrentRoot = NULL;
+bool StoreEntry::checkDeferRead(int fd) const STUB_RETVAL(false)
+const char *StoreEntry::getMD5Text() const STUB_RETVAL(NULL)
+StoreEntry::StoreEntry() STUB
+StoreEntry::StoreEntry(const char *url, const char *log_url) STUB
+HttpReply const *StoreEntry::getReply() const STUB_RETVAL(NULL)
+void StoreEntry::write(StoreIOBuffer) STUB
+bool StoreEntry::isAccepting() const STUB_RETVAL(false)
+size_t StoreEntry::bytesWanted(Range<size_t> const) const STUB_RETVAL(0)
+void StoreEntry::complete() STUB
+store_client_t StoreEntry::storeClientType() const STUB_RETVAL(STORE_NON_CLIENT)
+char const *StoreEntry::getSerialisedMetaData() STUB_RETVAL(NULL)
+void StoreEntry::replaceHttpReply(HttpReply *) STUB
+bool StoreEntry::swapoutPossible() STUB_RETVAL(false)
+void StoreEntry::trimMemory() STUB
+void StoreEntry::abort() STUB
+void StoreEntry::unlink() STUB
+void StoreEntry::makePublic() STUB
+void StoreEntry::makePrivate() STUB
+void StoreEntry::setPublicKey() STUB
+void StoreEntry::setPrivateKey() STUB
+void StoreEntry::expireNow() STUB
+void StoreEntry::releaseRequest() STUB
+void StoreEntry::negativeCache() STUB
+void StoreEntry::cacheNegatively() STUB
+void StoreEntry::invokeHandlers() STUB
+void StoreEntry::purgeMem() STUB
+void StoreEntry::swapOut() STUB
+bool StoreEntry::swapOutAble() const STUB_RETVAL(false)
+void StoreEntry::swapOutFileClose() STUB
+const char *StoreEntry::url() const STUB_RETVAL(NULL)
+int StoreEntry::checkCachable() STUB_RETVAL(0)
+int StoreEntry::checkNegativeHit() const STUB_RETVAL(0)
+int StoreEntry::locked() const STUB_RETVAL(0)
+int StoreEntry::validToSend() const STUB_RETVAL(0)
+int StoreEntry::keepInMemory() const STUB_RETVAL(0)
+void StoreEntry::createMemObject(const char *, const char *) STUB
+void StoreEntry::dump(int debug_lvl) const STUB
+void StoreEntry::hashDelete() STUB
+void StoreEntry::hashInsert(const cache_key *) STUB
+void StoreEntry::registerAbort(STABH * cb, void *) STUB
+void StoreEntry::reset() STUB
+void StoreEntry::setMemStatus(mem_status_t) STUB
+void StoreEntry::timestampsSet() STUB
+void StoreEntry::unregisterAbort() STUB
+void StoreEntry::destroyMemObject() STUB
+int StoreEntry::checkTooSmall() STUB_RETVAL(0)
+void StoreEntry::delayAwareRead(int fd, char *buf, int len, AsyncCall::Pointer callback) STUB
+void StoreEntry::setNoDelay (bool const) STUB
+bool StoreEntry::modifiedSince(HttpRequest * request) const STUB_RETVAL(false)
+bool StoreEntry::hasIfMatchEtag(const HttpRequest &request) const STUB_RETVAL(false)
+bool StoreEntry::hasIfNoneMatchEtag(const HttpRequest &request) const STUB_RETVAL(false)
+RefCount<Store> StoreEntry::store() const STUB_RETVAL(StorePointer())
+size_t StoreEntry::inUseCount() STUB_RETVAL(0)
+void StoreEntry::getPublicByRequestMethod(StoreClient * aClient, HttpRequest * request, const HttpRequestMethod& method) STUB
+void StoreEntry::getPublicByRequest(StoreClient * aClient, HttpRequest * request) STUB
+void StoreEntry::getPublic(StoreClient * aClient, const char *uri, const HttpRequestMethod& method) STUB
+void *StoreEntry::operator new(size_t byteCount)
{
- fatal("storeAppendVPrintf: Not implemented");
+ STUB
+ return new StoreEntry();
}
+void StoreEntry::operator delete(void *address) STUB
+void StoreEntry::setReleaseFlag() STUB
+//#if USE_SQUID_ESI
+//ESIElement::Pointer StoreEntry::cachedESITree STUB_RETVAL(NULL)
+//#endif
+void StoreEntry::append(char const *, int len) STUB
+void StoreEntry::buffer() STUB
+void StoreEntry::flush() STUB
+int StoreEntry::unlock() STUB_RETVAL(0)
+int64_t StoreEntry::objectLen() const STUB_RETVAL(0)
+int64_t StoreEntry::contentLen() const STUB_RETVAL(0)
+void StoreEntry::lock() STUB
+void StoreEntry::release() STUB
+
+NullStoreEntry *NullStoreEntry::getInstance() STUB_RETVAL(NULL)
+const char *NullStoreEntry::getMD5Text() const STUB_RETVAL(NULL)
+void NullStoreEntry::operator delete(void *address) STUB
+// private virtual. Why is this linked from outside?
+const char *NullStoreEntry::getSerialisedMetaData() STUB_RETVAL(NULL)
+
+void Store::Root(Store *) STUB
+void Store::Root(RefCount<Store>) STUB
+void Store::Stats(StoreEntry * output) STUB
+void Store::Maintain(void *unused) STUB
+void Store::create() STUB
+void Store::diskFull() STUB
+void Store::sync() STUB
+void Store::unlink(StoreEntry &) STUB
+
+SQUIDCEXTERN size_t storeEntryInUse() STUB_RETVAL(0)
+SQUIDCEXTERN const char *storeEntryFlags(const StoreEntry *) STUB_RETVAL(NULL)
+void storeEntryReplaceObject(StoreEntry *, HttpReply *) STUB
+SQUIDCEXTERN StoreEntry *storeGetPublic(const char *uri, const HttpRequestMethod& method) STUB_RETVAL(NULL)
+SQUIDCEXTERN StoreEntry *storeGetPublicByRequest(HttpRequest * request) STUB_RETVAL(NULL)
+SQUIDCEXTERN StoreEntry *storeGetPublicByRequestMethod(HttpRequest * request, const HttpRequestMethod& method) STUB_RETVAL(NULL)
+SQUIDCEXTERN StoreEntry *storeCreateEntry(const char *, const char *, request_flags, const HttpRequestMethod&) STUB_RETVAL(NULL)
+SQUIDCEXTERN void storeInit(void) STUB
+SQUIDCEXTERN void storeConfigure(void) STUB
+SQUIDCEXTERN void storeFreeMemory(void) STUB
+SQUIDCEXTERN int expiresMoreThan(time_t, time_t) STUB_RETVAL(0)
+SQUIDCEXTERN void storeAppendPrintf(StoreEntry *, const char *,...) STUB
+void storeAppendVPrintf(StoreEntry *, const char *, va_list ap) STUB
+SQUIDCEXTERN int storeTooManyDiskFilesOpen(void) STUB_RETVAL(0)
+SQUIDCEXTERN void storeHeapPositionUpdate(StoreEntry *, SwapDir *) STUB
+SQUIDCEXTERN void storeSwapFileNumberSet(StoreEntry * e, sfileno filn) STUB
+SQUIDCEXTERN void storeFsInit(void) STUB
+SQUIDCEXTERN void storeFsDone(void) STUB
+SQUIDCEXTERN void storeReplAdd(const char *, REMOVALPOLICYCREATE *) STUB
+void destroyStoreEntry(void *) STUB
+// in Packer.cc !? SQUIDCEXTERN void packerToStoreInit(Packer * p, StoreEntry * e) STUB
+SQUIDCEXTERN void storeGetMemSpace(int size) STUB
#ifndef _USE_INLINE_
#include "Store.cci"