/*
- * $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/
class StoreClient;
#endif
-struct _StoreEntry : public hash_link {
+class StoreEntry : public hash_link {
public:
virtual const char *getMD5Text() const;
};
#ifdef __cplusplus
-class NullStoreEntry:public _StoreEntry
+class NullStoreEntry:public StoreEntry
{
public:
static NullStoreEntry *getInstance();
/*
- * $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
/*
- * $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)
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;
/* 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;
/* 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);
}
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();
}
void
-clientReplyContext::purgeFoundObject(_StoreEntry *entry)
+clientReplyContext::purgeFoundObject(StoreEntry *entry)
{
assert (entry && !entry->isNull());
StoreIOBuffer tempBuffer = EMPTYIOBUFFER;
{
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 */
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));
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());
}
/*
- * $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
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);
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);
/*
- * $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
state->flags = flags;
state->rtt = rtt;
state->src_rtt = src_rtt;
- _StoreEntry::getPublic (state, url, METHOD_GET);
+ StoreEntry::getPublic (state, url, METHOD_GET);
}
void
/*
- * $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
state->fd = fd;
state->from = from;
state->url = xstrdup (url);
- _StoreEntry::getPublic (state, url, METHOD_GET);
+ StoreEntry::getPublic (state, url, METHOD_GET);
}
ICP3State::~ICP3State ()
/*
- * $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
char const * getName () const;
void _free();
void load();
- void created (_StoreEntry *newEntry);
+ void created (StoreEntry *newEntry);
private:
char *icon;
char *url;
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
/*
- * $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
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:
/*
- * $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
* 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);
}
void
-_StoreEntry::operator delete (void *address)
+StoreEntry::operator delete (void *address)
{
memPoolFree(pool, address);
}
size_t
-_StoreEntry::inUseCount()
+StoreEntry::inUseCount()
{
if (!pool)
return 0;
}
const char *
-_StoreEntry::getMD5Text() const
+StoreEntry::getMD5Text() const
{
return storeKeyText((const cache_key *)key);
}
size_t
storeEntryInUse ()
{
- return _StoreEntry::inUseCount();
+ return StoreEntry::inUseCount();
}
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);
}
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
}
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);
/*
- * $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/
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;
/*
- * $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
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 *);
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()) {