]> git.ipfire.org Git - thirdparty/squid.git/blob - src/acl/AclNameList.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / acl / AclNameList.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_ACL_ACLNAMELIST_H_
10 #define SQUID_ACL_ACLNAMELIST_H_
11
12 #include "acl/forward.h"
13 #include "mem/forward.h"
14
15 /// list of name-based ACLs
16 class AclNameList
17 {
18 MEMPROXY_CLASS(AclNameList);
19
20 public:
21 AclNameList(const char *t) {
22 xstrncpy(name, t, ACL_NAME_SZ-1);
23 }
24 ~AclNameList() {
25 // recursion is okay, these lists are short
26 delete next;
27 }
28
29 char name[ACL_NAME_SZ];
30 AclNameList *next = nullptr;
31 };
32 // TODO: convert to a std::list<string>
33
34 #endif /* SQUID_ACLNAMELIST_H_ */
35