aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/query.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2010-10-28 10:30:26 -0700
committerGravatar Carl Worth <cworth@cworth.org>2010-10-28 10:30:26 -0700
commite83b40138ef3dd116001a4c53150d0a3274b41c0 (patch)
tree53e76002c865769b9151c3a6ebf2c11e45fe0623 /lib/query.cc
parent2f8bea876da8281b28bf991b6710920c1a555826 (diff)
lib: Add two functions: notmuch_query_get_query_string and _get_sort
It can be handy to be able to query these settings from an existing query object.
Diffstat (limited to 'lib/query.cc')
-rw-r--r--lib/query.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/query.cc b/lib/query.cc
index 59f4011b..9acf2b03 100644
--- a/lib/query.cc
+++ b/lib/query.cc
@@ -70,12 +70,24 @@ notmuch_query_create (notmuch_database_t *notmuch,
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