]> git.ipfire.org Git - thirdparty/squid.git/blame - src/acl/Gadgets.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / acl / Gadgets.h
CommitLineData
c15d448c
AR
1#ifndef SQUID_ACL_GADGETS_H
2#define SQUID_ACL_GADGETS_H
3
6f58d7d7 4#include "acl/forward.h"
602d9612 5#include "err_type.h"
c15d448c 6
fea76fa1
AR
7#if HAVE_SSTREAM
8#include <sstream>
9#endif
10
7f0b3324 11class ConfigParser;
eb45ed57 12class dlink_list;
7f0b3324 13class StoreEntry;
c15d448c
AR
14class wordlist;
15
16/// \ingroup ACLAPI
8a648e8d 17void aclDestroyAccessList(acl_access **list);
c15d448c 18/// \ingroup ACLAPI
8a648e8d 19void aclDestroyAcls(ACL **);
c15d448c 20/// \ingroup ACLAPI
8a648e8d 21void aclDestroyAclList(ACLList **);
6f58d7d7
AR
22/// Parses a single line of a "action followed by acls" directive (e.g., http_access).
23/// \ingroup ACLAPI
24void aclParseAccessLine(const char *directive, ConfigParser &parser, Acl::Tree **);
25/// Parses a single line of a "some context followed by acls" directive (e.g., note n v).
26/// The label parameter identifies the context (for debugging).
27/// \ingroup ACLAPI
28void aclParseAclList(ConfigParser &parser, Acl::Tree **, const char *label);
29/// Template to convert various context lables to strings. \ingroup ACLAPI
30template <class Any>
31inline
e936c41c
AR
32void aclParseAclList(ConfigParser &parser, Acl::Tree **tree, const Any any)
33{
6f58d7d7
AR
34 std::ostringstream buf;
35 buf << any;
36 aclParseAclList(parser, tree, buf.str().c_str());
37}
38
c15d448c 39/// \ingroup ACLAPI
8a648e8d 40int aclIsProxyAuth(const char *name);
c15d448c 41/// \ingroup ACLAPI
8a648e8d 42err_type aclGetDenyInfoPage(AclDenyInfoList ** head, const char *name, int redirect_allowed);
c15d448c 43/// \ingroup ACLAPI
8a648e8d 44void aclParseDenyInfoLine(AclDenyInfoList **);
c15d448c 45/// \ingroup ACLAPI
8a648e8d 46void aclDestroyDenyInfoList(AclDenyInfoList **);
c15d448c 47/// \ingroup ACLAPI
8a648e8d 48wordlist *aclDumpGeneric(const ACL *);
c15d448c 49/// \ingroup ACLAPI
8a648e8d 50void aclCacheMatchFlush(dlink_list * cache);
c15d448c 51/// \ingroup ACLAPI
8a648e8d 52void dump_acl_access(StoreEntry * entry, const char *name, acl_access * head);
71be37e0 53/// \ingroup ACLAPI
8a648e8d 54void dump_acl_list(StoreEntry * entry, ACLList * head);
c15d448c
AR
55
56#endif /* SQUID_ACL_GADGETS_H */