]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/fs/ufs/RebuildState.h
2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_FS_UFS_REBUILDSTATE_H
10 #define SQUID_FS_UFS_REBUILDSTATE_H
12 #include "base/RefCount.h"
13 #include "store_rebuild.h"
14 #include "UFSSwapDir.h"
15 #include "UFSSwapLogParser.h"
26 CBDATA_CLASS(RebuildState
);
29 static EVH RebuildStep
;
31 RebuildState(RefCount
<UFSSwapDir
> sd
);
32 virtual ~RebuildState();
34 virtual bool error() const;
35 virtual bool isDone() const;
36 virtual StoreEntry
*currentItem();
38 RefCount
<UFSSwapDir
> sd
;
41 Fs::Ufs::UFSSwapLogParser
*LogParser
;
46 Flags() : need_to_validate(false), clean(false), init(false) {}
47 bool need_to_validate
;
57 char fullpath
[MAXPATHLEN
];
58 char fullfilename
[MAXPATHLEN
*2];
60 StoreRebuildData counts
;
63 void rebuildFromDirectory();
64 void rebuildFromSwapLog();
67 int getNextFile(sfileno
*, int *size
);
68 StoreEntry
*currentEntry() const;
69 void currentEntry(StoreEntry
*);
73 /// \bug (callback) should be hidden behind a proper human readable name
74 void (callback
)(void *cbdata
);
81 #endif /* SQUID_FS_UFS_REBUILDSTATE_H */