]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/HttpStatus.h
CI: Upgrade GitHub Setup Node and CodeQL actions to Node 20 (#1845)
[thirdparty/squid.git] / src / acl / HttpStatus.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_SRC_ACL_HTTPSTATUS_H
10 #define SQUID_SRC_ACL_HTTPSTATUS_H
11
12 #include "acl/Acl.h"
13 #include "acl/Checklist.h"
14 #include "splay.h"
15
16 /// \ingroup ACLAPI
17 struct acl_httpstatus_data {
18 int status1, status2;
19 acl_httpstatus_data(int);
20 acl_httpstatus_data(int, int);
21 SBuf toStr() const; // was toStr
22 };
23
24 /// \ingroup ACLAPI
25 class ACLHTTPStatus : public Acl::Node
26 {
27 MEMPROXY_CLASS(ACLHTTPStatus);
28
29 public:
30 ACLHTTPStatus(char const *);
31 ~ACLHTTPStatus() override;
32
33 char const *typeString() const override;
34 void parse() override;
35 int match(ACLChecklist *checklist) override;
36 SBufList dump() const override;
37 bool empty () const override;
38 bool requiresReply() const override { return true; }
39
40 protected:
41 Splay<acl_httpstatus_data*> *data;
42 char const *class_;
43 };
44
45 #endif /* SQUID_SRC_ACL_HTTPSTATUS_H */
46