repo

List, download and sync packs with remote repositories
Log | Files | Refs | README

repo.h (582B)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <limits.h>
#include <sys/queue.h>

#define DEFLISTFILE   ".list"
#define DEFLOCALREPO  "/var/cache/repo"
#define DEFCFGFILE    "/etc/repo.conf"

struct pack {
	char name[LINE_MAX];
	char version[LINE_MAX];
	char url[PATH_MAX];
	TAILQ_ENTRY(pack) entries;
};
TAILQ_HEAD(packs, pack);

struct repo {
	char *url;
	TAILQ_ENTRY(repo) entries;
};
TAILQ_HEAD(repos, repo);

struct pack *addpack(struct packs *, char *, char *, char *);
struct repo *addrepo(struct repos *, char *);
int repolist(struct packs *, char *);
int parseconf(struct repos *, char *, int *, const char *);