]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/StoreSearch.h
2 * Copyright (C) 1996-2015 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_STORESEARCH_H
10 #define SQUID_STORESEARCH_H
12 #include "base/RefCount.h"
15 class StoreSearch
: public RefCountable
21 StoreSearch(StoreSearch
const &); /* no implementation - trigger link failures */
22 virtual ~StoreSearch() {}
25 void asList(void (*) (CbDataList<StoreEntryPointer), void *cbdata);
27 /* callback the client when a new StoreEntry is available
30 virtual void next(void (callback
)(void *cbdata
), void *cbdata
) = 0;
31 /* return true if a new StoreEntry is immediately available
32 * ???- not decided - if false, trigger making a new one available
33 * this would be for sync api users that will schedule their own callback
34 * to try again later. so if that next() has to allow multiple
35 * calls being made to it without error
37 virtual bool next() = 0;
38 virtual bool error() const = 0;
39 virtual bool isDone() const = 0;
40 virtual StoreEntry
*currentItem() = 0;
43 typedef RefCount
<StoreSearch
> StoreSearchPointer
;
45 #endif /* SQUID_STORESEARCH_H */