]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/Strategy.h
Source Format Enforcement (#1234)
[thirdparty/squid.git] / src / acl / Strategy.h
1 /*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9 #ifndef SQUID_ACLSTRATEGY_H
10 #define SQUID_ACLSTRATEGY_H
11
12 #include "acl/Acl.h"
13 #include "acl/Data.h"
14 #include "acl/Options.h"
15
16 class ACLFilledChecklist;
17
18 template<class M>
19
20 /// A matching algorithm.
21 class ACLStrategy
22 {
23
24 public:
25 typedef M MatchType;
26
27 /* Replicate ACL API parts relevant to the matching algorithm. */
28 virtual const Acl::Options &options() { return Acl::NoOptions(); }
29 virtual int match (ACLData<M> * &, ACLFilledChecklist *) = 0;
30 virtual bool requiresRequest() const {return false;}
31
32 virtual bool requiresReply() const {return false;}
33
34 virtual bool valid() const {return true;}
35
36 virtual ~ACLStrategy() {}
37 };
38
39 #endif /* SQUID_ACLSTRATEGY_H */
40