]> granicus.if.org Git - postgresql/blob - src/include/utils/logtape.h
Create a 'type cache' that keeps track of the data needed for any particular
[postgresql] / src / include / utils / logtape.h
1 /*-------------------------------------------------------------------------
2  *
3  * logtape.h
4  *        Management of "logical tapes" within temporary files.
5  *
6  * See logtape.c for explanations.
7  *
8  * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
9  * Portions Copyright (c) 1994, Regents of the University of California
10  *
11  * $Id: logtape.h,v 1.9 2003/08/04 02:40:15 momjian Exp $
12  *
13  *-------------------------------------------------------------------------
14  */
15
16 #ifndef LOGTAPE_H
17 #define LOGTAPE_H
18
19 /* LogicalTapeSet is an opaque type whose details are not known outside logtape.c. */
20
21 typedef struct LogicalTapeSet LogicalTapeSet;
22
23 /*
24  * prototypes for functions in logtape.c
25  */
26
27 extern LogicalTapeSet *LogicalTapeSetCreate(int ntapes);
28 extern void LogicalTapeSetClose(LogicalTapeSet *lts);
29 extern size_t LogicalTapeRead(LogicalTapeSet *lts, int tapenum,
30                                 void *ptr, size_t size);
31 extern void LogicalTapeWrite(LogicalTapeSet *lts, int tapenum,
32                                  void *ptr, size_t size);
33 extern void LogicalTapeRewind(LogicalTapeSet *lts, int tapenum, bool forWrite);
34 extern void LogicalTapeFreeze(LogicalTapeSet *lts, int tapenum);
35 extern bool LogicalTapeBackspace(LogicalTapeSet *lts, int tapenum,
36                                          size_t size);
37 extern bool LogicalTapeSeek(LogicalTapeSet *lts, int tapenum,
38                                 long blocknum, int offset);
39 extern void LogicalTapeTell(LogicalTapeSet *lts, int tapenum,
40                                 long *blocknum, int *offset);
41
42 #endif   /* LOGTAPE_H */