]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ExternalACLEntry.h
merge from SslServerCertValidator r12332
[thirdparty/squid.git] / src / ExternalACLEntry.h
1
2 /*
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.
29 *
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.
34 *
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
45 #include "acl/Acl.h"
46 #include "cbdata.h"
47 #include "hash.h"
48 #include "SquidString.h"
49
50 class external_acl;
51 /******************************************************************
52 * ExternalACLEntryData
53 * Core data that ExternalACLEntry manages.
54 * Not meant to be used as remote storage at any point:
55 * stack or static or composition use only.
56 */
57
58 class ExternalACLEntryData
59 {
60
61 public:
62 ExternalACLEntryData() : result(ACCESS_DUNNO) {}
63
64 allow_t result;
65 #if USE_AUTH
66 // TODO use an AuthUser to hold this info
67 String user;
68 String password;
69 #endif
70 String message;
71 String tag;
72 String log;
73 };
74
75 /*******************************************************************
76 * external_acl cache entry
77 * Used opaqueue in the interface
78 */
79
80 class ExternalACLEntry: public hash_link
81 {
82
83 public:
84 void *operator new (size_t bytesToAllocate);
85 void operator delete (void *address);
86
87 ExternalACLEntry();
88 ~ExternalACLEntry();
89
90 void update(ExternalACLEntryData const &);
91 dlink_node lru;
92 allow_t result;
93 time_t date;
94 #if USE_AUTH
95 String user;
96 String password;
97 #endif
98 String message;
99 String tag;
100 String log;
101 external_acl *def;
102
103 private:
104 CBDATA_CLASS(ExternalACLEntry);
105 };
106
107 typedef class ExternalACLEntry external_acl_entry;
108
109 #endif