diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2012-04-19 23:54:11 +0200 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2012-04-20 17:12:27 +0200 |
commit | 75778e21dfeee51036d24501e39ea7398fabe502 (patch) | |
tree | ee7edd4c9b65874f43252b078d27e9b2ffdad676 /src/core/transaction.h | |
parent | 7527cb527598aaabf0ed9b38a352edb28536392a (diff) |
manager: split transaction.[ch]
manager.c takes care of the main loop, unit management, signal handling, ...
transaction.c computes transactions.
After split:
manager.c: 65 KB
transaction.c: 40 KB
Diffstat (limited to 'src/core/transaction.h')
-rw-r--r-- | src/core/transaction.h | 36 |
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 |