]> git.ipfire.org Git - thirdparty/squid.git/blob - src/adaptation/AccessRule.h
Merge from trunk
[thirdparty/squid.git] / src / adaptation / AccessRule.h
1 #ifndef SQUID_ADAPTATION__ACCESS_RULE_H
2 #define SQUID_ADAPTATION__ACCESS_RULE_H
3
4 #include "SquidString.h"
5 #include "adaptation/forward.h"
6
7 class acl_access;
8
9 namespace Adaptation {
10
11 // manages adaptation_access configuration by associating an acl with
12 // an adaptation service group
13 class AccessRule {
14 public:
15 AccessRule();
16 ~AccessRule();
17
18 void parse(ConfigParser &parser);
19 void finalize();
20
21 // service group consisting of one or more services
22 ServiceGroup *group();
23
24 public:
25 typedef int Id;
26 const Id id;
27 String groupId;
28 acl_access *acl;
29
30 private:
31 static Id LastId;
32 };
33
34 typedef Vector<Adaptation::AccessRule*> AccessRules;
35 extern AccessRules &AllRules();
36 extern AccessRule *FindRule(const AccessRule::Id &id);
37
38 } // namespace Adaptation
39
40 #endif /* SQUID_ADAPTATION__ACCESS_RULE_H */