]> git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/icap/Config.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / adaptation / icap / Config.h
1 /*
2 * Copyright (C) 1996-2020 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 #ifndef SQUID_ICAPCONFIG_H
10 #define SQUID_ICAPCONFIG_H
11
12 #include "acl/forward.h"
13 #include "adaptation/Config.h"
14 #include "adaptation/icap/ServiceRep.h"
15 #include "base/AsyncCall.h"
16 #include "event.h"
17
18 namespace Adaptation
19 {
20 namespace Icap
21 {
22
23 class ConfigParser;
24
25 class Config: public Adaptation::Config
26 {
27
28 public:
29 int default_options_ttl;
30 int preview_enable;
31 int preview_size;
32 int allow206_enable;
33 time_t connect_timeout_raw;
34 time_t io_timeout_raw;
35 int reuse_connections;
36 char* client_username_header;
37 int client_username_encode;
38 acl_access *repeat; ///< icap_retry ACL in squid.conf
39 int repeat_limit; ///< icap_retry_limit in squid.conf
40
41 Config();
42 ~Config();
43
44 time_t connect_timeout(bool bypassable) const;
45 time_t io_timeout(bool bypassable) const;
46
47 private:
48 Config(const Config &); // not implemented
49 Config &operator =(const Config &); // not implemented
50
51 virtual Adaptation::ServicePointer createService(const ServiceConfigPointer &cfg);
52 };
53
54 extern Config TheConfig;
55
56 } // namespace Icap
57 } // namespace Adaptation
58
59 #endif /* SQUID_ICAPCONFIG_H */
60