]>
Commit | Line | Data |
---|---|---|
5dee515e | 1 | /* |
4ac4a490 | 2 | * Copyright (C) 1996-2017 The Squid Software Foundation and contributors |
5dee515e | 3 | * |
bbc27441 AJ |
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. | |
5dee515e | 7 | */ |
8 | ||
b0dd28ba | 9 | #ifndef SQUID_ACLSTRATEGY_H |
10 | #define SQUID_ACLSTRATEGY_H | |
5dee515e | 11 | |
33810b1d | 12 | #include "acl/Acl.h" |
c0941a6a | 13 | #include "acl/Data.h" |
4eac3407 | 14 | #include "acl/Options.h" |
c0941a6a AR |
15 | |
16 | class ACLFilledChecklist; | |
62e76326 | 17 | |
5dee515e | 18 | template<class M> |
62e76326 | 19 | |
4eac3407 | 20 | /// A matching algorithm. |
b0dd28ba | 21 | class ACLStrategy |
62e76326 | 22 | { |
23 | ||
24 | public: | |
5dee515e | 25 | typedef M MatchType; |
4eac3407 CT |
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; | |
5dee515e | 30 | virtual bool requiresRequest() const {return false;} |
62e76326 | 31 | |
f201d9ac | 32 | virtual bool requiresReply() const {return false;} |
33 | ||
65092baf | 34 | virtual bool valid() const {return true;} |
35 | ||
26ac0430 | 36 | virtual ~ACLStrategy() {} |
3d0ac046 | 37 | }; |
5dee515e | 38 | |
b0dd28ba | 39 | #endif /* SQUID_ACLSTRATEGY_H */ |
f53969cc | 40 |