]>
Commit | Line | Data |
---|---|---|
bbc27441 AJ |
1 | /* |
2 | * Copyright (C) 1996-2014 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 | ||
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 | 17 | class ConfigParser; |
eb45ed57 | 18 | class dlink_list; |
7f0b3324 | 19 | class StoreEntry; |
c15d448c AR |
20 | class wordlist; |
21 | ||
ed898bdf AR |
22 | /// Register an ACL object for future deletion. Repeated registrations are OK. |
23 | /// \ingroup ACLAPI | |
24 | void aclRegister(ACL *acl); | |
c15d448c | 25 | /// \ingroup ACLAPI |
8a648e8d | 26 | void aclDestroyAccessList(acl_access **list); |
c15d448c | 27 | /// \ingroup ACLAPI |
8a648e8d | 28 | void aclDestroyAcls(ACL **); |
c15d448c | 29 | /// \ingroup ACLAPI |
8a648e8d | 30 | void aclDestroyAclList(ACLList **); |
6f58d7d7 AR |
31 | /// Parses a single line of a "action followed by acls" directive (e.g., http_access). |
32 | /// \ingroup ACLAPI | |
33 | void 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 | |
37 | void aclParseAclList(ConfigParser &parser, Acl::Tree **, const char *label); | |
38 | /// Template to convert various context lables to strings. \ingroup ACLAPI | |
39 | template <class Any> | |
40 | inline | |
e936c41c AR |
41 | void 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 | 49 | int aclIsProxyAuth(const char *name); |
c15d448c | 50 | /// \ingroup ACLAPI |
8a648e8d | 51 | err_type aclGetDenyInfoPage(AclDenyInfoList ** head, const char *name, int redirect_allowed); |
c15d448c | 52 | /// \ingroup ACLAPI |
8a648e8d | 53 | void aclParseDenyInfoLine(AclDenyInfoList **); |
c15d448c | 54 | /// \ingroup ACLAPI |
8a648e8d | 55 | void aclDestroyDenyInfoList(AclDenyInfoList **); |
c15d448c | 56 | /// \ingroup ACLAPI |
8a648e8d | 57 | wordlist *aclDumpGeneric(const ACL *); |
c15d448c | 58 | /// \ingroup ACLAPI |
8a648e8d | 59 | void aclCacheMatchFlush(dlink_list * cache); |
c15d448c | 60 | /// \ingroup ACLAPI |
8a648e8d | 61 | void dump_acl_access(StoreEntry * entry, const char *name, acl_access * head); |
71be37e0 | 62 | /// \ingroup ACLAPI |
8a648e8d | 63 | void dump_acl_list(StoreEntry * entry, ACLList * head); |
c15d448c AR |
64 | |
65 | #endif /* SQUID_ACL_GADGETS_H */ |