]>
git.ipfire.org Git - thirdparty/squid.git/blob - tools/purge/squid-tlv.cc
1 // Author: Jens-S. V?ckler <voeckler@rvs.uni-hannover.de>
6 // (c) 1999 Lehrgebiet Rechnernetze und Verteilte Systeme
7 // Universit?t Hannover, Germany
9 // Permission to use, copy, modify, distribute, and sell this software
10 // and its documentation for any purpose is hereby granted without fee,
11 // provided that (i) the above copyright notices and this permission
12 // notice appear in all copies of the software and related documentation,
13 // and (ii) the names of the Lehrgebiet Rechnernetze und Verteilte
14 // Systeme and the University of Hannover may not be used in any
15 // advertising or publicity relating to the software without the
16 // specific, prior written permission of Lehrgebiet Rechnernetze und
17 // Verteilte Systeme and the University of Hannover.
19 // THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
20 // EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
21 // WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
23 // IN NO EVENT SHALL THE LEHRGEBIET RECHNERNETZE UND VERTEILTE SYSTEME OR
24 // THE UNIVERSITY OF HANNOVER BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
25 // INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
26 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
27 // ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
28 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
31 // Revision 1.1 1999/06/15 21:10:16 voeckler
37 #include "squid-tlv.hh"
39 SquidTLV::SquidTLV( SquidMetaType _type
, size_t _size
, void* _data
)
46 SquidMetaList::SquidMetaList()
51 SquidMetaList::~SquidMetaList()
53 for ( SquidTLV
* temp
= head
; temp
; temp
= head
) {
60 SquidMetaList::append( SquidMetaType type
, size_t size
, void* data
)
62 SquidTLV
* temp
= new SquidTLV( type
, size
, data
);
63 if ( head
== 0 ) head
= tail
= temp
;
71 SquidMetaList::search( SquidMetaType type
) const
73 const SquidTLV
* temp
= head
;
74 while ( temp
&& temp
->type
!= type
) temp
= temp
->next
;