]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Got rid of Store.cci
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 3 Jan 2014 10:32:53 +0000 (11:32 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 3 Jan 2014 10:32:53 +0000 (11:32 +0100)
src/Makefile.am
src/Store.cci [deleted file]
src/Store.h
src/store.cc
src/tests/stub_store.cc

index 00c1ee6b81499254328c13201f95151ec2d3fe36..bb6b1aa030a59f4d0c8118e60e2bb5826bcc55a0 100644 (file)
@@ -591,7 +591,6 @@ noinst_HEADERS = \
        client_side_request.cci \
        MemBuf.cci \
        MemBuf.h \
-       Store.cci \
        StoreEntryStream.h \
        String.cci \
        SquidString.h \
diff --git a/src/Store.cci b/src/Store.cci
deleted file mode 100644 (file)
index 01add65..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * DEBUG: section 20    Storage Manager
- * AUTHOR: Harvest Derived
- *
- * 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 "HttpReply.h"
-#include "MemObject.h"
-
-/**
- \retval true  Store contains 0 bytes of data.
- \retval false Store contains 1 or more bytes of data.
- \retval false Store contains negative content !!!!!!
- */
-bool
-StoreEntry::isEmpty () const
-{
-    assert (mem_obj);
-    return mem_obj->endOffset() == 0;
-}
-
-/// \retval * - Always NULL for 'null' filesystem.
-HttpReply const *
-NullStoreEntry::getReply() const
-{
-    return NULL;
-}
-
-/// \retval N/A        Kills squid with fatal error if called before Store Root is set.
-Store &
-Store::Root()
-{
-    if (CurrentRoot == NULL)
-        fatal("No Store Root has been set");
-
-    return *CurrentRoot;
-}
index b5325782ce8f4c784c7644e11b4d7abfa4345a80..c1fad115e9718240168d86ae32297567ccfb2636 100644 (file)
@@ -41,6 +41,7 @@
 #include "hash.h"
 #include "HttpReply.h"
 #include "HttpRequestMethod.h"
+#include "MemObject.h"
 #include "Range.h"
 #include "RemovalPolicy.h"
 #include "StoreIOBuffer.h"
@@ -56,7 +57,6 @@
 
 class AsyncCall;
 class HttpRequest;
-class MemObject;
 class Packer;
 class RequestFlags;
 class StoreClient;
@@ -84,7 +84,16 @@ public:
 
     virtual HttpReply const *getReply() const;
     virtual void write (StoreIOBuffer);
-    virtual _SQUID_INLINE_ bool isEmpty() const;
+
+    /** Check if the Store entry is emtpty
+     * \retval true   Store contains 0 bytes of data.
+     * \retval false  Store contains 1 or more bytes of data.
+     * \retval false  Store contains negative content !!!!!!
+     */
+    virtual bool isEmpty() const {
+        assert (mem_obj);
+        return mem_obj->endOffset() == 0;
+    }
     virtual bool isAccepting() const;
     virtual size_t bytesWanted(Range<size_t> const aRange, bool ignoreDelayPool = false) const;
     virtual void complete();
@@ -251,7 +260,7 @@ public:
     }
 
     const char *getMD5Text() const;
-    _SQUID_INLINE_ HttpReply const *getReply() const;
+    HttpReply const *getReply() const { return NULL; }
     void write (StoreIOBuffer) {}
 
     bool isEmpty () const {return true;}
@@ -284,7 +293,11 @@ class Store : public RefCountable
 
 public:
     /** The root store */
-    static _SQUID_INLINE_ Store &Root();
+    static Store &Root() {
+        if (CurrentRoot == NULL)
+            fatal("No Store Root has been set");
+        return *CurrentRoot;
+    }
     static void Root(Store *);
     static void Root(RefCount<Store>);
     static void Stats(StoreEntry * output);
@@ -504,8 +517,4 @@ void packerToStoreInit(Packer * p, StoreEntry * e);
 /// \ingroup StoreAPI
 void storeGetMemSpace(int size);
 
-#if _USE_INLINE_
-#include "Store.cci"
-#endif
-
 #endif /* SQUID_STORE_H */
index 08e06d341656795a3ac7dbca148c0ee7b1b5ea5b..593db046d93a60df724eb8d7119d6be6de2e2f10 100644 (file)
@@ -2085,7 +2085,3 @@ NullStoreEntry::getSerialisedMetaData()
 {
     return NULL;
 }
-
-#if !_USE_INLINE_
-#include "Store.cci"
-#endif
index 83b642e0c57cbcaee215cd1c83811db6df7ff333..72b94c94afdd0c0991e12a2ab2f790d9a401397a 100644 (file)
@@ -136,14 +136,3 @@ void storeReplAdd(const char *, REMOVALPOLICYCREATE *) STUB
 void destroyStoreEntry(void *) STUB
 // in Packer.cc !? void packerToStoreInit(Packer * p, StoreEntry * e) STUB
 void storeGetMemSpace(int size) STUB
-
-#if !_USE_INLINE_ /* stubs for Store.cci */
-bool StoreEntry::isEmpty () const STUB_RETVAL(true)
-HttpReply const *NullStoreEntry::getReply() const STUB_RETVAL(NULL)
-
-Store &Store::Root()
-{
-    CPPUNIT_ASSERT(CurrentRoot != NULL);
-    return *CurrentRoot;
-}
-#endif /* !_USE_INLINE_ */