- move rest of rule functions from solver.c to rules.c
[platform/upstream/libsolv.git] / src / transaction.h
1 /*
2  * Copyright (c) 2007-2009, Novell Inc.
3  *
4  * This program is licensed under the BSD license, read LICENSE.BSD
5  * for further information
6  */
7
8 /*
9  * transaction.h
10  *
11  */
12
13 #ifndef SATSOLVER_TRANSACTION_H
14 #define SATSOLVER_TRANSACTION_H
15
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19
20 #include "pooltypes.h"
21 #include "queue.h"
22
23 struct _Solver;
24
25 #define SOLVER_TRANSACTION_ERASE                0x10
26 #define SOLVER_TRANSACTION_REINSTALLED          0x11
27 #define SOLVER_TRANSACTION_DOWNGRADED           0x12
28 #define SOLVER_TRANSACTION_CHANGED              0x13
29 #define SOLVER_TRANSACTION_UPGRADED             0x14
30 #define SOLVER_TRANSACTION_REPLACED             0x15
31
32 #define SOLVER_TRANSACTION_INSTALL              0x20
33 #define SOLVER_TRANSACTION_REINSTALL            0x21
34 #define SOLVER_TRANSACTION_DOWNGRADE            0x22
35 #define SOLVER_TRANSACTION_CHANGE               0x23
36 #define SOLVER_TRANSACTION_UPGRADE              0x24
37 #define SOLVER_TRANSACTION_REPLACE              0x25
38
39 #define SOLVER_TRANSACTION_MULTIINSTALL         0x30
40 #define SOLVER_TRANSACTION_MULTIREINSTALL       0x31
41
42 #define SOLVER_TRANSACTION_SHOW_ACTIVE          (1 << 0)
43 #define SOLVER_TRANSACTION_SHOW_ALL             (1 << 1)
44 #define SOLVER_TRANSACTION_SHOW_REPLACES        (1 << 2)
45
46 extern void solver_create_transaction(struct _Solver *solv);
47 extern void solver_transaction_all_pkgs(struct _Solver *solv, Id p, Queue *pkgs);
48 extern Id   solver_transaction_pkg(struct _Solver *solv, Id p);
49 extern Id   solver_transaction_filter(struct _Solver *solv, Id type, Id p, int mode);
50
51 #ifdef __cplusplus
52 }
53 #endif
54
55 #endif