]>
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 AR |
17 | public: |
18 | AccessRule(); | |
19 | ~AccessRule(); | |
20 | ||
21 | void parse(ConfigParser &parser); | |
b6b637eb | 22 | void finalize(); |
62c7f90e AR |
23 | |
24 | // service group consisting of one or more services | |
25 | ServiceGroup *group(); | |
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; | |
38 | extern AccessRules &AllRules(); | |
39 | extern AccessRule *FindRule(const AccessRule::Id &id); | |
40 | ||
41 | } // namespace Adaptation | |
42 | ||
43 | #endif /* SQUID_ADAPTATION__ACCESS_RULE_H */ |