]> 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 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 /* DEBUG: section 93 eCAP Interface */
10
11 #include "squid.h"
12 #include "adaptation/ecap/Config.h"
13 #include "adaptation/ecap/Host.h"
14 #include "adaptation/ecap/ServiceRep.h"
15
16 Adaptation::Ecap::Config Adaptation::Ecap::TheConfig;
17
18 Adaptation::Ecap::Config::Config()
19 {
20 }
21
22 Adaptation::Ecap::Config::~Config()
23 {
24 }
25
26 bool
27 Adaptation::Ecap::Config::finalize()
28 {
29 if (!Adaptation::Config::finalize())
30 return false;
31 Host::Register();
32 CheckUnusedAdapterServices(AllServices());
33 return true;
34 }
35
36 Adaptation::ServiceConfig *
37 Adaptation::Ecap::Config::newServiceConfig() const
38 {
39 return new ServiceConfig();
40 }
41
42 Adaptation::ServicePointer
43 Adaptation::Ecap::Config::createService(const ServiceConfigPointer &cfg)
44 {
45 return new Adaptation::Ecap::ServiceRep(cfg);
46 }
47
48 /* ServiceConfig */
49
50 bool
51 Adaptation::Ecap::ServiceConfig::grokExtension(const char *name, const char *value)
52 {
53 extensions.push_back(std::make_pair(name, value));
54 return true;
55 }
56