]> git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/ecap/Config.h
merge from trunk r12441
[thirdparty/squid.git] / src / adaptation / ecap / Config.h
1 /*
2 * DEBUG: section 93 eCAP Interface
3 */
4
5 #ifndef SQUID_ECAP_CONFIG_H
6 #define SQUID_ECAP_CONFIG_H
7
8 #include "adaptation/Config.h"
9 #include "adaptation/ServiceConfig.h"
10 #include <list>
11 #include <utility>
12
13 namespace Adaptation
14 {
15 namespace Ecap
16 {
17
18 /// eCAP service configuration
19 class ServiceConfig: public Adaptation::ServiceConfig
20 {
21 public:
22 // Adaptation::ServiceConfig API
23 virtual bool grokExtension(const char *name, const char *value);
24
25 public:
26 typedef std::pair<std::string, std::string> Extension; // name=value in cfg
27 typedef std::list<Extension> Extensions;
28 Extensions extensions;
29 };
30
31 /// General eCAP configuration
32 class Config: public Adaptation::Config
33 {
34
35 public:
36 Config();
37 ~Config();
38
39 virtual bool finalize();
40
41 protected:
42 virtual Adaptation::ServiceConfig *newServiceConfig() const;
43
44 private:
45 Config(const Config &); // not implemented
46 Config &operator =(const Config &); // not implemented
47
48 virtual Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg);
49 };
50
51 extern Config TheConfig;
52
53 } // namespace Ecap
54 } // namespace Adaptation
55
56 #endif /* SQUID_ECAP_CONFIG_H */