summaryrefslogtreecommitdiffstats
path: root/src/plugins/virtual/virtual-transaction.h
blob: a950fcb65b7ec0eed67b71d4ef77f091d0df0d2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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