]> git.ipfire.org Git - thirdparty/squid.git/blame - src/fs/ufs/StoreSearchUFS.h
Docs: Copyright updates for 2018 (#114)
[thirdparty/squid.git] / src / fs / ufs / StoreSearchUFS.h
CommitLineData
528b2c61 1/*
5b74111a 2 * Copyright (C) 1996-2018 The Squid Software Foundation and contributors
187642d0 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_STORESEARCHUFS_H
10#define SQUID_FS_UFS_STORESEARCHUFS_H
11
12#include "StoreSearch.h"
13#include "UFSSwapDir.h"
14
15namespace Fs
16{
17namespace Ufs
18{
19
58373ff8
FC
20class StoreSearchUFS : public StoreSearch
21{
5c2f68b7
AJ
22 CBDATA_CLASS(StoreSearchUFS);
23
58373ff8
FC
24public:
25 StoreSearchUFS(RefCount<UFSSwapDir> sd);
26 virtual ~StoreSearchUFS();
27
28 /** \todo Iterator API - garh, wrong place */
29 /**
30 * callback the client when a new StoreEntry is available
31 * or an error occurs
32 */
33 virtual void next(void (callback)(void *cbdata), void *cbdata);
34
35 /**
36 \retval true if a new StoreEntry is immediately available
37 \retval false if a new StoreEntry is NOT immediately available
38 */
39 virtual bool next();
40
41 virtual bool error() const;
42 virtual bool isDone() const;
43 virtual StoreEntry *currentItem();
44
45 RefCount<UFSSwapDir> sd;
46 RemovalPolicyWalker *walker;
47
48private:
58373ff8
FC
49 /// \bug (callback) should be hidden behind a proper human readable name
50 void (callback)(void *cbdata);
51 void *cbdata;
52 StoreEntry * current;
53 bool _done;
54
55 StoreSearchUFS(StoreSearchUFS const &); //disabled
56 StoreSearchUFS& operator=(StoreSearchUFS const &); //disabled
57 StoreSearchUFS(); //disabled
58};
59
60} //namespace Ufs
61} //namespace Fs
62#endif /* SQUID_FS_UFS_STORESEARCHUFS_H */
f53969cc 63