]> git.ipfire.org Git - thirdparty/squid.git/blame - src/acl/Gadgets.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / src / acl / Gadgets.h
CommitLineData
bbc27441 1/*
77b1029d 2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
bbc27441
AJ
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
c15d448c
AR
9#ifndef SQUID_ACL_GADGETS_H
10#define SQUID_ACL_GADGETS_H
11
6f58d7d7 12#include "acl/forward.h"
602d9612 13#include "err_type.h"
c15d448c 14
fea76fa1 15#include <sstream>
fea76fa1 16
7f0b3324 17class ConfigParser;
eb45ed57 18class dlink_list;
7f0b3324 19class StoreEntry;
c15d448c
AR
20class wordlist;
21
ed898bdf
AR
22/// Register an ACL object for future deletion. Repeated registrations are OK.
23/// \ingroup ACLAPI
24void aclRegister(ACL *acl);
c15d448c 25/// \ingroup ACLAPI
8a648e8d 26void aclDestroyAccessList(acl_access **list);
c15d448c 27/// \ingroup ACLAPI
8a648e8d 28void aclDestroyAcls(ACL **);
c15d448c 29/// \ingroup ACLAPI
8a648e8d 30void aclDestroyAclList(ACLList **);
6f58d7d7
AR
31/// Parses a single line of a "action followed by acls" directive (e.g., http_access).
32/// \ingroup ACLAPI
33void aclParseAccessLine(const char *directive, ConfigParser &parser, Acl::Tree **);
34/// Parses a single line of a "some context followed by acls" directive (e.g., note n v).
35/// The label parameter identifies the context (for debugging).
36/// \ingroup ACLAPI
37void aclParseAclList(ConfigParser &parser, Acl::Tree **, const char *label);
38/// Template to convert various context lables to strings. \ingroup ACLAPI
39template <class Any>
40inline
e936c41c
AR
41void aclParseAclList(ConfigParser &parser, Acl::Tree **tree, const Any any)
42{
6f58d7d7
AR
43 std::ostringstream buf;
44 buf << any;
45 aclParseAclList(parser, tree, buf.str().c_str());
46}
47
c15d448c 48/// \ingroup ACLAPI
8a648e8d 49int aclIsProxyAuth(const char *name);
c15d448c 50/// \ingroup ACLAPI
8a648e8d 51err_type aclGetDenyInfoPage(AclDenyInfoList ** head, const char *name, int redirect_allowed);
c15d448c 52/// \ingroup ACLAPI
8a648e8d 53void aclParseDenyInfoLine(AclDenyInfoList **);
c15d448c 54/// \ingroup ACLAPI
8a648e8d 55void aclDestroyDenyInfoList(AclDenyInfoList **);
c15d448c 56/// \ingroup ACLAPI
8a648e8d 57wordlist *aclDumpGeneric(const ACL *);
c15d448c 58/// \ingroup ACLAPI
8a648e8d 59void aclCacheMatchFlush(dlink_list * cache);
c15d448c 60/// \ingroup ACLAPI
8a648e8d 61void dump_acl_access(StoreEntry * entry, const char *name, acl_access * head);
71be37e0 62/// \ingroup ACLAPI
8a648e8d 63void dump_acl_list(StoreEntry * entry, ACLList * head);
c15d448c
AR
64
65#endif /* SQUID_ACL_GADGETS_H */
f53969cc 66