diff options
Diffstat (limited to '')
-rw-r--r-- | src/plugins/quota/quota-plugin.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/plugins/quota/quota-plugin.h b/src/plugins/quota/quota-plugin.h new file mode 100644 index 0000000..927d428 --- /dev/null +++ b/src/plugins/quota/quota-plugin.h @@ -0,0 +1,36 @@ +#ifndef QUOTA_PLUGIN_H +#define QUOTA_PLUGIN_H + +#include "module-context.h" +#include "mail-user.h" + +struct module; +struct mailbox; +struct mailbox_list; +struct mail; + +#define QUOTA_USER_CONTEXT(obj) \ + MODULE_CONTEXT(obj, quota_user_module) +#define QUOTA_USER_CONTEXT_REQUIRE(obj) \ + MODULE_CONTEXT_REQUIRE(obj, quota_user_module) + +struct quota_user { + union mail_user_module_context module_ctx; + + struct quota *quota; +}; + +struct mail_storage; + +extern MODULE_CONTEXT_DEFINE(quota_user_module, &mail_user_module_register); + +void quota_mail_user_created(struct mail_user *user); +void quota_mailbox_list_created(struct mailbox_list *list); +void quota_mail_namespaces_created(struct mail_namespace *namespaces); +void quota_mailbox_allocated(struct mailbox *box); +void quota_mail_allocated(struct mail *mail); + +void quota_plugin_init(struct module *module); +void quota_plugin_deinit(void); + +#endif |