]> git.ipfire.org Git - thirdparty/squid.git/blame - src/acl/HasComponentData.h
Maintenance: Consistent use of C++11 "override" specifier (#1224)
[thirdparty/squid.git] / src / acl / HasComponentData.h
CommitLineData
5ec4cffe 1/*
bf95c10a 2 * Copyright (C) 1996-2022 The Squid Software Foundation and contributors
5ec4cffe
EB
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_ACLHASCOMPONENTDATA_H
10#define SQUID_ACLHASCOMPONENTDATA_H
11
12#include "acl/Checklist.h"
13#include "acl/Data.h"
14
15/// \ingroup ACLAPI
16class ACLHasComponentData : public ACLData<ACLChecklist *>
17{
18 MEMPROXY_CLASS(ACLHasComponentData);
19
20public:
21 ACLHasComponentData();
22
23 /* ACLData<M> API */
337b9aa4
AR
24 bool match(ACLChecklist *) override;
25 SBufList dump() const override;
26 void parse() override;
27 bool empty() const override { return false; }
5ec4cffe
EB
28
29private:
30 enum ComponentKind { coRequest = 0, coResponse, coAle, coEnd };
31 void parseComponent(const char *token);
32
33 static const SBuf RequestStr;
34 static const SBuf ResponseStr;
35 static const SBuf AleStr;
36
37 typedef bool (ACLChecklist::*ComponentCheck)() const;
38 /// component check callbacks, ordered by component kind ID
39 std::vector<ComponentCheck> componentMethods;
40};
41
42#endif
43