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