]> git.ipfire.org Git - thirdparty/squid.git/blame - src/fs/ufs/UFSSwapLogParser.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / fs / ufs / UFSSwapLogParser.h
CommitLineData
528b2c61 1/*
4ac4a490 2 * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
528b2c61 3 *
bbc27441
AJ
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.
528b2c61 7 */
8
58373ff8
FC
9#ifndef SQUID_FS_UFS_UFSSWAPLOGPARSER_H
10#define SQUID_FS_UFS_UFSSWAPLOGPARSER_H
11
58373ff8
FC
12class StoreSwapLogData;
13
14namespace Fs
15{
16namespace Ufs
17{
18/// \ingroup UFS
19class UFSSwapLogParser
20{
21public:
22 FILE *log;
23 int log_entries;
24 int record_size;
25
26 UFSSwapLogParser(FILE *fp):log(fp),log_entries(-1), record_size(0) {
27 }
28 virtual ~UFSSwapLogParser() {};
29
30 static UFSSwapLogParser *GetUFSSwapLogParser(FILE *fp);
31
32 virtual bool ReadRecord(StoreSwapLogData &swapData) = 0;
33 int SwapLogEntries();
34 void Close() {
35 if (log) {
36 fclose(log);
37 log = NULL;
38 }
39 }
40};
41
42} //namespace Ufs
43} //namespace Fs
44#endif /* SQUID_FS_UFS_UFSSWAPLOGPARSER_H */
f53969cc 45