fts-build-mailbox.c revision 8d587838c414c48a331f0b54cd7ffd97e5024abd
/* Copyright (c) 2006-2011 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "ioloop.h"
#include "mail-storage-private.h"
#include "mail-search-build.h"
#include "fts-api-private.h"
#include "fts-build-private.h"
#define FTS_SEARCH_NONBLOCK_COUNT 50
static int
struct fts_storage_build_context **build_ctx_r)
{
struct fts_storage_build_context *ctx;
struct mail_search_args *search_args;
struct fts_backend_update_context *update_ctx;
struct mailbox_status status;
return -1;
/* everything is already indexed */
return 0;
}
if (seq1 == 0) {
/* no new messages (last messages in mailbox were expunged) */
return 0;
}
*build_ctx_r = ctx;
return 1;
}
{
int ret;
return ret;
}
{
unsigned int count = 0;
int ret;
T_BEGIN {
} T_END;
if (ret < 0)
return -1;
if (++count == FTS_SEARCH_NONBLOCK_COUNT)
return 0;
}
return 1;
}
const struct fts_storage_build_vfuncs fts_storage_build_mailbox_vfuncs = {
};