diff --git a/docs/user/storage/Query.dox b/docs/user/storage/Query.dox index ecdf40eff6..ef6eef3ea8 100644 --- a/docs/user/storage/Query.dox +++ b/docs/user/storage/Query.dox @@ -334,7 +334,7 @@ \fn status_t BQuery::SetFlags(uint32 flags) \brief Sets the flags the query will be opened with. - The possible flags to set are defined in \file fs_query.h. + The possible flags to set are defined in \c fs_query.h. This methods fails if called after Fetch(). To reuse the BQuery object it must first be reset via Clear(). diff --git a/docs/user/storage/fs_query.dox b/docs/user/storage/fs_query.dox new file mode 100644 index 0000000000..a1af8ecff2 --- /dev/null +++ b/docs/user/storage/fs_query.dox @@ -0,0 +1,47 @@ +/* + * Copyright 2026, Haiku, Inc. All rights reserved. + * Distributed under the terms of the MIT License. + * + * Corresponds to: + * headers/os/storage/fs_query.h hrev47402 + */ + + +/*! + \file fs_query.h + \ingroup storage +*/ + + +/*! + \var B_LIVE_QUERY + \brief Specifies that the query should be "live". + + \note If you specify this flag, you have to use fs_open_live_query(); + it will be ignored in fs_open_query(). + \since BeOS R3 +*/ + + +/*! + \var B_QUERY_NON_INDEXED + \brief Specifies that the query should be run even if no indexed attributes are queried. + + \note Only enable this feature for non-time-critical things, it might + take a long time to proceed. + \note Some query-enabled filesystems might not support this feature. + \since Haiku R1 +*/ + + +/*! + \var B_QUERY_WATCH_ALL + \brief Watch all changes to files in live queries, not just additions or removals. + + This is analogous to the \c B_WATCH_ALL node monitor option: instead of only + \c B_ENTRY_ADDED and \c B_ENTRY_REMOVED when files are changed such that they + enter or leave the query, update messages will be sent for all changes to + any files in the query (via \c B_ATTR_CHANGED or \c B_ENTRY_MOVED). + + \since Haiku R1 +*/ diff --git a/headers/os/kernel/fs_query.h b/headers/os/kernel/fs_query.h index 7f264fc129..a64607722b 100644 --- a/headers/os/kernel/fs_query.h +++ b/headers/os/kernel/fs_query.h @@ -11,17 +11,11 @@ /* Flags for fs_open_[live_]query() */ - -#define B_LIVE_QUERY (1 << 0) - // Note, if you specify B_LIVE_QUERY, you have to use fs_open_live_query(); - // it will be ignored in fs_open_query(). -#define B_QUERY_NON_INDEXED (1 << 1) - // Only enable this feature for non time-critical things, it might - // take a long time to proceed. - // Also, not every file system might support this feature. -#define B_QUERY_WATCH_ALL (1 << 2) - // Send node monitor (B_ATTR_CHANGED, B_ENTRY_MOVED, etc.) events for all - // attributes on all entries in the query. +enum { + B_LIVE_QUERY = (1 << 0), + B_QUERY_NON_INDEXED = (1 << 1), + B_QUERY_WATCH_ALL = (1 << 2), +}; #ifdef __cplusplus diff --git a/src/kits/tracker/QueryPoseView.cpp b/src/kits/tracker/QueryPoseView.cpp index a6c5170767..48596933d2 100644 --- a/src/kits/tracker/QueryPoseView.cpp +++ b/src/kits/tracker/QueryPoseView.cpp @@ -57,6 +57,7 @@ All rights reserved. #include "Tracker.h" #include +#include using std::nothrow;