1 #ifndef SQUID_ADAPTATION__CONFIG_H
2 #define SQUID_ADAPTATION__CONFIG_H
5 #include "base/AsyncCall.h"
6 #include "adaptation/forward.h"
7 #include "adaptation/Elements.h"
18 static void Finalize(bool enable
);
20 static void ParseServiceSet(void);
21 static void ParseServiceChain(void);
23 static void ParseAccess(ConfigParser
&parser
);
24 static void FreeAccess(void);
25 static void DumpAccess(StoreEntry
*, const char *);
27 friend class AccessCheck
;
30 static bool Enabled
; // true if at least one adaptation mechanism is
32 // these are global squid.conf options, documented elsewhere
33 static char *masterx_shared_name
; // global TODO: do we need TheConfig?
34 static int service_iteration_limit
;
35 static int send_client_ip
;
36 static int send_username
;
37 static int use_indirect_client
;
39 // Options below are accessed via Icap::TheConfig or Ecap::TheConfig
40 // TODO: move ICAP-specific options to Icap::Config and add TheConfig
42 int service_failure_limit
;
43 time_t oldest_service_failure
;
44 int service_revival_delay
;
46 typedef Vector
<ServiceConfigPointer
> ServiceConfigs
;
47 ServiceConfigs serviceConfigs
;
52 void parseService(void);
53 void freeService(void);
54 void dumpService(StoreEntry
*, const char *) const;
55 ServicePointer
findService(const String
&);
57 virtual void finalize();
60 /// creates service configuration object that will parse and keep cfg info
61 virtual ServiceConfig
*newServiceConfig() const;
64 Config(const Config
&); // unsupported
65 Config
&operator =(const Config
&); // unsupported
67 virtual ServicePointer
createService(ServiceConfigPointer cfg
) = 0;
69 static void ParseServiceGroup(ServiceGroupPointer group
);
70 static void FreeServiceGroups(void);
71 static void DumpServiceGroups(StoreEntry
*, const char *);
74 } // namespace Adaptation
76 #endif /* SQUID_ADAPTATION__CONFIG_H */