view src/plugins/fts/fts-plugin.c @ 19552:0f22db71df7a

global: freshen copyright git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/'
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Wed, 13 Jan 2016 12:24:03 +0200
parents 6bf404e276c6
children 2e2563132d5f
line wrap: on
line source

/* Copyright (c) 2006-2016 Dovecot authors, see the included COPYING file */

#include "lib.h"
#include "mail-storage-hooks.h"
#include "fts-filter.h"
#include "fts-tokenizer.h"
#include "fts-parser.h"
#include "fts-storage.h"
#include "fts-user.h"
#include "fts-plugin.h"
#include "fts-library.h"

const char *fts_plugin_version = DOVECOT_ABI_VERSION;

static struct mail_storage_hooks fts_mail_storage_hooks = {
	.mail_namespaces_added = fts_mail_namespaces_added,
	.mailbox_allocated = fts_mailbox_allocated,
	.mail_allocated = fts_mail_allocated
};

void fts_plugin_init(struct module *module)
{
	fts_library_init();
	mail_storage_hooks_add(module, &fts_mail_storage_hooks);
}

void fts_plugin_deinit(void)
{
	fts_library_deinit();
	fts_parsers_unload();
	mail_storage_hooks_remove(&fts_mail_storage_hooks);
}