/* Copyright (c) 2008-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "mail-search.h"
#include "index-search-private.h"
#include "virtual-storage.h"
enum virtual_search_state {
};
struct virtual_search_record {
};
struct virtual_search_context {
unsigned int next_result_n;
unsigned int next_record_idx;
};
const struct virtual_search_record *r2)
{
return -1;
return 1;
return -1;
return 1;
return 0;
}
{
return -1;
ret = 0;
}
return ret;
}
struct virtual_search_context *vctx)
{
const void *data;
int result;
while (index_storage_search_next_update_seq(ctx)) {
if (result > 0) {
/* full match, no need to check this any further */
} else {
/* possible match, save and check later */
}
}
}
struct mail_search_context *
struct mail_search_args *args,
const enum mail_sort_type *sort_program,
struct mailbox_header_lookup_ctx *wanted_headers)
{
return ctx;
}
{
return index_storage_search_deinit(ctx);
}
{
switch (vctx->search_state) {
else
/* the messages won't be returned sorted, so we'll have to
do it ourself */
if (*tryagain_r)
return FALSE;
vctx->next_result_n = 0;
/* fall through */
*tryagain_r = FALSE;
return FALSE;
vctx->next_result_n++;
return TRUE;
}
i_unreached();
}
{
}
{
unsigned int count;
/* go through potential results first */
i_unreached();
return TRUE;
}
/* this is known to match fully */
vctx->next_result_n++;
return TRUE;
}
return FALSE;
}