]>
Commit | Line | Data |
---|---|---|
1e5562e3 | 1 | |
2 | /* | |
1e5562e3 | 3 | * DEBUG: section 82 External ACL |
4 | * AUTHOR: Henrik Nordstrom, MARA Systems AB | |
5 | * | |
6 | * SQUID Web Proxy Cache http://www.squid-cache.org/ | |
7 | * ---------------------------------------------------------- | |
8 | * | |
9 | * The contents of this file is Copyright (C) 2002 by MARA Systems AB, | |
10 | * Sweden, unless otherwise is indicated in the specific function. The | |
11 | * author gives his full permission to include this file into the Squid | |
12 | * software product under the terms of the GNU General Public License as | |
13 | * published by the Free Software Foundation; either version 2 of the | |
14 | * License, or (at your option) any later version. | |
15 | * | |
16 | * Squid is the result of efforts by numerous individuals from | |
17 | * the Internet community; see the CONTRIBUTORS file for full | |
18 | * details. Many organizations have provided support for Squid's | |
19 | * development; see the SPONSORS file for full details. Squid is | |
20 | * Copyrighted (C) 2001 by the Regents of the University of | |
21 | * California; see the COPYRIGHT file for full details. Squid | |
22 | * incorporates software developed and/or copyrighted by other | |
23 | * sources; see the CREDITS file for full details. | |
24 | * | |
25 | * This program is free software; you can redistribute it and/or modify | |
26 | * it under the terms of the GNU General Public License as published by | |
27 | * the Free Software Foundation; either version 2 of the License, or | |
28 | * (at your option) any later version. | |
26ac0430 | 29 | * |
1e5562e3 | 30 | * This program is distributed in the hope that it will be useful, |
31 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
32 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
33 | * GNU General Public License for more details. | |
26ac0430 | 34 | * |
1e5562e3 | 35 | * You should have received a copy of the GNU General Public License |
36 | * along with this program; if not, write to the Free Software | |
37 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. | |
38 | * | |
39 | * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org> | |
40 | */ | |
41 | ||
42 | #ifndef SQUID_EXTERNALACLENTRY_H | |
43 | #define SQUID_EXTERNALACLENTRY_H | |
44 | ||
e5f825ea | 45 | #include "acl/Acl.h" |
aa839030 | 46 | #include "cbdata.h" |
c6983ec7 | 47 | #include "hash.h" |
a0592634 | 48 | #include "Notes.h" |
c6983ec7 | 49 | #include "SquidString.h" |
aa839030 | 50 | |
613924ee | 51 | class external_acl; |
1e5562e3 | 52 | /****************************************************************** |
53 | * ExternalACLEntryData | |
54 | * Core data that ExternalACLEntry manages. | |
55 | * Not meant to be used as remote storage at any point: | |
56 | * stack or static or composition use only. | |
57 | */ | |
58 | ||
59 | class ExternalACLEntryData | |
60 | { | |
61 | ||
62 | public: | |
e5f825ea | 63 | ExternalACLEntryData() : result(ACCESS_DUNNO) {} |
1e5562e3 | 64 | |
e5f825ea | 65 | allow_t result; |
a0592634 AJ |
66 | |
67 | /// list of all kv-pairs returned by the helper | |
68 | NotePairs notes; | |
69 | ||
2f1431ea AJ |
70 | #if USE_AUTH |
71 | // TODO use an AuthUser to hold this info | |
30abd221 | 72 | String user; |
73 | String password; | |
2f1431ea | 74 | #endif |
30abd221 | 75 | String message; |
76 | String tag; | |
77 | String log; | |
1e5562e3 | 78 | }; |
79 | ||
1e5562e3 | 80 | /******************************************************************* |
81 | * external_acl cache entry | |
82 | * Used opaqueue in the interface | |
83 | */ | |
84 | ||
85 | class ExternalACLEntry: public hash_link | |
86 | { | |
87 | ||
88 | public: | |
1e5562e3 | 89 | ExternalACLEntry(); |
90 | ~ExternalACLEntry(); | |
91 | ||
92 | void update(ExternalACLEntryData const &); | |
93 | dlink_node lru; | |
e5f825ea | 94 | allow_t result; |
1e5562e3 | 95 | time_t date; |
a0592634 AJ |
96 | |
97 | /// list of all kv-pairs returned by the helper | |
98 | NotePairs notes; | |
99 | ||
2f1431ea | 100 | #if USE_AUTH |
30abd221 | 101 | String user; |
102 | String password; | |
2f1431ea | 103 | #endif |
30abd221 | 104 | String message; |
105 | String tag; | |
106 | String log; | |
1e5562e3 | 107 | external_acl *def; |
108 | ||
109 | private: | |
f49c09b2 | 110 | CBDATA_CLASS2(ExternalACLEntry); |
1e5562e3 | 111 | }; |
112 | ||
113 | typedef class ExternalACLEntry external_acl_entry; | |
114 | ||
115 | #endif |