]> git.ipfire.org Git - thirdparty/squid.git/blame_incremental - src/acl/Note.h
Simplify appending SBuf to String (#2108)
[thirdparty/squid.git] / src / acl / Note.h
... / ...
CommitLineData
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
17namespace Acl {
18
19/// common parent of several ACLs dealing with transaction annotations
20class AnnotationCheck: public ParameterizedNode< ACLData<NotePairs::Entry *> >
21{
22public:
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
31class NoteCheck: public Acl::AnnotationCheck
32{
33public:
34 /* Acl::Node API */
35 int match(ACLChecklist *) override;
36 bool requiresRequest() const override { return true; }
37
38private:
39 bool matchNotes(const NotePairs *) const;
40};
41
42} // namespace Acl
43
44#endif /* SQUID_SRC_ACL_NOTE_H */
45