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