2010-03-12 14:32:15 +08:00
|
|
|
#ifndef _RPMFS_H
|
|
|
|
#define _RPMFS_H
|
|
|
|
|
|
|
|
#include <rpm/rpmfi.h>
|
|
|
|
|
|
|
|
/** \ingroup rpmfs
|
|
|
|
* Transaction element file states.
|
|
|
|
*/
|
|
|
|
typedef struct rpmfs_s * rpmfs;
|
|
|
|
typedef struct sharedFileInfo_s * sharedFileInfo;
|
|
|
|
typedef char rpm_fstate_t;
|
|
|
|
|
|
|
|
/* XXX psm needs access to these */
|
|
|
|
struct sharedFileInfo_s {
|
|
|
|
int pkgFileNum;
|
|
|
|
int otherPkg;
|
|
|
|
int otherFileNum;
|
2011-08-29 19:04:28 +08:00
|
|
|
char rstate;
|
2010-03-12 14:32:15 +08:00
|
|
|
};
|
|
|
|
|
2010-09-21 20:21:12 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2010-03-12 14:32:15 +08:00
|
|
|
RPM_GNUC_INTERNAL
|
2012-04-24 18:36:38 +08:00
|
|
|
rpmfs rpmfsNew(rpm_count_t fc, int initState);
|
2010-03-12 14:32:15 +08:00
|
|
|
|
|
|
|
RPM_GNUC_INTERNAL
|
|
|
|
rpmfs rpmfsFree(rpmfs fs);
|
|
|
|
|
|
|
|
RPM_GNUC_INTERNAL
|
|
|
|
rpm_count_t rpmfsFC(rpmfs fs);
|
|
|
|
|
|
|
|
RPM_GNUC_INTERNAL
|
2011-08-29 19:04:28 +08:00
|
|
|
void rpmfsAddReplaced(rpmfs fs, int pkgFileNum, char rstate,
|
|
|
|
int otherPkg, int otherFileNum);
|
2010-03-12 14:32:15 +08:00
|
|
|
|
|
|
|
RPM_GNUC_INTERNAL
|
|
|
|
sharedFileInfo rpmfsGetReplaced(rpmfs fs);
|
|
|
|
|
|
|
|
RPM_GNUC_INTERNAL
|
|
|
|
sharedFileInfo rpmfsNextReplaced(rpmfs fs , sharedFileInfo replaced);
|
|
|
|
|
|
|
|
RPM_GNUC_INTERNAL
|
|
|
|
void rpmfsSetState(rpmfs fs, unsigned int ix, rpmfileState state);
|
|
|
|
|
|
|
|
RPM_GNUC_INTERNAL
|
|
|
|
rpmfileState rpmfsGetState(rpmfs fs, unsigned int ix);
|
|
|
|
|
|
|
|
/* May return NULL */
|
|
|
|
RPM_GNUC_INTERNAL
|
|
|
|
rpm_fstate_t * rpmfsGetStates(rpmfs fs);
|
|
|
|
|
|
|
|
RPM_GNUC_INTERNAL
|
|
|
|
rpmFileAction rpmfsGetAction(rpmfs fs, unsigned int ix);
|
|
|
|
|
2012-04-24 17:36:26 +08:00
|
|
|
RPM_GNUC_INTERNAL
|
2010-03-12 14:32:15 +08:00
|
|
|
void rpmfsSetAction(rpmfs fs, unsigned int ix, rpmFileAction action);
|
|
|
|
|
2014-03-21 18:36:35 +08:00
|
|
|
RPM_GNUC_INTERNAL
|
|
|
|
void rpmfsResetActions(rpmfs fs);
|
|
|
|
|
2010-09-21 20:21:12 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2010-03-12 14:32:15 +08:00
|
|
|
#endif /* _RPMFS_H */
|