]>
Commit | Line | Data |
---|---|---|
5dee515e | 1 | /* |
bde978a6 | 2 | * Copyright (C) 1996-2015 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_ACLMETHOD_H |
10 | #define SQUID_ACLMETHOD_H | |
63be0a78 | 11 | |
127dce76 | 12 | #include "acl/Strategised.h" |
602d9612 | 13 | #include "acl/Strategy.h" |
f35c0145 | 14 | #include "http/RequestMethod.h" |
5dee515e | 15 | |
63be0a78 | 16 | /// \ingroup ACLAPI |
60745f24 | 17 | class ACLMethodStrategy : public ACLStrategy<HttpRequestMethod> |
62e76326 | 18 | { |
19 | ||
20 | public: | |
33810b1d | 21 | virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *, ACLFlags &); |
b0dd28ba | 22 | virtual bool requiresRequest() const {return true;} |
23 | ||
24 | static ACLMethodStrategy *Instance(); | |
63be0a78 | 25 | |
26 | /** | |
27 | * Not implemented to prevent copies of the instance. | |
28 | \par | |
29 | * Not private to prevent brain dead g+++ warnings about | |
30 | * private constructors with no friends | |
31 | */ | |
b0dd28ba | 32 | ACLMethodStrategy(ACLMethodStrategy const &); |
62e76326 | 33 | |
b0dd28ba | 34 | private: |
35 | static ACLMethodStrategy Instance_; | |
26ac0430 | 36 | ACLMethodStrategy() {} |
b0dd28ba | 37 | |
38 | ACLMethodStrategy&operator=(ACLMethodStrategy const &); | |
39 | }; | |
40 | ||
63be0a78 | 41 | /// \ingroup ACLAPI |
b0dd28ba | 42 | class ACLMethod |
43 | { | |
62e76326 | 44 | |
b0dd28ba | 45 | private: |
46 | static ACL::Prototype RegistryProtoype; | |
60745f24 | 47 | static ACLStrategised<HttpRequestMethod> RegistryEntry_; |
b0dd28ba | 48 | }; |
5dee515e | 49 | |
b0dd28ba | 50 | #endif /* SQUID_ACLMETHOD_H */ |
f53969cc | 51 |