NOTMUCH_SORT_UNSORTED
} notmuch_sort_t;
+/* Return the query_string of this query. See notmuch_query_create. */
+const char *
+notmuch_query_get_query_string (notmuch_query_t *query);
+
/* Specify the sorting desired for this query. */
void
notmuch_query_set_sort (notmuch_query_t *query, notmuch_sort_t sort);
+/* Return the sort specified for this query. See notmuch_query_set_sort. */
+notmuch_sort_t
+notmuch_query_get_sort (notmuch_query_t *query);
+
/* Execute a query for threads, returning a notmuch_threads_t object
* which can be used to iterate over the results. The returned threads
* object is owned by the query and as such, will only be valid until
return query;
}
+const char *
+notmuch_query_get_query_string (notmuch_query_t *query)
+{
+ return query->query_string;
+}
+
void
notmuch_query_set_sort (notmuch_query_t *query, notmuch_sort_t sort)
{
query->sort = sort;
}
+notmuch_sort_t
+notmuch_query_get_sort (notmuch_query_t *query)
+{
+ return query->sort;
+}
+
/* We end up having to call the destructors explicitly because we had
* to use "placement new" in order to initialize C++ objects within a
* block that we allocated with talloc. So C++ is making talloc