~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to src/include/utils/logtape.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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-2009, PostgreSQL Global Development Group
 
9
 * Portions Copyright (c) 1994, Regents of the University of California
 
10
 *
 
11
 * $PostgreSQL$
 
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 void LogicalTapeSetForgetFreeSpace(LogicalTapeSet *lts);
 
30
extern size_t LogicalTapeRead(LogicalTapeSet *lts, int tapenum,
 
31
                                void *ptr, size_t size);
 
32
extern void LogicalTapeWrite(LogicalTapeSet *lts, int tapenum,
 
33
                                 void *ptr, size_t size);
 
34
extern void LogicalTapeRewind(LogicalTapeSet *lts, int tapenum, bool forWrite);
 
35
extern void LogicalTapeFreeze(LogicalTapeSet *lts, int tapenum);
 
36
extern bool LogicalTapeBackspace(LogicalTapeSet *lts, int tapenum,
 
37
                                         size_t size);
 
38
extern bool LogicalTapeSeek(LogicalTapeSet *lts, int tapenum,
 
39
                                long blocknum, int offset);
 
40
extern void LogicalTapeTell(LogicalTapeSet *lts, int tapenum,
 
41
                                long *blocknum, int *offset);
 
42
extern long LogicalTapeSetBlocks(LogicalTapeSet *lts);
 
43
 
 
44
#endif   /* LOGTAPE_H */