summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/package.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/package.h')
-rw-r--r--lib/libalpm/package.h44
1 files changed, 16 insertions, 28 deletions
diff --git a/lib/libalpm/package.h b/lib/libalpm/package.h
index d6c3eff9..d06cf150 100644
--- a/lib/libalpm/package.h
+++ b/lib/libalpm/package.h
@@ -23,7 +23,8 @@
#ifndef _ALPM_PACKAGE_H
#define _ALPM_PACKAGE_H
-#include <time.h>
+#include <sys/types.h> /* off_t */
+#include <time.h> /* time_t */
#include "alpm.h"
#include "db.h"
@@ -33,32 +34,20 @@ typedef enum _pmpkgfrom_t {
PKG_FROM_FILE
} pmpkgfrom_t;
-/* Packages */
-#define PKG_FILENAME_LEN 512
-#define PKG_NAME_LEN 256
-#define PKG_VERSION_LEN 64
-#define PKG_FULLNAME_LEN (PKG_NAME_LEN + PKG_VERSION_LEN)
-#define PKG_DESC_LEN 512
-#define PKG_URL_LEN 256
-#define PKG_DATE_LEN 32
-#define PKG_TYPE_LEN 32
-#define PKG_PACKAGER_LEN 64
-#define PKG_MD5SUM_LEN 33
-#define PKG_ARCH_LEN 32
-
struct __pmpkg_t {
- char filename[PKG_FILENAME_LEN];
- char name[PKG_NAME_LEN];
- char version[PKG_VERSION_LEN];
- char desc[PKG_DESC_LEN];
- char url[PKG_URL_LEN];
+ char *filename;
+ char *name;
+ char *version;
+ char *desc;
+ char *url;
time_t builddate;
time_t installdate;
- char packager[PKG_PACKAGER_LEN];
- char md5sum[PKG_MD5SUM_LEN];
- char arch[PKG_ARCH_LEN];
- unsigned long size;
- unsigned long isize;
+ char *packager;
+ char *md5sum;
+ char *arch;
+ off_t size;
+ off_t isize;
+ off_t download_size;
unsigned short scriptlet;
unsigned short force;
pmpkgreason_t reason;
@@ -72,6 +61,7 @@ struct __pmpkg_t {
alpm_list_t *conflicts;
alpm_list_t *provides;
alpm_list_t *deltas;
+ alpm_list_t *delta_path;
/* internal */
pmpkgfrom_t origin;
/* Replaced 'void *data' with this union as follows:
@@ -85,14 +75,12 @@ struct __pmpkg_t {
pmdbinfrq_t infolevel;
};
-int _alpm_versioncmp(const char *a, const char *b);
-pmpkg_t* _alpm_pkg_new(const char *name, const char *version);
+pmpkg_t* _alpm_pkg_new(void);
pmpkg_t *_alpm_pkg_dup(pmpkg_t *pkg);
void _alpm_pkg_free(pmpkg_t *pkg);
int _alpm_pkg_cmp(const void *p1, const void *p2);
int _alpm_pkg_compare_versions(pmpkg_t *local_pkg, pmpkg_t *pkg);
-pmpkg_t *_alpm_pkg_load(const char *pkgfile, unsigned short full);
-pmpkg_t *_alpm_pkg_find(const char *needle, alpm_list_t *haystack);
+pmpkg_t *_alpm_pkg_find(alpm_list_t *haystack, const char *needle);
int _alpm_pkg_should_ignore(pmpkg_t *pkg);
#endif /* _ALPM_PACKAGE_H */