summaryrefslogtreecommitdiffstats
path: root/src/plugins/quota/quota-plugin.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
commitf7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch)
treea3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/plugins/quota/quota-plugin.h
parentInitial commit. (diff)
downloaddovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz
dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/plugins/quota/quota-plugin.h36
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