IMAP search routines. More...
#include "config.h"#include <stdbool.h>#include <string.h>#include "private.h"#include "mutt/lib.h"#include "email/lib.h"#include "core/lib.h"#include "lib.h"#include "pattern/lib.h"#include "adata.h"#include "mdata.h"
Include dependency graph for search.c:Go to the source code of this file.
Functions | |
| static int | check_pattern_list (const struct PatternList *patterns) |
| Check how many patterns in a list can be searched server-side. | |
| static bool | compile_search (const struct ImapAccountData *adata, const struct Pattern *pat, struct Buffer *buf) |
| Convert NeoMutt pattern to IMAP search. | |
| static bool | check_pattern (const struct Pattern *pat) |
| Check whether a pattern can be searched server-side. | |
| static bool | compile_search_children (const struct ImapAccountData *adata, const struct Pattern *pat, struct Buffer *buf) |
| Compile a search command for a pattern's children. | |
| static bool | compile_search_self (const struct ImapAccountData *adata, const struct Pattern *pat, struct Buffer *buf) |
| Compile a search command for a pattern. | |
| bool | imap_search (struct Mailbox *m, const struct PatternList *pat) |
| Find messages in mailbox matching a pattern. | |
| void | cmd_parse_search (struct ImapAccountData *adata, const char *s) |
| Store SEARCH response for later use. | |
IMAP search routines.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file search.c.
|
static |
Check how many patterns in a list can be searched server-side.
| patterns | List of patterns to match |
| num | Number of patterns search that can be searched server-side |
Definition at line 81 of file search.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Convert NeoMutt pattern to IMAP search.
| true | Success |
| false | Failure |
Convert neomutt Pattern to IMAP SEARCH command containing only elements that require full-text search (neomutt already has what it needs for most match types, and does a better job (eg server doesn't support regexes).
Definition at line 207 of file search.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Check whether a pattern can be searched server-side.
| pat | Pattern to check |
Definition at line 55 of file search.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Compile a search command for a pattern's children.
| true | Success |
| false | Failure |
Definition at line 102 of file search.c.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Compile a search command for a pattern.
| true | Success |
| false | Failure |
Definition at line 141 of file search.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool imap_search | ( | struct Mailbox * | m, |
| const struct PatternList * | pat ) |
Find messages in mailbox matching a pattern.
| true | Success |
| false | Failure |
Definition at line 227 of file search.c.
Here is the call graph for this function:
Here is the caller graph for this function:| void cmd_parse_search | ( | struct ImapAccountData * | adata, |
| const char * | s ) |
Store SEARCH response for later use.
Definition at line 256 of file search.c.
Here is the call graph for this function:
Here is the caller graph for this function: