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