view src/plugins/fts/fts-plugin.c @ 9575:0a00dcc4f0ea HEAD

lib-storage: Allow shared namespace prefix to use %variable modifiers.
author Timo Sirainen <tss@iki.fi>
date Wed, 26 May 2010 17:07:51 +0100
parents 00cd9aacd03c
children
line wrap: on
line source

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

#include "lib.h"
#include "mail-storage-private.h"
#include "fts-plugin.h"

#include <stdlib.h>

const char *fts_plugin_version = PACKAGE_VERSION;

void (*fts_next_hook_mailbox_opened)(struct mailbox *box);

void fts_plugin_init(void)
{
	if (getenv("FTS") != NULL) {
		fts_next_hook_mailbox_opened = hook_mailbox_opened;
		hook_mailbox_opened = fts_mailbox_opened;
	} else if (getenv("DEBUG") != NULL)
		i_info("fts: No fts setting - plugin disabled");
}

void fts_plugin_deinit(void)
{
	if (hook_mailbox_opened == fts_mailbox_opened)
		hook_mailbox_opened = fts_next_hook_mailbox_opened;
}