HttpHdrSc.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2018 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 "dlink.h"
13 #include "mem/forward.h"
14 #include "SquidString.h"
15 
16 class HttpHdrScTarget;
17 class Packable;
18 class StatHist;
19 class StoreEntry;
20 
21 typedef enum {
27  SC_ENUM_END /* also used to mean "invalid" */
29 
30 /* http surogate control header field */
31 class HttpHdrSc
32 {
34 
35 public:
36  HttpHdrSc(const HttpHdrSc &);
37  HttpHdrSc() {}
38  ~HttpHdrSc();
39 
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);
47 
49 private:
50  HttpHdrScTarget * findTarget (const char *target);
51 
52 };
53 
54 /* Http Surrogate Control Header Field */
55 void httpHdrScStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
56 void httpHdrScInitModule (void);
58 void httpHdrScSetMaxAge(HttpHdrSc *, char const *, int);
59 
60 #endif /* SQUID_HTTPHDRSURROGATECONTROL_H */
61 
HttpHdrSc * httpHdrScParseCreate(String const &)
Definition: HttpHdrSc.cc:60
#define MEMPROXY_CLASS(CLASS)
HttpHdrSc()
Definition: HttpHdrSc.h:37
void updateStats(StatHist *) const
Definition: HttpHdrSc.cc:277
void addTarget(HttpHdrScTarget *t)
Definition: HttpHdrSc.cc:355
char * p
Definition: membanger.c:43
void httpHdrScSetMaxAge(HttpHdrSc *, char const *, int)
HttpHdrScTarget * getMergedTarget(const char *ourtarget)
Definition: HttpHdrSc.cc:334
bool parse(const String *str)
Definition: HttpHdrSc.cc:74
dlink_list targets
Definition: HttpHdrSc.h:48
HttpHdrScTarget * findTarget(const char *target)
Definition: HttpHdrSc.cc:314
void setMaxAge(char const *target, int max_age)
Definition: HttpHdrSc.cc:264
void httpHdrScStatDumper(StoreEntry *sentry, int idx, double val, double size, int count)
Definition: HttpHdrSc.cc:301
void httpHdrScInitModule(void)
Definition: HttpHdrSc.cc:49
void addTargetAtTail(HttpHdrScTarget *t)
Definition: HttpHdrSc.cc:360
http_hdr_sc_type
Definition: HttpHdrSc.h:21
void packInto(Packable *p) const
Definition: HttpHdrSc.cc:250
int size
Definition: ModDevPoll.cc:77

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors