summaryrefslogtreecommitdiff
path: root/lib/rpmal.h
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-10-29 23:39:51 +0000
committerjbj <devnull@localhost>2001-10-29 23:39:51 +0000
commitbdae587b2ea0dc058d178cfb6a4f102fa541a0ab (patch)
tree82574acf544af00270c9387a09734182fee0ac8d /lib/rpmal.h
parente62f50c8a585566d68bbfdbaf1eead46630e3ca9 (diff)
downloadrpm-bdae587b2ea0dc058d178cfb6a4f102fa541a0ab.tar.gz
rpm-bdae587b2ea0dc058d178cfb6a4f102fa541a0ab.tar.bz2
rpm-bdae587b2ea0dc058d178cfb6a4f102fa541a0ab.zip
- add some dinky availablePackage methods.
CVS patchset: 5141 CVS date: 2001/10/29 23:39:51
Diffstat (limited to 'lib/rpmal.h')
-rw-r--r--lib/rpmal.h93
1 files changed, 45 insertions, 48 deletions
diff --git a/lib/rpmal.h b/lib/rpmal.h
index 3e4bb2a05..b84c0e775 100644
--- a/lib/rpmal.h
+++ b/lib/rpmal.h
@@ -6,10 +6,12 @@
* Structures used for managing added/available package lists.
*/
+#if 0
typedef /*@abstract@*/ struct fileIndexEntry_s * fileIndexEntry;
typedef /*@abstract@*/ struct dirInfo_s * dirInfo;
typedef /*@abstract@*/ struct availableIndexEntry_s * availableIndexEntry;
typedef /*@abstract@*/ struct availableIndex_s * availableIndex;
+#endif
typedef /*@abstract@*/ struct tsortInfo_s * tsortInfo;
@@ -30,7 +32,7 @@ struct tsortInfo_s {
availablePackage tsi_pkg;
int tsi_reqx;
int tsi_qcnt;
-} ;
+};
/*@=fielduse@*/
/** \ingroup rpmdep
@@ -59,63 +61,58 @@ struct availablePackage_s {
/*@kept@*//*@null@*/ const void * key; /*!< Private data associated with a package (e.g. file name of package). */
/*@null@*/ rpmRelocation * relocs;
/*@null@*/ FD_t fd;
-} ;
+};
-/** \ingroup rpmdep
- * A single available item (e.g. a Provides: dependency).
- */
-struct availableIndexEntry_s {
-/*@dependent@*/ availablePackage package; /*!< Containing package. */
-/*@dependent@*/ const char * entry; /*!< Available item name. */
- size_t entryLen; /*!< No. of bytes in name. */
- enum indexEntryType {
- IET_PROVIDES=1 /*!< A Provides: dependency. */
- } type; /*!< Type of available item. */
-} ;
+#ifdef __cplusplus
+extern "C" {
+#endif
-/** \ingroup rpmdep
- * Index of all available items.
+/**
+ * Return number of packages in list.
+ * @param al available list
+ * @return no. of packages in list
*/
-struct availableIndex_s {
-/*@null@*/ availableIndexEntry index; /*!< Array of available items. */
- int size; /*!< No. of available items. */
-} ;
+int alGetSize(availableList al)
+ /*@*/;
-/** \ingroup rpmdep
- * A file to be installed/removed.
+/**
+ * Return available package key.
+ * @param al available list
+ * @param pkgNum available package index
+ * @return available package key
*/
-struct fileIndexEntry_s {
- int pkgNum; /*!< Containing package number. */
- int fileFlags; /* MULTILIB */
-/*@dependent@*/ /*@null@*/ const char * baseName; /*!< File basename. */
-} ;
+/*@kept@*/ /*@null@*/
+const void * alGetKey(/*@null@*/ availableList al, int pkgNum)
+ /*@*/;
-/** \ingroup rpmdep
- * A directory to be installed/removed.
+/**
+ * Return available package.
+ * @param al available list
+ * @param pkgNum available package index
+ * @return available package pointer
*/
-struct dirInfo_s {
-/*@owned@*/ const char * dirName; /*!< Directory path (+ trailing '/'). */
- int dirNameLen; /*!< No. bytes in directory path. */
-/*@owned@*/ fileIndexEntry files; /*!< Array of files in directory. */
- int numFiles; /*!< No. files in directory. */
-} ;
+/*@dependent@*/ /*@null@*/
+availablePackage alGetPkg(/*@null@*/ availableList al, int pkgNum)
+ /*@*/;
-/** \ingroup rpmdep
- * Set of available packages, items, and directories.
+/**
+ * Return available package index.
+ * @param al available list
+ * @param alp available package pointer
+ * @return available package index, -1 on failure
*/
-struct availableList_s {
-/*@owned@*/ /*@null@*/ availablePackage list; /*!< Set of packages. */
- struct availableIndex_s index; /*!< Set of available items. */
- int delta; /*!< Delta for pkg list reallocation. */
- int size; /*!< No. of pkgs in list. */
- int alloced; /*!< No. of pkgs allocated for list. */
- int numDirs; /*!< No. of directories. */
-/*@owned@*/ /*@null@*/ dirInfo dirs; /*!< Set of directories. */
-} ;
+int alGetPkgIndex(/*@null@*/ availableList al, availablePackage alp)
+ /*@*/;
-#ifdef __cplusplus
-extern "C" {
-#endif
+/**
+ * Return (malloc'd) available package name-version-release string.
+ * @param al available list
+ * @param alp available package pointer
+ * @return
+ */
+/*@only@*/ /*@null@*/
+const char * alGetPkgNVR(/*@null@*/ availableList al, availablePackage alp)
+ /*@*/;
/**
* Initialize available packckages, items, and directory list.