]> git.ipfire.org Git - thirdparty/squid.git/blob - src/ExternalACLEntry.cc
Some missing external acl pieces
[thirdparty/squid.git] / src / ExternalACLEntry.cc
1
2 /*
3 * $Id: ExternalACLEntry.cc,v 1.4 2003/07/09 14:14:57 hno Exp $
4 *
5 * DEBUG: section 82 External ACL
6 * AUTHOR: Henrik Nordstrom, MARA Systems AB
7 *
8 * SQUID Web Proxy Cache http://www.squid-cache.org/
9 * ----------------------------------------------------------
10 *
11 * The contents of this file is Copyright (C) 2002 by MARA Systems AB,
12 * Sweden, unless otherwise is indicated in the specific function. The
13 * author gives his full permission to include this file into the Squid
14 * software product under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) any later version.
17 *
18 * Squid is the result of efforts by numerous individuals from
19 * the Internet community; see the CONTRIBUTORS file for full
20 * details. Many organizations have provided support for Squid's
21 * development; see the SPONSORS file for full details. Squid is
22 * Copyrighted (C) 2001 by the Regents of the University of
23 * California; see the COPYRIGHT file for full details. Squid
24 * incorporates software developed and/or copyrighted by other
25 * sources; see the CREDITS file for full details.
26 *
27 * This program is free software; you can redistribute it and/or modify
28 * it under the terms of the GNU General Public License as published by
29 * the Free Software Foundation; either version 2 of the License, or
30 * (at your option) any later version.
31 *
32 * This program is distributed in the hope that it will be useful,
33 * but WITHOUT ANY WARRANTY; without even the implied warranty of
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 * GNU General Public License for more details.
36 *
37 * You should have received a copy of the GNU General Public License
38 * along with this program; if not, write to the Free Software
39 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
40 *
41 * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
42 */
43
44 #include "squid.h"
45 #include "ExternalACLEntry.h"
46
47 /******************************************************************
48 * external_acl cache
49 */
50
51 CBDATA_CLASS_INIT(ExternalACLEntry);
52
53 void *
54 ExternalACLEntry::operator new (size_t byteCount)
55 {
56 /* derived classes with different sizes must implement their own new */
57 assert (byteCount == sizeof (ExternalACLEntry));
58 CBDATA_INIT_TYPE(ExternalACLEntry);
59 return cbdataAlloc(ExternalACLEntry);
60 }
61
62 void
63 ExternalACLEntry::operator delete (void *address)
64 {
65 cbdataFree (address);
66 }
67
68 void
69 ExternalACLEntry::deleteSelf() const
70 {
71 delete this;
72 }
73
74 ExternalACLEntry::ExternalACLEntry()
75 {
76 lru.next = lru.prev = NULL;
77 result = 0;
78 date = 0;
79 def = NULL;
80 }
81
82 ExternalACLEntry::~ExternalACLEntry()
83 {
84 safe_free(key);
85 }
86
87 void
88 ExternalACLEntry::update(ExternalACLEntryData const &someData)
89 {
90 date = squid_curtime;
91 result = someData.result;
92
93 user = someData.user;
94 password = someData.password;
95 message = someData.message;
96 tag = someData.tag;
97 log = someData.log;
98 }