c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen#ifndef QUOTA_PLUGIN_H
c25356d5978632df6203437e1953bcb29e0c736fTimo Sirainen#define QUOTA_PLUGIN_H
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen#include "module-context.h"
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainen#include "mail-user.h"
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen
5666a3d6a7ea89362b8d9e8b39b15424cd9d6388Timo Sirainenstruct module;
9563e6542b7a8a13b13a0ef62ec68b0383b99293Timo Sirainenstruct mailbox;
d7c2ae49f036ef256f63bd2d437c53da122c665eTimo Sirainenstruct mailbox_list;
539977f9257bd8985be5a8093658da266ae9cd19Timo Sirainenstruct mail;
5666a3d6a7ea89362b8d9e8b39b15424cd9d6388Timo Sirainen
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen#define QUOTA_USER_CONTEXT(obj) \
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen MODULE_CONTEXT(obj, quota_user_module)
9390fe0c1b5b7495363f9194ff701470e242dd0eAki Tuomi#define QUOTA_USER_CONTEXT_REQUIRE(obj) \
9390fe0c1b5b7495363f9194ff701470e242dd0eAki Tuomi MODULE_CONTEXT_REQUIRE(obj, quota_user_module)
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainenstruct quota_user {
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen union mail_user_module_context module_ctx;
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen struct quota *quota;
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen};
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainen
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenstruct mail_storage;
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
0df9428baed48afaff90b4d4f03792d2fd756a43Timo Sirainenextern MODULE_CONTEXT_DEFINE(quota_user_module, &mail_user_module_register);
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
d23c747de9d33966483fbdd41f08ad7766da7c5cTimo Sirainenvoid quota_mail_user_created(struct mail_user *user);
d7c2ae49f036ef256f63bd2d437c53da122c665eTimo Sirainenvoid quota_mailbox_list_created(struct mailbox_list *list);
2d8b23805db6f06b8b38174fb6e135386694f429Timo Sirainenvoid quota_mail_namespaces_created(struct mail_namespace *namespaces);
ea9d9d99948cff5f9b881f79b28fa3b80da0f2a7Timo Sirainenvoid quota_mailbox_allocated(struct mailbox *box);
539977f9257bd8985be5a8093658da266ae9cd19Timo Sirainenvoid quota_mail_allocated(struct mail *mail);
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
5666a3d6a7ea89362b8d9e8b39b15424cd9d6388Timo Sirainenvoid quota_plugin_init(struct module *module);
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainenvoid quota_plugin_deinit(void);
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen
1795e934ebcd58175d3b5bbdd811b13c7889efa3Timo Sirainen#endif