libmp/include/types.h

59 lines
1.2 KiB
C
Raw Normal View History

2024-06-20 00:34:32 +00:00
#pragma once
#include "url.h"
2024-06-20 00:34:32 +00:00
#include <stdbool.h>
#include <stddef.h>
#include <sys/types.h>
2024-07-02 01:44:07 +00:00
typedef struct lm_pkg_file {
char *path;
char *hash;
} lm_pkg_file_t;
typedef struct lm_pkg_path {
char *archive;
char *signature;
} lm_pkg_path_t;
typedef struct lm_pkg {
struct lm_pkg *next;
lm_pkg_path_t paths;
char *name;
char *desc;
char **depends;
2024-07-02 01:44:07 +00:00
char **keeps;
char *version;
size_t size;
} lm_pkg_t;
typedef struct lm_pool_info {
char *maintainer;
char *pubkey;
ssize_t size;
} lm_pool_info_t;
2024-06-20 00:34:32 +00:00
typedef struct lm_pool_path {
2024-07-02 01:44:07 +00:00
char *info_file;
char *list_file;
char *list_dir;
char *dir;
} lm_pool_path_t;
2024-06-20 00:34:32 +00:00
typedef struct lm_pool {
struct lm_pool *next;
lm_pool_info_t info;
lm_pool_path_t paths;
2024-06-20 22:36:56 +00:00
lm_url_t url;
lm_pkg_t *pkg;
2024-06-20 22:36:56 +00:00
bool available;
char *name;
2024-06-20 00:34:32 +00:00
} lm_pool_t;
typedef struct lm_ctx {
lm_pool_t *pools; // pool list
char *root; // root path for package installtion
char *temp; // temp path
char *data; // package database path
const char *version; // libmp version (read-only)
2024-06-20 00:34:32 +00:00
} lm_ctx_t;