]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
5b74111a | 2 | * Copyright (C) 1996-2018 The Squid Software Foundation and contributors |
bbc27441 AJ |
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 | ||
39baccc8 CT |
9 | #ifndef SQUID_ACLNOTE_H |
10 | #define SQUID_ACLNOTE_H | |
11 | ||
4eac3407 CT |
12 | #include "acl/CharacterSetOption.h" |
13 | #include "acl/Data.h" | |
602d9612 | 14 | #include "acl/Strategy.h" |
4eac3407 | 15 | #include "Notes.h" |
39baccc8 | 16 | |
4eac3407 | 17 | namespace Acl { |
39baccc8 | 18 | |
4eac3407 CT |
19 | /// common parent of several ACLs dealing with transaction annotations |
20 | class AnnotationStrategy: public ACLStrategy<NotePairs::Entry *> | |
39baccc8 | 21 | { |
39baccc8 | 22 | public: |
4eac3407 | 23 | AnnotationStrategy(): delimiters(CharacterSet(__FILE__, ",")) {} |
39baccc8 | 24 | |
4eac3407 | 25 | virtual const Acl::Options &options() override; |
39baccc8 | 26 | |
4eac3407 | 27 | Acl::CharacterSetOptionValue delimiters; ///< annotation separators |
39baccc8 CT |
28 | }; |
29 | ||
4eac3407 CT |
30 | } // namespace Acl |
31 | ||
39baccc8 | 32 | /// \ingroup ACLAPI |
4eac3407 | 33 | class ACLNoteStrategy: public Acl::AnnotationStrategy |
39baccc8 CT |
34 | { |
35 | ||
4eac3407 CT |
36 | public: |
37 | virtual int match (ACLData<MatchType> * &, ACLFilledChecklist *); | |
38 | virtual bool requiresRequest() const { return true; } | |
39 | ||
39baccc8 | 40 | private: |
4eac3407 | 41 | bool matchNotes(ACLData<MatchType> *, const NotePairs *) const; |
39baccc8 CT |
42 | }; |
43 | ||
44 | #endif /* SQUID_ACLNOTE_H */ | |
f53969cc | 45 |