NeoMutt  2024-10-02-37-gfa9146
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
query.h
Go to the documentation of this file.
1
23#ifndef MUTT_NOTMUCH_QUERY_H
24#define MUTT_NOTMUCH_QUERY_H
25
26#include <stdbool.h>
27#include <stddef.h>
28
35{
39};
40
45{
49};
50
51enum NmQueryType nm_parse_type_from_query(char *buf, enum NmQueryType fallback);
52enum NmQueryType nm_string_to_query_type(const char *str);
54const char *nm_query_type_to_string(enum NmQueryType query_type);
56nm_windowed_query_from_query(char *buf, size_t buflen, const bool force_enable,
57 const short duration, const short current_pos,
58 const char *current_search, const char *timebase,
59 const char *or_terms);
60bool nm_query_window_check_timebase(const char *timebase);
61
62#endif /* MUTT_NOTMUCH_QUERY_H */
enum NmQueryType nm_string_to_query_type(const char *str)
Lookup a query type.
Definition: query.c:110
enum NmWindowQueryRc nm_windowed_query_from_query(char *buf, size_t buflen, const bool force_enable, const short duration, const short current_pos, const char *current_search, const char *timebase, const char *or_terms)
Windows buf with notmuch date: search term.
Definition: query.c:206
NmWindowQueryRc
Return codes for nm_windowed_query_from_query()
Definition: query.h:45
@ NM_WINDOW_QUERY_SUCCESS
Query was successful.
Definition: query.h:46
@ NM_WINDOW_QUERY_INVALID_DURATION
Invalid duration.
Definition: query.h:48
@ NM_WINDOW_QUERY_INVALID_TIMEBASE
Invalid timebase.
Definition: query.h:47
NmQueryType
Notmuch Query Types.
Definition: query.h:35
@ NM_QUERY_TYPE_UNKNOWN
Unknown query type. Error in notmuch query.
Definition: query.h:38
@ NM_QUERY_TYPE_THREADS
Whole threads.
Definition: query.h:37
@ NM_QUERY_TYPE_MESGS
Default: Messages only.
Definition: query.h:36
enum NmQueryType nm_string_to_query_type_mapper(const char *str)
Lookup a query type.
Definition: query.c:129
enum NmQueryType nm_parse_type_from_query(char *buf, enum NmQueryType fallback)
Parse a query type out of a query.
Definition: query.c:49
bool nm_query_window_check_timebase(const char *timebase)
Checks if a given timebase string is valid.
Definition: query.c:149
const char * nm_query_type_to_string(enum NmQueryType query_type)
Turn a query type into a string.
Definition: query.c:96