]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * Copyright (C) 1996-2025 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_SRC_ACL_NOTE_H | |
10 | #define SQUID_SRC_ACL_NOTE_H | |
11 | ||
12 | #include "acl/CharacterSetOption.h" | |
13 | #include "acl/Data.h" | |
14 | #include "acl/ParameterizedNode.h" | |
15 | #include "Notes.h" | |
16 | ||
17 | namespace Acl { | |
18 | ||
19 | /// common parent of several ACLs dealing with transaction annotations | |
20 | class AnnotationCheck: public ParameterizedNode< ACLData<NotePairs::Entry *> > | |
21 | { | |
22 | public: | |
23 | AnnotationCheck(): delimiters(CharacterSet(__FILE__, ",")) {} | |
24 | ||
25 | const Acl::Options &options() override; | |
26 | ||
27 | Acl::CharacterSetOptionValue delimiters; ///< annotation separators | |
28 | }; | |
29 | ||
30 | /// a "note" ACL | |
31 | class NoteCheck: public Acl::AnnotationCheck | |
32 | { | |
33 | public: | |
34 | /* Acl::Node API */ | |
35 | int match(ACLChecklist *) override; | |
36 | bool requiresRequest() const override { return true; } | |
37 | ||
38 | private: | |
39 | bool matchNotes(const NotePairs *) const; | |
40 | }; | |
41 | ||
42 | } // namespace Acl | |
43 | ||
44 | #endif /* SQUID_SRC_ACL_NOTE_H */ | |
45 |