]> git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/ServiceConfig.h
Merge from trunk
[thirdparty/squid.git] / src / adaptation / ServiceConfig.h
1 #ifndef SQUID_ADAPTATION__SERVICE_CONFIG_H
2 #define SQUID_ADAPTATION__SERVICE_CONFIG_H
3
4 #include "SquidString.h"
5 #include "RefCount.h"
6 #include "adaptation/Elements.h"
7
8 namespace Adaptation {
9
10 // manages adaptation service configuration in squid.conf
11 class ServiceConfig
12 {
13 public:
14 ServiceConfig();
15
16 const char *methodStr() const;
17 const char *vectPointStr() const;
18
19 bool parse();
20
21 public:
22 String key; // service_configConfig name in the configuration file
23 String uri; // service_configConfig URI
24
25 // service_configConfig URI components
26 String protocol;
27 String host;
28 String resource;
29 int port;
30
31 Method method; // what is being adapted (REQMOD vs RESPMOD)
32 VectPoint point; // where the adaptation happens (pre- or post-cache)
33 bool bypass;
34
35 protected:
36 Method parseMethod(const char *buf) const;
37 VectPoint parseVectPoint(const char *buf) const;
38 };
39
40 } // namespace Adaptation
41
42 #endif /* SQUID_ADAPTATION__SERVICE_CONFIG_H */