aboutsummaryrefslogtreecommitdiff
path: root/include/pkg.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/pkg.h')
-rw-r--r--include/pkg.h20
1 files changed, 9 insertions, 11 deletions
diff --git a/include/pkg.h b/include/pkg.h
index 2410710..15990ab 100644
--- a/include/pkg.h
+++ b/include/pkg.h
@@ -3,22 +3,20 @@
#include "str.h"
-struct package_t;
-typedef bool (*package_hook_cb_t)(struct package_t *pkg);
-typedef str (*package_version_cb_t)(struct package_t *pkg);
-
typedef struct package_t {
str name, version, url, src;
unsigned int dep_count;
bool is_local;
- package_hook_cb_t setup, build, install, rm, on_update, fetch_sources;
- package_version_cb_t fetch_latest_version;
} package_t;
-bool setup(package_t *pkg), build(package_t *pkg),
- install(package_t *pkg), rm(package_t *pkg),
- on_update(package_t *pkg),
- fetch_sources(package_t *pkg);
-str fetch_latest_version(package_t *pkg);
+bool pkg_hook_url(package_t *pkg);
+str pkg_get_url(package_t *pkg);
+bool pkg_hook_setup(package_t *pkg);
+bool pkg_hook_build(package_t *pkg);
+bool pkg_hook_install(package_t *pkg);
+bool pkg_hook_remove(package_t *pkg);
+bool pkg_hook_on_update(package_t *pkg);
+bool pkg_hook_fetch_sources(package_t *pkg);
+str pkg_hook_fetch_latest_version(package_t *pkg);
#endif