lib/query,parser: update to use mu-message-fields

This commit is contained in:
Dirk-Jan C. Binnema
2022-03-04 00:06:31 +02:00
parent 7c185590e4
commit 0df7a6959a
8 changed files with 229 additions and 250 deletions

View File

@ -21,11 +21,13 @@
#define __MU_QUERY_HH__
#include <memory>
#include <optional>
#include <glib.h>
#include <mu-store.hh>
#include <mu-query-results.hh>
#include <utils/mu-utils.hh>
#include <mu-message.hh>
namespace Mu {
@ -41,10 +43,11 @@ public:
*
* @return the query-results, or Nothing in case of error.
*/
Option<QueryResults> run(const std::string& expr = "",
MuMsgFieldId sortfieldid = MU_MSG_FIELD_ID_NONE,
QueryFlags flags = QueryFlags::None,
size_t maxnum = 0) const;
Option<QueryResults> run(const std::string& expr = "",
std::optional<Message::Field::Id> sortfield_id = {},
QueryFlags flags = QueryFlags::None,
size_t maxnum = 0) const;
/**
* run a Xapian query to count the number of matches; for the syntax, please