]> git.ipfire.org Git - thirdparty/squid.git/blob - tools/purge/copyout.hh
Merged from trunk 13172.
[thirdparty/squid.git] / tools / purge / copyout.hh
1 // Author: Jens-S. V?ckler <voeckler@rvs.uni-hannover.de>
2 //
3 // File: copyout.hh
4 // Tue Jun 15 1999
5 //
6 // (c) 1999 Lehrgebiet Rechnernetze und Verteilte Systeme
7 // Universit?t Hannover, Germany
8 //
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.
18 //
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.
22 //
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
29 // SOFTWARE.
30 //
31 // Revision 1.1 1999/06/15 21:10:47 voeckler
32 // Initial revision
33 //
34 #ifndef _COPYOUT_HH
35 #define _COPYOUT_HH
36
37 #if !defined(__cplusplus)
38 #ifndef HAVE_BOOL
39 #define HAVE_BOOL
40 typedef int bool;
41 #define false 0
42 #define true 1
43 #endif
44 #endif /* __cplusplus */
45
46 int
47 assert_copydir( const char* copydir );
48 // purpose: check, if copydir is a directory and that we can write into it.
49 // paramtr: copydir (IN): name of directory for copying bodies.
50 // returns: 0 if ok, -1 otherwise.
51 // further: errors are handled within. If the directory does not exist,
52 // the assertion function will try to create it.
53
54 bool
55 copy_out( size_t filesize, size_t metasize, unsigned debug,
56 const char* fn, const char* url, const char* copydir,
57 bool copyHdr = true );
58 // purpose: copy content from squid disk file into separate file
59 // paramtr: filesize (IN): complete size of input file
60 // metasize (IN): size of metadata to skip
61 // fn (IN): current filename of squid disk file
62 // url (IN): currently looked at URL to generate separate file
63 // copydir (IN): base directory where to generate the file
64 // copyHdr (IN): copy HTTP header, too, if set to true.
65 // returns: true, if successful, false otherwise.
66
67 #endif // _COPYOUT_HH