#ifndef SQUID_HTTPHDRCC_H
#define SQUID_HTTPHDRCC_H
+#include "dlink.h"
#include "enums.h"
#include "mem/forward.h"
#include "SquidString.h"
class Packable;
+typedef enum {
+ CC_PUBLIC = 0,
+ CC_PRIVATE,
+ CC_NO_CACHE,
+ CC_NO_STORE,
+ CC_NO_TRANSFORM,
+ CC_MUST_REVALIDATE,
+ CC_PROXY_REVALIDATE,
+ CC_MAX_AGE,
+ CC_S_MAXAGE,
+ CC_MAX_STALE,
+ CC_MIN_FRESH,
+ CC_ONLY_IF_CACHED,
+ CC_STALE_IF_ERROR,
+ CC_OTHER,
+ CC_ENUM_END /* also used to mean "invalid" */
+} http_hdr_cc_type;
+
/** Http Cache-Control header representation
*
* Store and parse the Cache-Control HTTP header.
#include "squid.h"
#include "base/LookupTable.h"
+#include "dlink.h"
#include "HttpHdrSc.h"
#include "HttpHeader.h"
#include "HttpHeaderFieldStat.h"
#include "HttpHeaderStat.h"
#include "HttpHeaderTools.h"
+#include "HttpHdrScTarget.h"
#include "Store.h"
#include "StrList.h"
#include "util.h"
return NULL;
}
+void
+HttpHdrSc::addTarget(HttpHdrScTarget *t) {
+ dlinkAdd(t, &t->node, &targets);
+}
+
+void
+HttpHdrSc::addTargetAtTail(HttpHdrScTarget *t) {
+ dlinkAddTail (t, &t->node, &targets);
+}
#ifndef SQUID_HTTPHDRSURROGATECONTROL_H
#define SQUID_HTTPHDRSURROGATECONTROL_H
-#include "HttpHdrScTarget.h"
+#include "dlink.h"
+#include "mem/AllocatorProxy.h"
+#include "SquidString.h"
+class HttpHdrScTarget;
class StatHist;
+class Packable;
+class StoreEntry;
+
+typedef enum {
+ SC_NO_STORE,
+ SC_NO_STORE_REMOTE,
+ SC_MAX_AGE,
+ SC_CONTENT,
+ SC_OTHER,
+ SC_ENUM_END /* also used to mean "invalid" */
+} http_hdr_sc_type;
/* http surogate control header field */
-
class HttpHdrSc
{
MEMPROXY_CLASS(HttpHdrSc);
void updateStats(StatHist *) const;
HttpHdrScTarget * getMergedTarget (const char *ourtarget); //todo: make const?
void setMaxAge(char const *target, int max_age);
- void addTarget(HttpHdrScTarget *t) {
- dlinkAdd(t, &t->node, &targets);
- }
- void addTargetAtTail(HttpHdrScTarget *t) {
- dlinkAddTail (t, &t->node, &targets);
- }
+ void addTarget(HttpHdrScTarget *t);
+ void addTargetAtTail(HttpHdrScTarget *t);
dlink_list targets;
private:
#include "squid.h"
#include "HttpHdrSc.h"
+#include "HttpHdrScTarget.h"
#include "StatHist.h"
http_hdr_sc_type &operator++ (http_hdr_sc_type &aHeader);
#include "defines.h"
#include "dlink.h"
+#include "HttpHdrSc.h"
#include "mem/forward.h"
#include "SquidString.h"
#include "typedefs.h"
#ifndef HTTPHEADERSTAT_H_
#define HTTPHEADERSTAT_H_
+#include "HttpHdrCc.h"
+#include "HttpHdrSc.h"
#include "StatHist.h"
/// HTTP per header statistics
PEER_MULTICAST
} peer_t;
-typedef enum {
- CC_PUBLIC = 0,
- CC_PRIVATE,
- CC_NO_CACHE,
- CC_NO_STORE,
- CC_NO_TRANSFORM,
- CC_MUST_REVALIDATE,
- CC_PROXY_REVALIDATE,
- CC_MAX_AGE,
- CC_S_MAXAGE,
- CC_MAX_STALE,
- CC_MIN_FRESH,
- CC_ONLY_IF_CACHED,
- CC_STALE_IF_ERROR,
- CC_OTHER,
- CC_ENUM_END /* also used to mean "invalid" */
-} http_hdr_cc_type;
-
-typedef enum {
- SC_NO_STORE,
- SC_NO_STORE_REMOTE,
- SC_MAX_AGE,
- SC_CONTENT,
- SC_OTHER,
- SC_ENUM_END /* also used to mean "invalid" */
-} http_hdr_sc_type;
typedef enum _mem_status_t {
NOT_IN_MEMORY,