2 * Copyright (c) 2007-2009, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
13 #ifndef SATSOLVER_TRANSACTION_H
14 #define SATSOLVER_TRANSACTION_H
20 #include "pooltypes.h"
25 struct _TransactionOrderdata;
27 typedef struct _Transaction {
28 struct _Pool *pool; /* back pointer to pool */
30 Queue steps; /* the transaction steps */
32 Queue transaction_info;
33 Id *transaction_installed;
36 struct _TransactionOrderdata *orderdata;
42 #define SOLVER_TRANSACTION_ERASE 0x10
43 #define SOLVER_TRANSACTION_REINSTALLED 0x11
44 #define SOLVER_TRANSACTION_DOWNGRADED 0x12
45 #define SOLVER_TRANSACTION_CHANGED 0x13
46 #define SOLVER_TRANSACTION_UPGRADED 0x14
47 #define SOLVER_TRANSACTION_REPLACED 0x15
49 #define SOLVER_TRANSACTION_INSTALL 0x20
50 #define SOLVER_TRANSACTION_REINSTALL 0x21
51 #define SOLVER_TRANSACTION_DOWNGRADE 0x22
52 #define SOLVER_TRANSACTION_CHANGE 0x23
53 #define SOLVER_TRANSACTION_UPGRADE 0x24
54 #define SOLVER_TRANSACTION_REPLACE 0x25
56 #define SOLVER_TRANSACTION_MULTIINSTALL 0x30
57 #define SOLVER_TRANSACTION_MULTIREINSTALL 0x31
60 #define SOLVER_TRANSACTION_SHOW_ACTIVE (1 << 0)
61 #define SOLVER_TRANSACTION_SHOW_ALL (1 << 1)
62 #define SOLVER_TRANSACTION_SHOW_REPLACES (1 << 2)
64 extern void transaction_init(Transaction *trans, struct _Pool *pool);
65 extern void transaction_free(Transaction *trans);
66 extern void transaction_calculate(Transaction *trans, Queue *decisionq, Map *noobsmap);
67 extern void solver_transaction_all_pkgs(Transaction *trans, Id p, Queue *pkgs);
68 extern Id solver_transaction_pkg(Transaction *trans, Id p);
69 extern Id solver_transaction_show(Transaction *trans, Id type, Id p, int mode);
70 extern void transaction_order(Transaction *trans, int flags);
71 extern void transaction_check(Transaction *trans);
72 extern int transaction_add_choices(Transaction *trans, Queue *choices, Id chosen);
75 #define SOLVER_TRANSACTION_KEEP_ORDERDATA (1 << 0)