summaryrefslogtreecommitdiff
path: root/src/core/transaction.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/transaction.h')
-rw-r--r--src/core/transaction.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/core/transaction.h b/src/core/transaction.h
new file mode 100644
index 0000000000..d519ffb1f5
--- /dev/null
+++ b/src/core/transaction.h
@@ -0,0 +1,36 @@
+#ifndef footransactionhfoo
+#define footransactionhfoo
+
+typedef struct Transaction Transaction;
+
+#include "unit.h"
+#include "manager.h"
+#include "job.h"
+#include "hashmap.h"
+
+struct Transaction {
+ /* Jobs to be added */
+ Hashmap *jobs; /* Unit object => Job object list 1:1 */
+ JobDependency *anchor;
+};
+
+Transaction *transaction_new(void);
+void transaction_free(Transaction *tr);
+
+int transaction_add_job_and_dependencies(
+ Transaction *tr,
+ JobType type,
+ Unit *unit,
+ Job *by,
+ bool matters,
+ bool override,
+ bool conflicts,
+ bool ignore_requirements,
+ bool ignore_order,
+ DBusError *e,
+ Job **_ret);
+int transaction_activate(Transaction *tr, Manager *m, JobMode mode, DBusError *e);
+int transaction_add_isolate_jobs(Transaction *tr, Manager *m);
+void transaction_abort(Transaction *tr);
+
+#endif