]>
Commit | Line | Data |
---|---|---|
62c7f90e AR |
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; | |
8e57fe25 | 8 | class ConfigParser; |
62c7f90e | 9 | |
26ac0430 AJ |
10 | namespace Adaptation |
11 | { | |
62c7f90e AR |
12 | |
13 | // manages adaptation_access configuration by associating an acl with | |
14 | // an adaptation service group | |
26ac0430 AJ |
15 | class AccessRule |
16 | { | |
62c7f90e | 17 | public: |
287bbe9a | 18 | AccessRule(const String &groupId); |
62c7f90e AR |
19 | ~AccessRule(); |
20 | ||
21 | void parse(ConfigParser &parser); | |
b6b637eb | 22 | void finalize(); |
62c7f90e AR |
23 | |
24 | // service group consisting of one or more services | |
a22e6cd3 | 25 | ServiceGroupPointer group(); |
62c7f90e AR |
26 | |
27 | public: | |
28 | typedef int Id; | |
29 | const Id id; | |
30 | String groupId; | |
31 | acl_access *acl; | |
32 | ||
33 | private: | |
34 | static Id LastId; | |
35 | }; | |
36 | ||
37 | typedef Vector<Adaptation::AccessRule*> AccessRules; | |
8a648e8d FC |
38 | AccessRules &AllRules(); |
39 | AccessRule *FindRule(const AccessRule::Id &id); | |
40 | AccessRule *FindRuleByGroupId(const String &groupId); | |
62c7f90e AR |
41 | |
42 | } // namespace Adaptation | |
43 | ||
44 | #endif /* SQUID_ADAPTATION__ACCESS_RULE_H */ |