summaryrefslogtreecommitdiffstats
path: root/src/plugins/fts-lucene/fts-lucene-plugin.h
blob: 69440fb14aa186b3f142904bc187d272ba0c05ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef FTS_LUCENE_PLUGIN_H
#define FTS_LUCENE_PLUGIN_H

#include "module-context.h"
#include "mail-user.h"
#include "fts-api-private.h"

#define FTS_LUCENE_USER_CONTEXT(obj) \
	MODULE_CONTEXT(obj, fts_lucene_user_module)
#define FTS_LUCENE_USER_CONTEXT_REQUIRE(obj) \
	MODULE_CONTEXT_REQUIRE(obj, fts_lucene_user_module)

struct fts_lucene_settings {
	const char *default_language;
	const char *textcat_conf, *textcat_dir;
	const char *whitespace_chars;
	bool normalize;
	bool no_snowball;
	bool mime_parts;
	bool use_libfts;
};

struct fts_lucene_user {
	union mail_user_module_context module_ctx;
	struct fts_lucene_settings set;
};

extern struct fts_backend fts_backend_lucene;
extern MODULE_CONTEXT_DEFINE(fts_lucene_user_module, &mail_user_module_register);

uint32_t fts_lucene_settings_checksum(const struct fts_lucene_settings *set);

void fts_lucene_plugin_init(struct module *module);
void fts_lucene_plugin_deinit(void);

#endif