apply some patch for pythons rpm from opensource
[platform/upstream/rpm.git] / lib / fsm.h
1 #ifndef H_FSM
2 #define H_FSM
3
4 /** \ingroup payload
5  * \file lib/fsm.h
6  * File state machine to handle a payload within an rpm package.
7  */
8
9 #include <rpm/rpmfi.h>
10
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14
15 typedef struct rpmpsm_s * rpmpsm;
16
17 /**
18  * Execute a file actions for package
19  * @param ts            transaction set
20  * @param te            transaction set element
21  * @param files         transaction element file info
22  * @param psm           owner psm (or NULL)
23  * @retval failedFile   pointer to first file name that failed (malloced)
24  * @return              0 on success
25  */
26
27 int rpmPackageFilesInstall(rpmts ts, rpmte te, rpmfiles files,
28               rpmpsm psm, char ** failedFile);
29
30 int rpmPackageFilesRemove(rpmts ts, rpmte te, rpmfiles files,
31               rpmpsm psm, char ** failedFile);
32
33 RPM_GNUC_INTERNAL
34 int rpmfiArchiveReadToFilePsm(rpmfi fi, FD_t fd, int nodigest, rpmpsm psm);
35
36 RPM_GNUC_INTERNAL
37 void rpmpsmNotify(rpmpsm psm, int what, rpm_loff_t amount);
38 #ifdef __cplusplus
39 }
40 #endif
41
42 #endif  /* H_FSM */