summaryrefslogtreecommitdiff
path: root/lib/rpmfs.h
diff options
context:
space:
mode:
authorHyungKyu Song <hk76.song@samsung.com>2013-02-16 01:03:32 +0900
committerHyungKyu Song <hk76.song@samsung.com>2013-02-16 01:03:32 +0900
commit365d51246cf71556ecbb49f1fc6592262d4d4d77 (patch)
tree79d5c20a494622eb084de831a2a51530cd421e33 /lib/rpmfs.h
parentb7a3bffb8e0341b7e4ef69def268bca3a7f279ff (diff)
downloadrpm-365d51246cf71556ecbb49f1fc6592262d4d4d77.tar.gz
rpm-365d51246cf71556ecbb49f1fc6592262d4d4d77.tar.bz2
rpm-365d51246cf71556ecbb49f1fc6592262d4d4d77.zip
Diffstat (limited to 'lib/rpmfs.h')
-rw-r--r--lib/rpmfs.h63
1 files changed, 63 insertions, 0 deletions
diff --git a/lib/rpmfs.h b/lib/rpmfs.h
new file mode 100644
index 0000000..129bc65
--- /dev/null
+++ b/lib/rpmfs.h
@@ -0,0 +1,63 @@
+#ifndef _RPMFS_H
+#define _RPMFS_H
+
+#include <rpm/rpmfi.h>
+#include <rpm/rpmte.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;
+};
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+RPM_GNUC_INTERNAL
+rpmfs rpmfsNew(Header h, rpmElementType type);
+
+RPM_GNUC_INTERNAL
+rpmfs rpmfsFree(rpmfs fs);
+
+RPM_GNUC_INTERNAL
+rpm_count_t rpmfsFC(rpmfs fs);
+
+RPM_GNUC_INTERNAL
+void rpmfsAddReplaced(rpmfs fs, int pkgFileNum, int otherPkg, int otherFileNum);
+
+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);
+
+/* XXX this should be internal too but build code needs for now */
+void rpmfsSetAction(rpmfs fs, unsigned int ix, rpmFileAction action);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RPMFS_H */