1/*
2 * Copyright (c) 2008 Stephan Aßmus <superstippi@gmx.de>
3 * Copyright (c) 1998-2007 Matthijs Hollemans
4 * All rights reserved. Distributed under the terms of the MIT License.
5 */
6#ifndef FILE_ITERATOR_H
7#define FILE_ITERATOR_H
8
9class BEntry;
10
11// Provides an interface to retrieve the next file that should be grepped
12// for the search string.
13class FileIterator {
14public:
15								FileIterator();
16	virtual						~FileIterator();
17
18	virtual	bool				IsValid() const = 0;
19
20	// Returns the full path name of the next file.
21	virtual	bool				GetNextName(char* buffer) = 0;
22
23	// Tells the Grepper whether the targets wants to know about negative hits.
24	virtual	bool				NotifyNegatives() const = 0;
25
26protected:
27	// Determines whether we can grep a file.
28			bool				_ExamineFile(BEntry& entry, char* buffer,
29									bool textFilesOnly);
30};
31
32#endif // FILE_ITERATOR_H
33