]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/AclDenyInfoList.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / acl / AclDenyInfoList.h
1 /*
2 * Copyright (C) 1996-2017 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_ACLDENYINFOLIST_H_
10 #define SQUID_ACLDENYINFOLIST_H_
11
12 #include "acl/AclNameList.h"
13 #include "err_type.h"
14 #include "errorpage.h"
15 #include "mem/forward.h"
16
17 /// deny_info representation. Currently a POD.
18 class AclDenyInfoList
19 {
20 MEMPROXY_CLASS(AclDenyInfoList);
21
22 public:
23 AclDenyInfoList(const char *t) {
24 err_page_name = xstrdup(t);
25 err_page_id = errorReservePageId(t);
26 }
27 ~AclDenyInfoList() {
28 xfree(err_page_name);
29 delete acl_list;
30 while (next) {
31 auto *a = next;
32 next = a->next;
33 a->next = nullptr;
34 delete a;
35 }
36 }
37 err_type err_page_id = ERR_NONE;
38 char *err_page_name = nullptr;
39 AclNameList *acl_list = nullptr;
40 AclDenyInfoList *next = nullptr;
41 };
42
43 #endif /* SQUID_ACLDENYINFOLIST_H_ */
44