]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
make StoreEntry the type for _StoreEntry throughout
authorrobertc <>
Fri, 17 Jan 2003 12:49:34 +0000 (12:49 +0000)
committerrobertc <>
Fri, 17 Jan 2003 12:49:34 +0000 (12:49 +0000)
src/Store.h
src/StoreClient.h
src/client_side_reply.cc
src/htcp.cc
src/icp_v2.cc
src/icp_v3.cc
src/mime.cc
src/snmp_agent.cc
src/store.cc
src/typedefs.h
src/urn.cc

index e338dd4abc8c8d6e7931a531a5f14759790d3f28..4fdb9394bf34f3bd0417362068b6ed0f38439ca6 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: Store.h,v 1.4 2002/12/27 10:26:33 robertc Exp $
+ * $Id: Store.h,v 1.5 2003/01/17 05:49:35 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -38,7 +38,7 @@
 class StoreClient;
 #endif
 
-struct _StoreEntry : public hash_link {
+class StoreEntry : public hash_link {
 public:
     virtual const char *getMD5Text() const;
   
@@ -77,7 +77,7 @@ private:
 };
 
 #ifdef __cplusplus
-class NullStoreEntry:public _StoreEntry
+class NullStoreEntry:public StoreEntry
 {
 public:
     static NullStoreEntry *getInstance();
index 06067f0c167ac1e48a8a9d3782053cc4e4adf0fa..be062c7f36ccd29def60af285d35f4a78d33d6ba 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreClient.h,v 1.4 2002/12/27 10:26:33 robertc Exp $
+ * $Id: StoreClient.h,v 1.5 2003/01/17 05:49:35 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
 typedef void STCB(void *, StoreIOBuffer);      /* store callback */
 
 #ifdef __cplusplus
-class _StoreEntry;
+class StoreEntry;
 #endif
 
 #ifdef __cplusplus
 class StoreClient {
 public:
   virtual ~StoreClient () {}
-  virtual void created (_StoreEntry *newEntry) = 0;
+  virtual void created (StoreEntry *newEntry) = 0;
 };
 #endif
 
index e4b4964005b66d2f714c449bf2f37b1bb8cbb041..b161f989c956d5dd60cdd9190c8c7f0f3a626fb8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side_reply.cc,v 1.29 2003/01/09 12:24:22 robertc Exp $
+ * $Id: client_side_reply.cc,v 1.30 2003/01/17 05:49:34 robertc Exp $
  *
  * DEBUG: section 88    Client-side Reply Routines
  * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c)
@@ -50,14 +50,14 @@ public:
     void purgeRequest ();
     void purgeRequestFindObjectToPurge();
     void purgeDoMissPurge();
-    void purgeFoundGet(_StoreEntry *newEntry);
-    void purgeFoundHead(_StoreEntry *newEntry);
-    void purgeFoundObject(_StoreEntry *entry);
-    void purgeDoPurgeGet(_StoreEntry *entry);
-    void purgeDoPurgeHead(_StoreEntry *entry);
+    void purgeFoundGet(StoreEntry *newEntry);
+    void purgeFoundHead(StoreEntry *newEntry);
+    void purgeFoundObject(StoreEntry *entry);
+    void purgeDoPurgeGet(StoreEntry *entry);
+    void purgeDoPurgeHead(StoreEntry *entry);
     void doGetMoreData();
     void identifyStoreObject();
-    void identifyFoundObject(_StoreEntry *entry);
+    void identifyFoundObject(StoreEntry *entry);
     int storeOKTransferDone() const;
     int storeNotOKTransferDone() const;
     
@@ -65,7 +65,7 @@ public:
 
     /* state variable - replace with class to handle storeentries at some point */
     int lookingforstore;
-    virtual void created (_StoreEntry *newEntry);
+    virtual void created (StoreEntry *newEntry);
   
     clientHttpRequest *http;
     int headers_sz;
@@ -815,11 +815,11 @@ clientReplyContext::purgeRequestFindObjectToPurge()
     /* Try to find a base entry */
     http->flags.purging = 1;
     lookingforstore = 1;
-    _StoreEntry::getPublicByRequestMethod(this, http->request, METHOD_GET);
+    StoreEntry::getPublicByRequestMethod(this, http->request, METHOD_GET);
 }
 
 void
-clientReplyContext::created(_StoreEntry *newEntry)
+clientReplyContext::created(StoreEntry *newEntry)
 {
     if (lookingforstore == 1)
        purgeFoundGet(newEntry);
@@ -834,17 +834,17 @@ clientReplyContext::created(_StoreEntry *newEntry)
 }
 
 void
-clientReplyContext::purgeFoundGet(_StoreEntry *newEntry)
+clientReplyContext::purgeFoundGet(StoreEntry *newEntry)
 {
     if (newEntry->isNull()) {
        lookingforstore = 2;
-       _StoreEntry::getPublicByRequestMethod(this, http->request, METHOD_HEAD);
+       StoreEntry::getPublicByRequestMethod(this, http->request, METHOD_HEAD);
     } else
        purgeFoundObject (newEntry);
 }
 
 void
-clientReplyContext::purgeFoundHead(_StoreEntry *newEntry)
+clientReplyContext::purgeFoundHead(StoreEntry *newEntry)
 {
     if (newEntry->isNull())
        purgeDoMissPurge();
@@ -853,7 +853,7 @@ clientReplyContext::purgeFoundHead(_StoreEntry *newEntry)
 }
        
 void
-clientReplyContext::purgeFoundObject(_StoreEntry *entry)
+clientReplyContext::purgeFoundObject(StoreEntry *entry)
 {
     assert (entry && !entry->isNull());
        StoreIOBuffer tempBuffer = EMPTYIOBUFFER;
@@ -900,11 +900,11 @@ clientReplyContext::purgeDoMissPurge()
 {
     http->logType = LOG_TCP_MISS;
     lookingforstore = 3;
-    _StoreEntry::getPublicByRequestMethod(this,http->request, METHOD_GET);
+    StoreEntry::getPublicByRequestMethod(this,http->request, METHOD_GET);
 }
 
 void
-clientReplyContext::purgeDoPurgeGet(_StoreEntry *newEntry)
+clientReplyContext::purgeDoPurgeGet(StoreEntry *newEntry)
 {
     assert (newEntry);
     /* Move to new() when that is created */
@@ -917,11 +917,11 @@ clientReplyContext::purgeDoPurgeGet(_StoreEntry *newEntry)
        purgeStatus = HTTP_OK;
     }
     lookingforstore = 4;
-    _StoreEntry::getPublicByRequestMethod(this, http->request, METHOD_HEAD);
+    StoreEntry::getPublicByRequestMethod(this, http->request, METHOD_HEAD);
 }
 
 void
-clientReplyContext::purgeDoPurgeHead(_StoreEntry *newEntry)
+clientReplyContext::purgeDoPurgeHead(StoreEntry *newEntry)
 {
     if (newEntry) {
        debug(88, 4) ("clientPurgeRequest: HEAD '%s'\n", storeUrl(newEntry));
@@ -1355,7 +1355,7 @@ clientReplyContext::identifyStoreObject()
     request_t *r = http->request;
     if (r->flags.cachable || r->flags.internal) {
        lookingforstore = 5;
-       _StoreEntry::getPublicByRequest (this, r);
+       StoreEntry::getPublicByRequest (this, r);
     } else
        identifyFoundObject (NullStoreEntry::getInstance());
 }
index d45fe8351f9ec4230cfbc74d212b552bf432846d..09cc85f23ac1e2e52c4ead9cfb53dde3b9a57260 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: htcp.cc,v 1.48 2003/01/04 01:12:49 hno Exp $
+ * $Id: htcp.cc,v 1.49 2003/01/17 05:49:34 robertc Exp $
  *
  * DEBUG: section 31    Hypertext Caching Protocol
  * AUTHOR: Duane Wesssels
@@ -95,7 +95,7 @@ public:
     void *operator new (unsigned int byteCount);
     void operator delete (void *address);
 
-    void created (_StoreEntry *newEntry);
+    void created (StoreEntry *newEntry);
     void checkHit();
     void checkedHit(StoreEntry *e);
     void setFrom (struct sockaddr_in *from);
@@ -674,11 +674,11 @@ htcpSpecifier::checkHit()
        checkedHit(NullStoreEntry::getInstance());
        return;
     }
-    _StoreEntry::getPublicByRequest(this, checkHitRequest);
+    StoreEntry::getPublicByRequest(this, checkHitRequest);
 }
 
 void
-htcpSpecifier::created (_StoreEntry *e)
+htcpSpecifier::created (StoreEntry *e)
 {
     StoreEntry *hit=NULL;
     assert (e);
index 22d4b40ee1253f60f604401673be29ab3fc7cd33..5dba7ef93e0b1d34dfbec34f07bb67559fc53929 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v2.cc,v 1.72 2002/10/21 14:00:02 adrian Exp $
+ * $Id: icp_v2.cc,v 1.73 2003/01/17 05:49:34 robertc Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -388,7 +388,7 @@ doV2Query(int fd, struct sockaddr_in from, char *buf, icp_common_t header)
     state->flags = flags;
     state->rtt = rtt;
     state->src_rtt = src_rtt;
-    _StoreEntry::getPublic (state, url, METHOD_GET);
+    StoreEntry::getPublic (state, url, METHOD_GET);
 }
 
 void
index 8dcf8235528ad7fc8ac2030158087257ac200a8e..ba564f010ceed5a38ec5795d1baa6bca4db2d08f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v3.cc,v 1.35 2002/10/13 20:35:01 robertc Exp $
+ * $Id: icp_v3.cc,v 1.36 2003/01/17 05:49:34 robertc Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -63,7 +63,7 @@ doV3Query(int fd, struct sockaddr_in from, char *buf, icp_common_t header)
     state->fd = fd;
     state->from = from;
     state->url = xstrdup (url);
-    _StoreEntry::getPublic (state, url, METHOD_GET);
+    StoreEntry::getPublic (state, url, METHOD_GET);
 }
 
 ICP3State::~ICP3State ()
index fdab257f17798b90cccbbb24f257bd482400094a..232aece90026aafb7bb85c18b803c0271304b8d0 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mime.cc,v 1.108 2002/11/10 04:43:04 hno Exp $
+ * $Id: mime.cc,v 1.109 2003/01/17 05:49:34 robertc Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -46,7 +46,7 @@ public:
     char const * getName () const;
     void _free();
     void load();
-    void created (_StoreEntry *newEntry);
+    void created (StoreEntry *newEntry);
 private:
     char *icon;
     char *url;
@@ -451,7 +451,7 @@ MimeIcon::load()
     const char *type = mimeGetContentType(icon);
     if (type == NULL)
        fatal("Unknown icon format while reading mime.conf\n");
-    _StoreEntry::getPublic(this, url, METHOD_GET);
+    StoreEntry::getPublic(this, url, METHOD_GET);
 }
 
 void
index cde0bb15ba8cd873d809f63dfe653052e337ad11..b49e872e7a4b4413a751ed0486c5709297d2de65 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_agent.cc,v 1.84 2002/10/13 20:35:03 robertc Exp $
+ * $Id: snmp_agent.cc,v 1.85 2003/01/17 05:49:34 robertc Exp $
  *
  * DEBUG: section 49     SNMP Interface
  * AUTHOR: Kostas Anagnostakis
@@ -300,7 +300,7 @@ snmp_prfSysFn(variable_list * Var, snint * ErrP)
        break;
     case PERF_SYS_NUMOBJCNT:
        Answer = snmp_var_new_integer(Var->name, Var->name_length,
-           (snint) _StoreEntry::inUseCount(),
+           (snint) StoreEntry::inUseCount(),
            SMI_COUNTER32);
        break;
     default:
index 05c7ce772e04e7f2e67cbefe65759395f5f232fa..eac0caf747312c279eeb2089ca626f9cd4a690e7 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.552 2002/12/27 10:26:33 robertc Exp $
+ * $Id: store.cc,v 1.553 2003/01/17 05:49:34 robertc Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -97,12 +97,12 @@ static EVH storeLateRelease;
  * local variables
  */
 static Stack LateReleaseStack;
-MemPool *_StoreEntry::pool = NULL;
+MemPool *StoreEntry::pool = NULL;
 
 void *
-_StoreEntry::operator new (size_t bytecount)
+StoreEntry::operator new (size_t bytecount)
 {
-    assert (bytecount == sizeof (_StoreEntry));
+    assert (bytecount == sizeof (StoreEntry));
     if (!pool) {
        pool = memPoolCreate ("StoreEntry", bytecount);
        memPoolSetChunkSize(pool, 2048 * 1024);
@@ -111,13 +111,13 @@ _StoreEntry::operator new (size_t bytecount)
 }
 
 void
-_StoreEntry::operator delete (void *address)
+StoreEntry::operator delete (void *address)
 {
     memPoolFree(pool, address);
 }
 
 size_t
-_StoreEntry::inUseCount()
+StoreEntry::inUseCount()
 {
     if (!pool)
        return 0;
@@ -127,7 +127,7 @@ _StoreEntry::inUseCount()
 }
 
 const char *
-_StoreEntry::getMD5Text() const
+StoreEntry::getMD5Text() const
 {
     return storeKeyText((const cache_key *)key);
 }
@@ -135,7 +135,7 @@ _StoreEntry::getMD5Text() const
 size_t
 storeEntryInUse ()
 {
-    return _StoreEntry::inUseCount();
+    return StoreEntry::inUseCount();
 }
 
 
@@ -175,7 +175,7 @@ StoreEntry *
 new_StoreEntry(int mem_obj_flag, const char *url, const char *log_url)
 {
     StoreEntry *e = NULL;
-    e = new _StoreEntry;
+    e = new StoreEntry;
     if (mem_obj_flag)
        e->mem_obj = new_MemObject(url, log_url);
     debug(20, 3) ("new_StoreEntry: returning %p\n", e);
@@ -360,10 +360,10 @@ storeGet(const cache_key * key)
 }
 
 void
-_StoreEntry::getPublicByRequestMethod  (StoreClient *aClient, request_t * request, const method_t method)
+StoreEntry::getPublicByRequestMethod  (StoreClient *aClient, request_t * request, const method_t method)
 {
     assert (aClient);
-    _StoreEntry *result = storeGetPublicByRequestMethod( request, method);
+    StoreEntry *result = storeGetPublicByRequestMethod( request, method);
     if (!result)
        aClient->created (NullStoreEntry::getInstance());
     else
@@ -371,20 +371,20 @@ _StoreEntry::getPublicByRequestMethod  (StoreClient *aClient, request_t * reques
 }
 
 void
-_StoreEntry::getPublicByRequest (StoreClient *aClient, request_t * request)
+StoreEntry::getPublicByRequest (StoreClient *aClient, request_t * request)
 {
     assert (aClient);
-    _StoreEntry *result = storeGetPublicByRequest (request);
+    StoreEntry *result = storeGetPublicByRequest (request);
     if (!result)
        result = NullStoreEntry::getInstance();
     aClient->created (result);
 }
 
 void
-_StoreEntry::getPublic (StoreClient *aClient, const char *uri, const method_t method)
+StoreEntry::getPublic (StoreClient *aClient, const char *uri, const method_t method)
 {
     assert (aClient);
-    _StoreEntry *result = storeGetPublic (uri, method);
+    StoreEntry *result = storeGetPublic (uri, method);
     if (!result)
        result = NullStoreEntry::getInstance();
     aClient->created (result);
index c68b5e74033b6a2dae47226aa813ecfeb7b72247..501df6bb132419fcf8b2f3273a11162575c8a4cd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: typedefs.h,v 1.144 2002/12/27 10:26:34 robertc Exp $
+ * $Id: typedefs.h,v 1.145 2003/01/17 05:49:35 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -136,7 +136,7 @@ typedef struct _mem_node mem_node;
 typedef struct _mem_hdr mem_hdr;
 typedef struct _store_client store_client;
 typedef struct _MemObject MemObject;
-typedef struct _StoreEntry StoreEntry;
+class StoreEntry;
 class SwapDir;
 typedef struct _helper_flags helper_flags;
 typedef struct _helper_stateful_flags helper_stateful_flags;
index 02e4acb1169c1b78508be24d5ce6142c99c928d1..bd0f37e40ee0a8c0d7e4d4c49888d41c006e98cd 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: urn.cc,v 1.79 2002/10/25 07:36:32 robertc Exp $
+ * $Id: urn.cc,v 1.80 2003/01/17 05:49:35 robertc Exp $
  *
  * DEBUG: section 52    URN Parsing
  * AUTHOR: Kostas Anagnostakis
@@ -41,7 +41,7 @@
 
 class UrnState : public StoreClient {
 public:
-    void created (_StoreEntry *newEntry);
+    void created (StoreEntry *newEntry);
     void *operator new (size_t byteCount);
     void operator delete (void *address);
     void start (request_t *, StoreEntry *);
@@ -211,11 +211,11 @@ UrnState::start(request_t * r, StoreEntry * e)
     setUriResFromRequest(r);
     if (urlres_r == NULL)
        return;
-    _StoreEntry::getPublic (this, urlres, METHOD_GET);
+    StoreEntry::getPublic (this, urlres, METHOD_GET);
 }
 
 void
-UrnState::created(_StoreEntry *newEntry)
+UrnState::created(StoreEntry *newEntry)
 {
     urlres_e = newEntry;
     if (urlres_e->isNull()) {