fts-api-private.h revision e9257b4538b9f464693c5d5e548486f6d292301c
#ifndef FTS_API_PRIVATE_H
#define FTS_API_PRIVATE_H
#include "fts-api.h"
struct mail_user;
struct fts_backend_vfuncs {
struct fts_backend *(*alloc)(void);
struct fts_backend_update_context *
/* Start a build for specified key */
const struct fts_backend_build_key *key);
/* Finish a build for specified key - guaranteed to be called */
/* Add data for current build key */
const struct mail_search_arg *args);
struct fts_result *result);
struct fts_multi_result *result);
};
enum fts_backend_flags {
/* Backend supports indexing binary MIME parts */
/* Send built text to backend as decomposed titlecase rather than
preserving original case */
};
struct fts_backend {
const char *name;
enum fts_backend_flags flags;
struct fts_backend_vfuncs v;
struct mail_namespace *ns;
unsigned int updating:1;
unsigned int syncing:1;
};
struct fts_backend_update_context {
struct fts_backend *backend;
unsigned int build_key_open:1;
unsigned int failed:1;
};
struct fts_index_header {
/* highest UID and number of messages when optimization was last
time done */
};
void fts_backend_unregister(const char *name);
const struct mail_search_arg *args);
/* Returns TRUE if ok, FALSE if no fts header */
/* Returns TRUE if FTS backend should index the header for optimizing
separate lookups */
bool fts_header_want_indexed(const char *hdr_name);
/* Returns fd, which you can either read from or close. */
const char **path_r);
#endif