summaryrefslogtreecommitdiffstats
path: root/src/plugins/virtual/virtual-transaction.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/virtual/virtual-transaction.h')
-rw-r--r--src/plugins/virtual/virtual-transaction.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/plugins/virtual/virtual-transaction.h b/src/plugins/virtual/virtual-transaction.h
new file mode 100644
index 0000000..a950fcb
--- /dev/null
+++ b/src/plugins/virtual/virtual-transaction.h
@@ -0,0 +1,24 @@
+#ifndef VIRTUAL_TRANSACTION_H
+#define VIRTUAL_TRANSACTION_H
+
+#include "index-storage.h"
+
+struct virtual_transaction_context {
+ struct mailbox_transaction_context t;
+
+ ARRAY(struct mailbox_transaction_context *) backend_transactions;
+};
+
+struct mailbox_transaction_context *
+virtual_transaction_get(struct mailbox_transaction_context *trans,
+ struct mailbox *backend_box);
+
+struct mailbox_transaction_context *
+virtual_transaction_begin(struct mailbox *box,
+ enum mailbox_transaction_flags flags,
+ const char *reason);
+int virtual_transaction_commit(struct mailbox_transaction_context *t,
+ struct mail_transaction_commit_changes *changes_r);
+void virtual_transaction_rollback(struct mailbox_transaction_context *t);
+
+#endif