]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/HttpHdrSc.h
2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
9 #ifndef SQUID_HTTPHDRSURROGATECONTROL_H
10 #define SQUID_HTTPHDRSURROGATECONTROL_H
13 #include "mem/forward.h"
14 #include "SquidString.h"
16 class HttpHdrScTarget
;
27 SC_ENUM_END
/* also used to mean "invalid" */
30 /* http surogate control header field */
33 MEMPROXY_CLASS(HttpHdrSc
);
36 HttpHdrSc(const HttpHdrSc
&);
40 bool parse(const String
*str
);
41 void packInto(Packable
* p
) const;
42 void updateStats(StatHist
*) const;
43 HttpHdrScTarget
* getMergedTarget (const char *ourtarget
); //todo: make const?
44 void setMaxAge(char const *target
, int max_age
);
45 void addTarget(HttpHdrScTarget
*t
);
46 void addTargetAtTail(HttpHdrScTarget
*t
);
50 HttpHdrScTarget
* findTarget (const char *target
);
54 /* Http Surrogate Control Header Field */
55 void httpHdrScStatDumper(StoreEntry
* sentry
, int idx
, double val
, double size
, int count
);
56 void httpHdrScInitModule (void);
57 HttpHdrSc
*httpHdrScParseCreate(String
const &);
58 void httpHdrScSetMaxAge(HttpHdrSc
*, char const *, int);
60 #endif /* SQUID_HTTPHDRSURROGATECONTROL_H */