]> git.ipfire.org Git - thirdparty/squid.git/blame - src/adaptation/Service.h
Moving common adaptation code from ICAP/ to adaptation/.
[thirdparty/squid.git] / src / adaptation / Service.h
CommitLineData
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
7namespace Adaptation {
8
9// manages adaptation service configuration in squid.conf
10// specific adaptation mechanisms extend this class
11class Service
12{
13public:
14 Service();
15 virtual ~Service();
16
17 const char *methodStr() const;
18 const char *vectPointStr() const;
19
20public:
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
33protected:
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 */