*/
#include "squid.h"
-
-/// \todo protect the 'ostream' file includes via configure file tests as per squid conventions.
-#include <ostream>
-
#include "StoreIOBuffer.h"
#include "Range.h"
#include "RefCount.h"
#include "RemovalPolicy.h"
#if USE_SQUID_ESI
-#include "ESIElement.h"
+#include "esi/Element.h"
#endif
+#if HAVE_OSTREAM
+#include <ostream>
+#endif
+
+
class AsyncCall;
class StoreClient;
class MemObject;
class Store;
class StoreSearch;
-typedef unsigned int ping_status_t;
-
/**
\ingroup StoreAPI
*/
u_short flags;
/* END OF ON-DISK STORE_META_STD */
-sfileno swap_filen:
- 25;
+ sfileno swap_filen:25;
+
+ sdirno swap_dirn:7;
-sdirno swap_dirn:
- 7;
u_short lock_count; /* Assume < 65536! */
-mem_status_t mem_status:
- 3;
+ mem_status_t mem_status:3;
-ping_status_t ping_status:
- 3;
+ ping_status_t ping_status:3;
-store_status_t store_status:
- 3;
+ store_status_t store_status:3;
-swap_status_t swap_status:
- 3;
+ swap_status_t swap_status:3;
public:
static size_t inUseCount();
bool isEmpty () const {return true;}
- virtual size_t bytesWanted(Range<size_t> const aRange) const { assert (aRange.size());return aRange.end - 1;}
+ virtual size_t bytesWanted(Range<size_t> const aRange) const { assert (aRange.size()); return aRange.end - 1;}
void operator delete(void *address);
void complete() {}
virtual void diskFull();
/** Retrieve a store entry from the store */
- virtual StoreEntry * get
- (const cache_key *) = 0;
+ virtual StoreEntry * get(const cache_key *) = 0;
/** \todo imeplement the async version */
- virtual void get
- (String const key , STOREGETCLIENT callback, void *cbdata) = 0;
+ virtual void get(String const key , STOREGETCLIENT callback, void *cbdata) = 0;
/* prepare the store for use. The store need not be usable immediately,
* it should respond to readable() and writable() with true as soon
/// \ingroup StoreAPI
SQUIDCEXTERN int expiresMoreThan(time_t, time_t);
-#if STDC_HEADERS
/// \ingroup StoreAPI
SQUIDCEXTERN void storeAppendPrintf(StoreEntry *, const char *,...) PRINTF_FORMAT_ARG2;
-#else
-/// \ingroup StoreAPI
-SQUIDCEXTERN void storeAppendPrintf();
-#endif
/// \ingroup StoreAPI
SQUIDCEXTERN void storeAppendVPrintf(StoreEntry *, const char *, va_list ap);
*/
SQUIDCEXTERN void packerToStoreInit(Packer * p, StoreEntry * e);
+/// \ingroup StoreAPI
+SQUIDCEXTERN void storeGetMemSpace(int size);
+
#ifdef _USE_INLINE_
#include "Store.cci"
#endif