]> git.ipfire.org Git - thirdparty/squid.git/blame - src/acl/Note.h
Maintenance: automate header guards 2/3 (#1655)
[thirdparty/squid.git] / src / acl / Note.h
CommitLineData
bbc27441 1/*
b8ae064d 2 * Copyright (C) 1996-2023 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
ff9d9458
FC
9#ifndef SQUID_SRC_ACL_NOTE_H
10#define SQUID_SRC_ACL_NOTE_H
39baccc8 11
4eac3407
CT
12#include "acl/CharacterSetOption.h"
13#include "acl/Data.h"
8319d478 14#include "acl/ParameterizedNode.h"
4eac3407 15#include "Notes.h"
39baccc8 16
4eac3407 17namespace Acl {
39baccc8 18
4eac3407 19/// common parent of several ACLs dealing with transaction annotations
8319d478 20class AnnotationCheck: public ParameterizedNode< ACLData<NotePairs::Entry *> >
39baccc8 21{
39baccc8 22public:
8319d478 23 AnnotationCheck(): delimiters(CharacterSet(__FILE__, ",")) {}
39baccc8 24
337b9aa4 25 const Acl::Options &options() override;
39baccc8 26
4eac3407 27 Acl::CharacterSetOptionValue delimiters; ///< annotation separators
39baccc8
CT
28};
29
8319d478
AR
30/// a "note" ACL
31class NoteCheck: public Acl::AnnotationCheck
39baccc8 32{
4eac3407 33public:
922513e5 34 /* Acl::Node API */
8319d478 35 int match(ACLChecklist *) override;
337b9aa4 36 bool requiresRequest() const override { return true; }
4eac3407 37
39baccc8 38private:
8319d478 39 bool matchNotes(const NotePairs *) const;
39baccc8
CT
40};
41
8319d478
AR
42} // namespace Acl
43
ff9d9458 44#endif /* SQUID_SRC_ACL_NOTE_H */
f53969cc 45