#pragma once #include "types.h" #include #define PKG_DATA_SIZE "size" #define PKG_DATA_DESC "desc" #define PKG_DATA_VERSION "version" #define PKG_DATA_DEPENDS "depends" lm_pkg_t *lm_package_new(); void lm_package_free(lm_pkg_t *pkg); bool lm_package_data_load(lm_pkg_t *pkg, char *file); void lm_package_data_free(lm_pkg_t *pkg); bool lm_package_depend_add(lm_pkg_t *pkg, char *depend); size_t lm_package_depend_count(lm_pkg_t *pkg); bool lm_package_path_set_signature(lm_pkg_t *pkg, char *signature_path); bool lm_package_path_set_archive(lm_pkg_t *pkg, char *archive_path); bool lm_package_path_is_empty(lm_pkg_t *pkg); void lm_package_path_free(lm_pkg_t *pkg);