]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/HttpStatus.h
Boilerplate: update copyright blurbs on src/
[thirdparty/squid.git] / src / acl / HttpStatus.h
1 /*
2 * Copyright (C) 1996-2014 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_ACLHTTPSTATUS_H
10 #define SQUID_ACLHTTPSTATUS_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 static int compare(acl_httpstatus_data* const& a, acl_httpstatus_data* const& b);
24 };
25
26 /// \ingroup ACLAPI
27 class ACLHTTPStatus : public ACL
28 {
29
30 public:
31 MEMPROXY_CLASS(ACLHTTPStatus);
32
33 ACLHTTPStatus(char const *);
34 ACLHTTPStatus(ACLHTTPStatus const &);
35 ~ACLHTTPStatus();
36 ACLHTTPStatus&operator=(ACLHTTPStatus const &);
37
38 virtual ACL *clone()const;
39 virtual char const *typeString() const;
40 virtual void parse();
41 virtual int match(ACLChecklist *checklist);
42 virtual SBufList dump() const;
43 virtual bool empty () const;
44 virtual bool requiresReply() const { return true; }
45
46 protected:
47 static Prototype RegistryProtoype;
48 static ACLHTTPStatus RegistryEntry_;
49 SplayNode<acl_httpstatus_data*> *data;
50 char const *class_;
51 };
52
53 MEMPROXY_CLASS_INLINE(ACLHTTPStatus);
54
55 #endif /* SQUID_ACLHTTPSTATUS_H */