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