2 * Copyright 2011, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 * Clemens Zeidler <haiku@clemens-zeidler.de>
8 #ifndef QUERY_MONITOR_H
9 #define QUERY_MONITOR_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
{
23 QueryHandler(EntryViewInterface
* listener
);
25 void MessageReceived(BMessage
* message
);
29 typedef BObjectList
<BQuery
> BQueryList
;
32 class QueryReader
: public ReadThread
{
34 QueryReader(QueryHandler
* handler
);
37 bool AddQuery(BQuery
* query
);
41 bool ReadNextEntry(entry_ref
& entry
);
45 BQueryList fLiveQueries
;
49 #endif // QUERY_MONITOR_H