]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/Note.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / acl / Note.h
1 /*
2 * Copyright (C) 1996-2017 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_ACLNOTE_H
10 #define SQUID_ACLNOTE_H
11
12 #include "acl/Strategised.h"
13 #include "acl/Strategy.h"
14
15 class ACLNoteData;
16 class CharacterSet;
17 class HttpRequest;
18
19 /// \ingroup ACLAPI
20 class ACLNoteStrategy : public ACLStrategy<NotePairs::Entry *>
21 {
22
23 public:
24 virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *, ACLFlags &);
25 virtual bool requiresRequest() const { return true; }
26
27 static ACLNoteStrategy *Instance();
28 /* Not implemented to prevent copies of the instance. */
29 /* Not private to prevent brain dead g+++ warnings about
30 * private constructors with no friends */
31 ACLNoteStrategy(ACLNoteStrategy const &);
32
33 private:
34 static ACLNoteStrategy Instance_;
35 ACLNoteStrategy() { }
36
37 ACLNoteStrategy& operator = (ACLNoteStrategy const &);
38 bool matchNotes(ACLData<MatchType> *, const NotePairs *, const CharacterSet *) const;
39 };
40
41 /// \ingroup ACLAPI
42 class ACLNote
43 {
44
45 private:
46 static ACL::Prototype RegistryProtoype;
47 static ACLStrategised<NotePairs::Entry *> RegistryEntry_;
48 };
49
50 #endif /* SQUID_ACLNOTE_H */
51