fts-user.c revision 09aed882b99e865ff6d7140ae2f77a42c9e7d1a7
/* Copyright (c) 2015 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "module-context.h"
#include "mail-user.h"
#include "fts-language.h"
#include "fts-filter.h"
#include "fts-user.h"
#define FTS_USER_CONTEXT(obj) \
struct fts_user {
struct fts_language_list *lang_list;
};
static int
const char **error_r)
{
*error_r = "fts_languages setting is missing";
return -1;
}
lang_config[0] = "fts_language_config";
"fts_languages: Unknown language '%s'", unknown);
return -1;
}
*error_r = "fts_languages setting is empty";
return -1;
}
return 0;
}
static int
{
const struct fts_filter *filter_class;
unsigned int i;
int ret = 0;
filters_key = "fts_filters";
return 0;
}
}
if (filter_class == NULL) {
filters_key, filters[i]);
ret = -1;
break;
}
/* try the language-specific setting first */
}
"Filter '%s' init via settings '%s' failed: %s",
ret = -1;
break;
}
}
if (ret < 0) {
return -1;
}
return 0;
}
struct fts_user_language *
const struct fts_language *lang)
{
struct fts_user_language *const *user_langp;
return *user_langp;
}
return NULL;
}
const struct fts_language *lang,
const char **error_r)
{
struct fts_filter *filter;
struct fts_user_language *user_lang;
return -1;
return 0;
}
const char **error_r)
{
const struct fts_language *const *langp;
return -1;
}
return 0;
}
{
}
const ARRAY_TYPE(fts_user_language) *
{
}
{
struct fts_user_language *const *user_langp;
}
}
{
const char *error;
return -1;
}
return -1;
}
return 0;
}
{
}