fts-api.c revision a0c453a8edaec90fb0d945c874de0b1845bc7d7e
/* Copyright (c) 2006-2008 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "fts-api-private.h"
{
if (!array_is_created(&backends))
}
void fts_backend_unregister(const char *name)
{
const struct fts_backend *const *be;
unsigned int i, count;
for (i = 0; i < count; i++) {
break;
}
}
if (i == count)
if (count == 1)
}
static const struct fts_backend *
fts_backend_class_lookup(const char *backend_name)
{
const struct fts_backend *const *be;
unsigned int i, count;
if (array_is_created(&backends)) {
for (i = 0; i < count; i++) {
return be[i];
}
}
return NULL;
}
struct fts_backend *
{
const struct fts_backend *be;
struct fts_backend *backend;
return NULL;
}
return NULL;
return backend;
}
{
}
{
}
struct fts_backend_build_context **ctx_r)
{
int ret;
if (ret == 0)
return ret;
}
{
}
{
}
{
}
{
}
{
}
{
int ret;
if (ret > 0)
return ret;
}
{
}
static void
{
unsigned int i, count;
and no lists have none */
/* create unwanted sequences list from both sources */
/* drop unwanted uids */
/* add uids that are in dest_definite and src_maybe lists */
for (i = 0; i < count; i++) {
}
}
}
{
T_BEGIN {
} T_END;
/* keep only what exists in both lists. the rest is in
maybies or not wanted */
}
{
/* we'll begin by inverting definite UIDs */
/* from that list remove UIDs in the maybe list.
the maybe list itself isn't touched. */
}
enum fts_lookup_flags flags,
{
int ret;
return -1;
if ((flags & FTS_LOOKUP_FLAG_INVERT) != 0)
return 0;
}
enum fts_lookup_flags flags,
{
int ret;
}
/* do this ourself */
&tmp_definite, &tmp_maybe);
if (ret < 0) {
} else {
maybe_uids, &tmp_maybe);
}
return ret;
}
struct fts_backend_lookup_context *
{
struct fts_backend_lookup_context *ctx;
return ctx;
}
{
struct fts_backend_lookup_field *field;
}
{
const struct fts_backend_lookup_field *fields;
unsigned int i, count;
definite_uids, maybe_uids) < 0)
return -1;
for (i = 1; i < count; i++) {
definite_uids, maybe_uids) < 0)
return -1;
}
return 0;
}
{
int ret;
scores);
} else {
}
return ret;
}