]> git.ipfire.org Git - thirdparty/squid.git/blob - tools/purge/copyout.hh
merge from SslServerCertValidator r12332
[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 #if defined(__GNUC__) || defined(__GNUG__)
39 #pragma interface
40 #else
41 #ifndef HAVE_BOOL
42 #define HAVE_BOOL
43 typedef int bool;
44 #define false 0
45 #define true 1
46 #endif
47 #endif
48 #endif /* __cplusplus */
49
50 int
51 assert_copydir( const char* copydir );
52 // purpose: check, if copydir is a directory and that we can write into it.
53 // paramtr: copydir (IN): name of directory for copying bodies.
54 // returns: 0 if ok, -1 otherwise.
55 // further: errors are handled within. If the directory does not exist,
56 // the assertion function will try to create it.
57
58 bool
59 copy_out( size_t filesize, size_t metasize, unsigned debug,
60 const char* fn, const char* url, const char* copydir,
61 bool copyHdr = true );
62 // purpose: copy content from squid disk file into separate file
63 // paramtr: filesize (IN): complete size of input file
64 // metasize (IN): size of metadata to skip
65 // fn (IN): current filename of squid disk file
66 // url (IN): currently looked at URL to generate separate file
67 // copydir (IN): base directory where to generate the file
68 // copyHdr (IN): copy HTTP header, too, if set to true.
69 // returns: true, if successful, false otherwise.
70
71 #endif // _COPYOUT_HH