aboutsummaryrefslogtreecommitdiff
path: root/include/spm.h
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2019-12-21 01:12:51 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2019-12-21 01:12:51 -0500
commit6a4aa30406b19cd4c0bac04cb9bd27996b6380db (patch)
tree57fac4c9f85f2be9dacef65aeef018cfe341ecdc /include/spm.h
parent7f455d3bd1030b6fb48b5e8431b08d40eead2b2e (diff)
downloadspmc-6a4aa30406b19cd4c0bac04cb9bd27996b6380db.tar.gz
Implement basic package manifest
Diffstat (limited to 'include/spm.h')
-rw-r--r--include/spm.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/spm.h b/include/spm.h
index 219af36..7d986c1 100644
--- a/include/spm.h
+++ b/include/spm.h
@@ -54,6 +54,11 @@ typedef struct {
} ManifestPackage;
typedef struct {
+ int records;
+ ManifestPackage **packages;
+} Manifest;
+
+typedef struct {
char *root;
char **dirs;
size_t dirs_length;
@@ -77,6 +82,7 @@ typedef struct {
typedef struct {
char *package_dir;
char *tmp_dir;
+ char *package_manifest;
char *user_config_basedir;
char *user_config_file;
int verbose;
@@ -156,6 +162,7 @@ char *get_user_conf_dir(void);
char *get_user_config_file(void);
char *get_user_tmp_dir(void);
char *get_user_package_dir(void);
+char *get_package_manifest(void);
void init_config_global(void);
void free_global_config(void);
@@ -194,7 +201,11 @@ FSTree *fstree(const char *_path);
int rmdirs(const char *_path);
// manifest.c
-int manifest_create(const char *package_dir);
+Manifest *manifest_from(const char *package_dir);
+Manifest *manifest_read(void);
+int manifest_write(Manifest *info);
+void manifest_free(Manifest *info);
+ManifestPackage *manifest_search(Manifest *info, const char *package);
// checksum.c
char *md5sum(const char *filename);