]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/HttpHdrSc.h
2 * Copyright (C) 1996-2023 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_SRC_HTTPHDRSC_H
10 #define SQUID_SRC_HTTPHDRSC_H
12 #include "http/forward.h"
13 #include "HttpHdrScTarget.h"
14 #include "mem/PoolingAllocator.h"
15 #include "SquidString.h"
23 /* http surogate control header field */
26 MEMPROXY_CLASS(HttpHdrSc
);
29 bool parse(const String
*str
);
30 void packInto(Packable
* p
) const;
31 void updateStats(StatHist
*) const;
32 HttpHdrScTarget
* getMergedTarget(const char *ourtarget
); // TODO: make const?
33 void setMaxAge(char const *target
, int max_age
);
36 HttpHdrScTarget
* findTarget (const char *target
);
38 std::list
<HttpHdrScTarget
, PoolingAllocator
<HttpHdrScTarget
>> targets
;
41 /* Http Surrogate Control Header Field */
42 void httpHdrScStatDumper(StoreEntry
* sentry
, int idx
, double val
, double size
, int count
);
43 void httpHdrScInitModule (void);
44 HttpHdrSc
*httpHdrScParseCreate(String
const &);
45 void httpHdrScSetMaxAge(HttpHdrSc
*, char const *, int);
47 http_hdr_sc_type
&operator++(http_hdr_sc_type
&);
48 #endif /* SQUID_SRC_HTTPHDRSC_H */