]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/AnnotationData.h
2dd1288d10dd18edbef2f99c268edc67c08a75c5
[thirdparty/squid.git] / src / acl / AnnotationData.h
1 /*
2 * Copyright (C) 1996-2023 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_ACLANNOTATIONDATA_H
10 #define SQUID_ACLANNOTATIONDATA_H
11
12 #include "AccessLogEntry.h"
13 #include "acl/Data.h"
14 #include "Notes.h"
15
16 /// \ingroup ACLAPI
17 class ACLAnnotationData : public ACLData<NotePairs::Entry *>
18 {
19 MEMPROXY_CLASS(ACLAnnotationData);
20
21 public:
22 ACLAnnotationData();
23
24 /* ACLData<M> API */
25 bool match(NotePairs::Entry *) override { return true; }
26 SBufList dump() const override;
27 void parse() override;
28 bool empty() const override { return notes->empty(); }
29
30 /// Stores annotations into pairs.
31 void annotate(NotePairs::Pointer pairs, const CharacterSet *delimiters, const AccessLogEntry::Pointer &al);
32
33 private:
34 Notes::Pointer notes;
35 };
36
37 #endif /* SQUID_ACLANNOTATIONDATA_H */
38