]> git.ipfire.org Git - thirdparty/squid.git/blob - tools/purge/copyout.hh
Merged from trunk
[thirdparty/squid.git] / tools / purge / copyout.hh
1 //
2 // $Id: copyout.hh,v 1.1 1999/06/15 21:10:47 voeckler Exp $
3 //
4 // Author: Jens-S. Vöckler <voeckler@rvs.uni-hannover.de>
5 //
6 // File: copyout.hh
7 // Tue Jun 15 1999
8 //
9 // (c) 1999 Lehrgebiet Rechnernetze und Verteilte Systeme
10 // Universität Hannover, Germany
11 //
12 // Permission to use, copy, modify, distribute, and sell this software
13 // and its documentation for any purpose is hereby granted without fee,
14 // provided that (i) the above copyright notices and this permission
15 // notice appear in all copies of the software and related documentation,
16 // and (ii) the names of the Lehrgebiet Rechnernetze und Verteilte
17 // Systeme and the University of Hannover may not be used in any
18 // advertising or publicity relating to the software without the
19 // specific, prior written permission of Lehrgebiet Rechnernetze und
20 // Verteilte Systeme and the University of Hannover.
21 //
22 // THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
23 // EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
24 // WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
25 //
26 // IN NO EVENT SHALL THE LEHRGEBIET RECHNERNETZE UND VERTEILTE SYSTEME OR
27 // THE UNIVERSITY OF HANNOVER BE LIABLE FOR ANY SPECIAL, INCIDENTAL,
28 // INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES
29 // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT
30 // ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY,
31 // ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
32 // SOFTWARE.
33 //
34 // $Log: copyout.hh,v $
35 // Revision 1.1 1999/06/15 21:10:47 voeckler
36 // Initial revision
37 //
38 #ifndef _COPYOUT_HH
39 #define _COPYOUT_HH
40
41 #if defined(__GNUC__) || defined(__GNUG__)
42 #pragma interface
43 #else
44 #ifndef HAS_BOOL
45 #define HAS_BOOL
46 typedef int bool;
47 #define false 0
48 #define true 1
49 #endif
50 #endif
51
52 int
53 assert_copydir( const char* copydir );
54 // purpose: check, if copydir is a directory and that we can write into it.
55 // paramtr: copydir (IN): name of directory for copying bodies.
56 // returns: 0 if ok, -1 otherwise.
57 // further: errors are handled within. If the directory does not exist,
58 // the assertion function will try to create it.
59
60 bool
61 copy_out( size_t filesize, size_t metasize, unsigned debug,
62 const char* fn, const char* url, const char* copydir,
63 bool copyHdr = true );
64 // purpose: copy content from squid disk file into separate file
65 // paramtr: filesize (IN): complete size of input file
66 // metasize (IN): size of metadata to skip
67 // fn (IN): current filename of squid disk file
68 // url (IN): currently looked at URL to generate separate file
69 // copydir (IN): base directory where to generate the file
70 // copyHdr (IN): copy HTTP header, too, if set to true.
71 // returns: true, if successful, false otherwise.
72
73 #endif // _COPYOUT_HH