btrfs: Attempt to fix GCC2 build.
[haiku.git] / src / apps / musiccollection / QueryMonitor.h
blob0e9a5b350afb2976a4f8fa71928b084279c39488
1 /*
2 * Copyright 2011, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Clemens Zeidler <haiku@clemens-zeidler.de>
7 */
8 #ifndef QUERY_MONITOR_H
9 #define QUERY_MONITOR_H
12 #include <Query.h>
14 #include <ObjectList.h>
16 #include "FileMonitor.h"
19 /*! Handle live query messages, query reader messages, and node monitor messages
20 and dispatch them to a EntryViewInterface. */
21 class QueryHandler : public FileMonitor {
22 public:
23 QueryHandler(EntryViewInterface* listener);
25 void MessageReceived(BMessage* message);
29 typedef BObjectList<BQuery> BQueryList;
32 class QueryReader : public ReadThread {
33 public:
34 QueryReader(QueryHandler* handler);
35 ~QueryReader();
37 bool AddQuery(BQuery* query);
38 void Reset();
40 protected:
41 bool ReadNextEntry(entry_ref& entry);
43 private:
44 BQueryList fQueries;
45 BQueryList fLiveQueries;
49 #endif // QUERY_MONITOR_H