vfs: check userland buffers before reading them.
[haiku.git] / src / servers / index / AnalyserDispatcher.h
blob7da7bae8893aab4b80853891dd3f10e1fa7d249f
1 /*
2 * Copyright 2010, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Clemens Zeidler <haiku@clemens-zeidler.de>
7 */
8 #ifndef ANALYSER_DISPATCHER
9 #define ANALYSER_DISPATCHER
12 #include <Looper.h>
13 #include <String.h>
15 #include "IndexServerAddOn.h"
18 class FileAnalyser;
21 class AnalyserDispatcher : public BLooper {
22 public:
23 AnalyserDispatcher(const char* name);
24 ~AnalyserDispatcher();
26 void Stop();
27 bool Stopped();
29 bool Busy();
31 void AnalyseEntry(const entry_ref& ref);
32 void DeleteEntry(const entry_ref& ref);
33 void MoveEntry(const entry_ref& oldRef,
34 const entry_ref& newRef);
35 void LastEntry();
37 //! thread safe
38 bool AddAnalyser(FileAnalyser* analyser);
39 bool RemoveAnalyser(const BString& name);
41 void WriteAnalyserSettings();
42 void SetSyncPosition(bigtime_t time);
43 void SetWatchingStart(bigtime_t time);
44 void SetWatchingPosition(bigtime_t time);
46 protected:
47 FileAnalyserList fFileAnalyserList;
49 private:
50 FileAnalyser* _FindAnalyser(const BString& name);
52 int32 fStopped;
55 #endif // ANALYSER_DISPATCHER