Header And Logo

PostgreSQL
| The world's most advanced open source database.

logtape.h

Go to the documentation of this file.
00001 /*-------------------------------------------------------------------------
00002  *
00003  * logtape.h
00004  *    Management of "logical tapes" within temporary files.
00005  *
00006  * See logtape.c for explanations.
00007  *
00008  * Portions Copyright (c) 1996-2013, PostgreSQL Global Development Group
00009  * Portions Copyright (c) 1994, Regents of the University of California
00010  *
00011  * src/include/utils/logtape.h
00012  *
00013  *-------------------------------------------------------------------------
00014  */
00015 
00016 #ifndef LOGTAPE_H
00017 #define LOGTAPE_H
00018 
00019 /* LogicalTapeSet is an opaque type whose details are not known outside logtape.c. */
00020 
00021 typedef struct LogicalTapeSet LogicalTapeSet;
00022 
00023 /*
00024  * prototypes for functions in logtape.c
00025  */
00026 
00027 extern LogicalTapeSet *LogicalTapeSetCreate(int ntapes);
00028 extern void LogicalTapeSetClose(LogicalTapeSet *lts);
00029 extern void LogicalTapeSetForgetFreeSpace(LogicalTapeSet *lts);
00030 extern size_t LogicalTapeRead(LogicalTapeSet *lts, int tapenum,
00031                 void *ptr, size_t size);
00032 extern void LogicalTapeWrite(LogicalTapeSet *lts, int tapenum,
00033                  void *ptr, size_t size);
00034 extern void LogicalTapeRewind(LogicalTapeSet *lts, int tapenum, bool forWrite);
00035 extern void LogicalTapeFreeze(LogicalTapeSet *lts, int tapenum);
00036 extern bool LogicalTapeBackspace(LogicalTapeSet *lts, int tapenum,
00037                      size_t size);
00038 extern bool LogicalTapeSeek(LogicalTapeSet *lts, int tapenum,
00039                 long blocknum, int offset);
00040 extern void LogicalTapeTell(LogicalTapeSet *lts, int tapenum,
00041                 long *blocknum, int *offset);
00042 extern long LogicalTapeSetBlocks(LogicalTapeSet *lts);
00043 
00044 #endif   /* LOGTAPE_H */