fts-solr-plugin.h revision bae41e95e936777e71ea5c74eed03e6630dd8e67
76b43e4417bab52e913da39b5f5bc2a130d3f149Timo Sirainen#ifndef FTS_SOLR_PLUGIN_H
1d4f710106fb498750456724628da6063e012e6dTimo Sirainen#define FTS_SOLR_PLUGIN_H
1d4f710106fb498750456724628da6063e012e6dTimo Sirainen
9439bed2f07d6475febd8a247cd2f0990fb32a13Timo Sirainen#include "module-context.h"
d3d769026fae5d21c2d29614d3bc4579e8d79e81Timo Sirainen#include "mail-user.h"
9439bed2f07d6475febd8a247cd2f0990fb32a13Timo Sirainen#include "fts-api-private.h"
9439bed2f07d6475febd8a247cd2f0990fb32a13Timo Sirainen
9439bed2f07d6475febd8a247cd2f0990fb32a13Timo Sirainen#define FTS_SOLR_USER_CONTEXT(obj) \
4ead43ecc06d10047998966c4dc0b142ecce4b66Timo Sirainen MODULE_CONTEXT(obj, fts_solr_user_module)
1d4f710106fb498750456724628da6063e012e6dTimo Sirainen#define FTS_SOLR_USER_CONTEXT_REQUIRE(obj) \
1d4f710106fb498750456724628da6063e012e6dTimo Sirainen MODULE_CONTEXT_REQUIRE(obj, fts_solr_user_module)
9439bed2f07d6475febd8a247cd2f0990fb32a13Timo Sirainen
9439bed2f07d6475febd8a247cd2f0990fb32a13Timo Sirainenstruct fts_solr_settings {
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen const char *url, *default_ns_prefix;
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen bool use_libfts;
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen bool debug;
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen};
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen
d3d769026fae5d21c2d29614d3bc4579e8d79e81Timo Sirainenstruct fts_solr_user {
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen union mail_user_module_context module_ctx;
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen struct fts_solr_settings set;
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen};
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainenextern const char *fts_solr_plugin_dependencies[];
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainenextern struct fts_backend fts_backend_solr;
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainenextern struct fts_backend fts_backend_solr_old;
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainenextern MODULE_CONTEXT_DEFINE(fts_solr_user_module, &mail_user_module_register);
d3d769026fae5d21c2d29614d3bc4579e8d79e81Timo Sirainenextern struct http_client *solr_http_client;
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainenvoid fts_solr_plugin_init(struct module *module);
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainenvoid fts_solr_plugin_deinit(void);
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen#endif
ad004e44be109684521494b5af2ad1da39b8bb27Timo Sirainen