]> git.ipfire.org Git - thirdparty/squid.git/blame - src/StoreSearch.h
Source Format Enforcement (#763)
[thirdparty/squid.git] / src / StoreSearch.h
CommitLineData
c8f4eac4 1/*
f70aedc4 2 * Copyright (C) 1996-2021 The Squid Software Foundation and contributors
c8f4eac4 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.
c8f4eac4 7 */
8
9#ifndef SQUID_STORESEARCH_H
10#define SQUID_STORESEARCH_H
11
8bf217bd 12#include "base/RefCount.h"
c8f4eac4 13#include "Store.h"
14
15class StoreSearch : public RefCountable
16{
17
18public:
19 StoreSearch() {}
20
21 StoreSearch(StoreSearch const &); /* no implementation - trigger link failures */
22 virtual ~StoreSearch() {}
23
24 /* not ready yet
2236466c 25 void asList(void (*) (CbDataList<StoreEntryPointer), void *cbdata);
c8f4eac4 26 */
27 /* callback the client when a new StoreEntry is available
26ac0430 28 * or an error occurs
c8f4eac4 29 */
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
36 */
37 virtual bool next() = 0;
38 virtual bool error() const = 0;
39 virtual bool isDone() const = 0;
40 virtual StoreEntry *currentItem() = 0;
41};
42
43typedef RefCount<StoreSearch> StoreSearchPointer;
44
45#endif /* SQUID_STORESEARCH_H */
f53969cc 46