]> git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/ecap/Config.h
SourceFormat Enforcement
[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 /// General eCAP configuration
33 class Config: public Adaptation::Config
34 {
35
36 public:
37 Config();
38 ~Config();
39
40 virtual bool finalize();
41
42 protected:
43 virtual Adaptation::ServiceConfig *newServiceConfig() const;
44
45 private:
46 Config(const Config &); // not implemented
47 Config &operator =(const Config &); // not implemented
48
49 virtual Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg);
50 };
51
52 extern Config TheConfig;
53
54 } // namespace Ecap
55 } // namespace Adaptation
56
57 #endif /* SQUID_ECAP_CONFIG_H */