40 lines
1.5 KiB
C
40 lines
1.5 KiB
C
#pragma once
|
|
#include "types.h"
|
|
#include <stdbool.h>
|
|
|
|
#define PKG_DATA_SIZE "size"
|
|
#define PKG_DATA_DESC "desc"
|
|
#define PKG_DATA_VERSION "version"
|
|
#define PKG_DATA_DEPENDS "depends"
|
|
#define PKG_DATA_KEEPS "keeps"
|
|
|
|
lm_pkg_t *lm_package_new();
|
|
void lm_package_free(lm_pkg_t *pkg);
|
|
bool lm_package_verify(lm_pkg_t *pkg);
|
|
void lm_package_init(lm_pkg_t *pkg);
|
|
bool lm_package_copy(lm_pkg_t *dst, lm_pkg_t *src);
|
|
|
|
bool lm_package_data_load(lm_pkg_t *pkg, char *file);
|
|
void lm_package_data_free(lm_pkg_t *pkg);
|
|
|
|
bool lm_package_downloaded(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);
|
|
size_t lm_package_depend_strlen(lm_pkg_t *pkg);
|
|
bool lm_package_depend_tostr(lm_pkg_t *pkg, char *buffer);
|
|
bool lm_package_depend_fromstr(lm_pkg_t *pkg, char *buffer);
|
|
void lm_package_depend_free(lm_pkg_t *pkg);
|
|
bool lm_package_depends(lm_pkg_t *pkg, char *dep);
|
|
|
|
size_t lm_package_keep_count(lm_pkg_t *pkg);
|
|
bool lm_package_keep_add(lm_pkg_t *pkg, char *path);
|
|
bool lm_package_keep_contains(lm_pkg_t *pkg, char *path);
|
|
void lm_package_keep_free(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);
|
|
bool lm_package_path_copy(lm_pkg_t *dst, lm_pkg_t *src);
|
|
bool lm_package_is_same(lm_pkg_t *one, lm_pkg_t *two);
|