annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9532
00cd9aacd03c Updated copyright notices to include year 2010.
Timo Sirainen <tss@iki.fi>
parents: 8590
diff changeset
1 /* Copyright (c) 2006-2010 Dovecot authors, see the included COPYING file */
4609
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
2
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
3 #include "lib.h"
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
4 #include "mail-storage-private.h"
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
5 #include "fts-plugin.h"
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
6
8330
16a99d3a34dd FTS: If mail_debug=yes, log messages if fts is disabled.
Timo Sirainen <tss@iki.fi>
parents: 7086
diff changeset
7 #include <stdlib.h>
16a99d3a34dd FTS: If mail_debug=yes, log messages if fts is disabled.
Timo Sirainen <tss@iki.fi>
parents: 7086
diff changeset
8
5185
24f4a959a24c Added <plugin_name>_version string.
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
9 const char *fts_plugin_version = PACKAGE_VERSION;
24f4a959a24c Added <plugin_name>_version string.
Timo Sirainen <tss@iki.fi>
parents: 4609
diff changeset
10
4609
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
11 void (*fts_next_hook_mailbox_opened)(struct mailbox *box);
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
12
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
13 void fts_plugin_init(void)
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
14 {
8330
16a99d3a34dd FTS: If mail_debug=yes, log messages if fts is disabled.
Timo Sirainen <tss@iki.fi>
parents: 7086
diff changeset
15 if (getenv("FTS") != NULL) {
16a99d3a34dd FTS: If mail_debug=yes, log messages if fts is disabled.
Timo Sirainen <tss@iki.fi>
parents: 7086
diff changeset
16 fts_next_hook_mailbox_opened = hook_mailbox_opened;
16a99d3a34dd FTS: If mail_debug=yes, log messages if fts is disabled.
Timo Sirainen <tss@iki.fi>
parents: 7086
diff changeset
17 hook_mailbox_opened = fts_mailbox_opened;
16a99d3a34dd FTS: If mail_debug=yes, log messages if fts is disabled.
Timo Sirainen <tss@iki.fi>
parents: 7086
diff changeset
18 } else if (getenv("DEBUG") != NULL)
8404
d3cbd3494a8c Plugins: If mail_debug=yes, log "plugin disabled" if plugin's required setting isn't set.
Timo Sirainen <tss@iki.fi>
parents: 8330
diff changeset
19 i_info("fts: No fts setting - plugin disabled");
4609
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
20 }
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
21
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
22 void fts_plugin_deinit(void)
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
23 {
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
24 if (hook_mailbox_opened == fts_mailbox_opened)
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
25 hook_mailbox_opened = fts_next_hook_mailbox_opened;
48a16f1254b5 Added full text search plugin framework. Still missing support for handling
Timo Sirainen <tss@iki.fi>
parents:
diff changeset
26 }