HttpHdrSc.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 #ifndef SQUID_HTTPHDRSURROGATECONTROL_H
10 #define SQUID_HTTPHDRSURROGATECONTROL_H
11 
12 #include "http/forward.h"
13 #include "HttpHdrScTarget.h"
14 #include "SquidString.h"
15 
16 #include <list>
17 
18 class Packable;
19 class StatHist;
20 class StoreEntry;
21 
22 /* http surogate control header field */
23 class HttpHdrSc
24 {
26 
27 public:
28  bool parse(const String *str);
29  void packInto(Packable * p) const;
30  void updateStats(StatHist *) const;
31  HttpHdrScTarget * getMergedTarget(const char *ourtarget); // TODO: make const?
32  void setMaxAge(char const *target, int max_age);
33 
34 private:
35  HttpHdrScTarget * findTarget (const char *target);
36 
37  std::list<HttpHdrScTarget, PoolingAllocator<HttpHdrScTarget>> targets;
38 };
39 
40 /* Http Surrogate Control Header Field */
41 void httpHdrScStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
42 void httpHdrScInitModule (void);
44 void httpHdrScSetMaxAge(HttpHdrSc *, char const *, int);
45 
46 #endif /* SQUID_HTTPHDRSURROGATECONTROL_H */
47 
void httpHdrScStatDumper(StoreEntry *sentry, int idx, double val, double size, int count)
Definition: HttpHdrSc.cc:272
void packInto(Packable *p) const
Definition: HttpHdrSc.cc:228
void updateStats(StatHist *) const
Definition: HttpHdrSc.cc:251
bool parse(const String *str)
Definition: HttpHdrSc.cc:74
HttpHdrScTarget * getMergedTarget(const char *ourtarget)
Definition: HttpHdrSc.cc:296
int size
Definition: ModDevPoll.cc:77
void setMaxAge(char const *target, int max_age)
Definition: HttpHdrSc.cc:238
std::list< HttpHdrScTarget, PoolingAllocator< HttpHdrScTarget > > targets
Definition: HttpHdrSc.h:37
HttpHdrScTarget * findTarget(const char *target)
Definition: HttpHdrSc.cc:285
void httpHdrScInitModule(void)
Definition: HttpHdrSc.cc:49
#define MEMPROXY_CLASS(CLASS)
void httpHdrScSetMaxAge(HttpHdrSc *, char const *, int)
HttpHdrSc * httpHdrScParseCreate(String const &)
Definition: HttpHdrSc.cc:60

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors