]>
Commit | Line | Data |
---|---|---|
a68cf076 AR |
1 | #ifndef SQUID_ADAPTATION__SERVICE_H |
2 | #define SQUID_ADAPTATION__SERVICE_H | |
3 | ||
4 | #include "SquidString.h" | |
5 | #include "adaptation/Elements.h" | |
6 | ||
7 | namespace Adaptation { | |
8 | ||
9 | // manages adaptation service configuration in squid.conf | |
10 | // specific adaptation mechanisms extend this class | |
11 | class Service | |
12 | { | |
13 | public: | |
14 | Service(); | |
15 | virtual ~Service(); | |
16 | ||
17 | const char *methodStr() const; | |
18 | const char *vectPointStr() const; | |
19 | ||
20 | public: | |
21 | String key; // service name in the configuration file | |
22 | String uri; // service URI | |
23 | ||
24 | // service URI components | |
25 | String host; | |
26 | String resource; | |
27 | int port; | |
28 | ||
29 | Method method; // what is being adapted (REQMOD vs RESPMOD) | |
30 | VectPoint point; // where the adaptation happens (pre- or post-cache) | |
31 | bool bypass; | |
32 | ||
33 | protected: | |
34 | bool configure(); | |
35 | Method parseMethod(const char *str) const; | |
36 | VectPoint parseVectPoint(const char *service) const; | |
37 | }; | |
38 | ||
39 | } // namespace Adaptation | |
40 | ||
41 | #endif /* SQUID_ADAPTATION__SERVICE_H */ |