Move the lone hashFunctionString() into misc.[ch], eliminate rpmhash.[ch]
[platform/upstream/rpm.git] / lib / rpmts_internal.h
1 #ifndef _RPMTS_INTERNAL_H
2 #define _RPMTS_INTERNAL_H
3
4 #include <rpm/rpmts.h>
5
6 #include "lib/rpmal.h"          /* XXX availablePackage */
7 #include "lib/fprint.h"
8 #include "lib/rpmlock.h"
9
10 typedef struct diskspaceInfo_s * rpmDiskSpaceInfo;
11
12 /* Transaction set elements information */
13 typedef struct tsMembers_s {
14     intHash removedPackages;    /*!< Set of packages being removed. */
15
16     rpmal addedPackages;        /*!< Set of packages being installed. */
17     int numAddedPackages;       /*!< No. added package instances. */
18
19     rpmte * order;              /*!< Packages sorted by dependencies. */
20     int orderCount;             /*!< No. of transaction elements. */
21     int orderAlloced;           /*!< No. of allocated transaction elements. */
22     int delta;                  /*!< Delta for reallocation. */
23 } * tsMembers;
24
25 /** \ingroup rpmts
26  * The set of packages to be installed/removed atomically.
27  */
28 struct rpmts_s {
29     rpmtransFlags transFlags;   /*!< Bit(s) to control operation. */
30
31     int (*solve) (rpmts ts, rpmds key, const void * data);
32                                 /*!< Search for NEVRA key. */
33     const void * solveData;     /*!< Solve callback data */
34
35     rpmCallbackFunction notify; /*!< Callback function. */
36     rpmCallbackData notifyData; /*!< Callback private data. */
37
38     rpmprobFilterFlags ignoreSet;
39                                 /*!< Bits to filter current problems. */
40
41     rpmDiskSpaceInfo dsi;       /*!< Per filesystem disk/inode usage. */
42
43     rpmdb rdb;                  /*!< Install database handle. */
44     int dbmode;                 /*!< Install database open mode. */
45
46     tsMembers members;          /*!< Transaction set member info (order etc) */
47
48     int selinuxEnabled;         /*!< Is SE linux enabled? */
49     int chrootDone;             /*!< Has chroot(2) been been done? */
50     char * rootDir;             /*!< Path to top of install tree. */
51     char * currDir;             /*!< Current working directory. */
52     char * lockPath;            /*!< Transaction lock path */
53     FD_t scriptFd;              /*!< Scriptlet stdout/stderr. */
54     rpm_tid_t tid;              /*!< Transaction id. */
55
56     rpm_color_t color;          /*!< Transaction color bits. */
57     rpm_color_t prefcolor;      /*!< Preferred file color. */
58
59     rpmVSFlags vsflags;         /*!< Signature/digest verification flags. */
60
61     rpmKeyring keyring;         /*!< Keyring in use. */
62
63     ARGV_t netsharedPaths;      /*!< From %{_netsharedpath} */
64     ARGV_t installLangs;        /*!< From %{_install_langs} */
65
66     struct rpmop_s ops[RPMTS_OP_MAX];
67
68     rpmSpec spec;               /*!< Spec file control structure. */
69
70     int nrefs;                  /*!< Reference count. */
71 };
72
73 RPM_GNUC_INTERNAL
74 tsMembers rpmtsMembers(rpmts ts);
75
76 /* returns -1 for retry, 0 for ignore and 1 for not found */
77 RPM_GNUC_INTERNAL
78 int rpmtsSolve(rpmts ts, rpmds key);
79
80 RPM_GNUC_INTERNAL
81 rpmlock rpmtsAcquireLock(rpmts ts);
82 #endif /* _RPMTS_INTERNAL_H */