]> git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/ecap/Config.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / adaptation / ecap / Config.cc
1 /*
2 * DEBUG: section 93 eCAP Interface
3 */
4 #include "squid.h"
5 #include "adaptation/ecap/Config.h"
6 #include "adaptation/ecap/Host.h"
7 #include "adaptation/ecap/ServiceRep.h"
8
9 Adaptation::Ecap::Config Adaptation::Ecap::TheConfig;
10
11 Adaptation::Ecap::Config::Config()
12 {
13 }
14
15 Adaptation::Ecap::Config::~Config()
16 {
17 }
18
19 bool
20 Adaptation::Ecap::Config::finalize()
21 {
22 if (!Adaptation::Config::finalize())
23 return false;
24 Host::Register();
25 CheckUnusedAdapterServices(AllServices());
26 return true;
27 }
28
29 Adaptation::ServiceConfig *
30 Adaptation::Ecap::Config::newServiceConfig() const
31 {
32 return new ServiceConfig();
33 }
34
35 Adaptation::ServicePointer
36 Adaptation::Ecap::Config::createService(const ServiceConfigPointer &cfg)
37 {
38 return new Adaptation::Ecap::ServiceRep(cfg);
39 }
40
41 /* ServiceConfig */
42
43 bool
44 Adaptation::Ecap::ServiceConfig::grokExtension(const char *name, const char *value)
45 {
46 extensions.push_back(std::make_pair(name, value));
47 return true;
48 }
49