3rdparty/licenseReport: Add seperate LGPL checks
[haiku.git] / src / apps / text_search / ChangesIterator.h
blob75235d481e4993023e9159e041361f688ad58d10
1 /*
2 * Copyright (c) 2008 Stephan Aßmus <superstippi@gmx.de>
3 * All rights reserved. Distributed under the terms of the MIT license.
4 */
5 #ifndef CHANGES_ITERATOR_H
6 #define CHANGES_ITERATOR_H
8 #include <HashMap.h>
9 #include <HashString.h>
11 #include "FileIterator.h"
13 class BEntry;
14 class BDirectory;
15 class Model;
17 class ChangesIterator : public FileIterator {
18 public:
19 ChangesIterator(const Model* model);
20 virtual ~ChangesIterator();
22 virtual bool IsValid() const;
23 virtual bool GetNextName(char* buffer);
24 virtual bool NotifyNegatives() const;
26 public:
27 void EntryAdded(const char* path);
28 void EntryRemoved(const char* path);
29 void EntryChanged(const char* path);
31 bool IsEmpty() const;
32 void PrintToStream() const;
34 private:
35 typedef HashMap<HashString, uint32> PathMap;
36 enum {
37 ENTRY_ADDED = 0,
38 ENTRY_REMOVED,
39 ENTRY_CHANGED
42 PathMap fPathMap;
43 int32 fIteratorIndex;
45 bool fRecurseDirs : 1;
46 bool fRecurseLinks : 1;
47 bool fSkipDotDirs : 1;
48 bool fTextOnly : 1;
51 #endif // CHANGES_ITERATOR_H