index_transaction_rollback,
index_transaction_set_max_modseq,
index_keywords_create,
+ index_keywords_create_from_indexes,
index_keywords_free,
index_keyword_is_valid,
index_storage_get_seq_range,
index_transaction_rollback,
index_transaction_set_max_modseq,
index_keywords_create,
+ index_keywords_create_from_indexes,
index_keywords_free,
index_keyword_is_valid,
index_storage_get_seq_range,
return 0;
}
+struct mail_keywords *
+index_keywords_create_from_indexes(struct mailbox *_box,
+ const ARRAY_TYPE(keyword_indexes) *idx)
+{
+ struct index_mailbox *ibox = (struct index_mailbox *)_box;
+
+ return mail_index_keywords_create_from_indexes(ibox->index, idx);
+}
+
void index_keywords_free(struct mail_keywords *keywords)
{
mail_index_keywords_free(&keywords);
int index_keywords_create(struct mailbox *box, const char *const keywords[],
struct mail_keywords **keywords_r, bool skip_invalid);
+struct mail_keywords *
+index_keywords_create_from_indexes(struct mailbox *box,
+ const ARRAY_TYPE(keyword_indexes) *idx);
void index_keywords_free(struct mail_keywords *keywords);
bool index_keyword_is_valid(struct mailbox *box, const char *keyword,
const char **error_r);
index_transaction_rollback,
index_transaction_set_max_modseq,
index_keywords_create,
+ index_keywords_create_from_indexes,
index_keywords_free,
index_keyword_is_valid,
index_storage_get_seq_range,
index_transaction_rollback,
index_transaction_set_max_modseq,
index_keywords_create,
+ index_keywords_create_from_indexes,
index_keywords_free,
index_keyword_is_valid,
index_storage_get_seq_range,
index_transaction_rollback,
index_transaction_set_max_modseq,
index_keywords_create,
+ index_keywords_create_from_indexes,
index_keywords_free,
index_keyword_is_valid,
index_storage_get_seq_range,
const char *const keywords[],
struct mail_keywords **keywords_r,
bool skip_invalid);
+ struct mail_keywords *
+ (*keywords_create_from_indexes)(struct mailbox *box,
+ const ARRAY_TYPE(keyword_indexes) *idx);
void (*keywords_free)(struct mail_keywords *keywords);
bool (*keyword_is_valid)(struct mailbox *box, const char *keyword,
const char **error_r);
}
}
- storage_class->v.class_deinit();
+ if (storage_class->v.class_deinit != NULL)
+ storage_class->v.class_deinit();
}
struct mail_storage *mail_storage_find_class(const char *name)
DLLIST_REMOVE(&storage->user->storages, storage);
- storage->v.destroy(storage);
+ if (storage->v.destroy != NULL)
+ storage->v.destroy(storage);
i_free(storage->error_string);
pool_unref(&storage->pool);
}
return kw;
}
+struct mail_keywords *
+mailbox_keywords_create_from_indexes(struct mailbox *box,
+ const ARRAY_TYPE(keyword_indexes) *idx)
+{
+ return box->v.keywords_create_from_indexes(box, idx);
+}
+
void mailbox_keywords_free(struct mailbox *box,
struct mail_keywords **_keywords)
{
struct mail_keywords *
mailbox_keywords_create_valid(struct mailbox *box,
const char *const keywords[]);
+struct mail_keywords *
+mailbox_keywords_create_from_indexes(struct mailbox *box,
+ const ARRAY_TYPE(keyword_indexes) *idx);
void mailbox_keywords_free(struct mailbox *box,
struct mail_keywords **keywords);
/* Returns TRUE if keyword is valid, FALSE and error if not. */