]> git.ipfire.org Git - thirdparty/squid.git/blame - src/adaptation/AccessRule.h
HttpRequest::helperNotes to NotePairs
[thirdparty/squid.git] / src / adaptation / AccessRule.h
CommitLineData
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
7class acl_access;
8e57fe25 8class ConfigParser;
62c7f90e 9
26ac0430
AJ
10namespace Adaptation
11{
62c7f90e
AR
12
13// manages adaptation_access configuration by associating an acl with
14// an adaptation service group
26ac0430
AJ
15class AccessRule
16{
62c7f90e 17public:
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
27public:
28 typedef int Id;
29 const Id id;
30 String groupId;
31 acl_access *acl;
32
33private:
34 static Id LastId;
35};
36
37typedef Vector<Adaptation::AccessRule*> AccessRules;
8a648e8d
FC
38AccessRules &AllRules();
39AccessRule *FindRule(const AccessRule::Id &id);
40AccessRule *FindRuleByGroupId(const String &groupId);
62c7f90e
AR
41
42} // namespace Adaptation
43
44#endif /* SQUID_ADAPTATION__ACCESS_RULE_H */