fts-user.h revision eeb03434472130f9631f164440566fd8d09e6380
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3Timo Sirainen#ifndef FTS_USER_H
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#define FTS_USER_H
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
bbce20cb4e5739e9a06058cf8ee1f38a7f6884f6Timo Sirainenstruct fts_user_language {
6a4bfb2b0bb9f53fb1d4e705bf3948ef4d1ecccbTimo Sirainen const struct fts_language *lang;
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen struct fts_filter *filter;
993e6c2caaae971dd3c34913a42d854e3b623261Timo Sirainen};
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo SirainenARRAY_DEFINE_TYPE(fts_user_language, struct fts_user_language *);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenint fts_user_language_get(struct mail_user *user,
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen const struct fts_language *lang,
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen struct fts_user_language **user_lang_r,
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen const char **error_r);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenint fts_user_languages_fill_all(struct mail_user *user, const char **error_r);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen
7888a9d2008eab9985096c46e1da9ee985c22a2aTimo Sirainenstruct fts_language_list *fts_user_get_language_list(struct mail_user *user);
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainenconst ARRAY_TYPE(fts_user_language) *
a24f6b02ed8d0dde933a715be1c86f01977bf610Timo Sirainenfts_user_get_all_languages(struct mail_user *user);
a24f6b02ed8d0dde933a715be1c86f01977bf610Timo Sirainen
213b139965e8bde6c8aff02ffd9fd39a74c887a9Timo Sirainenint fts_mail_user_init(struct mail_user *user, const char **error_r);
bbce20cb4e5739e9a06058cf8ee1f38a7f6884f6Timo Sirainenvoid fts_mail_user_deinit(struct mail_user *user);
a24f6b02ed8d0dde933a715be1c86f01977bf610Timo Sirainen
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen#endif
0cb2e8eb55e70f8ebe1e8349bdf49e4cbe5d8834Timo Sirainen