Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Add a couple of public fonction to get access to the repository informations
Baptiste Daroussin committed 13 years ago
commit 4bb1df2d63f396233c8bfa6bedae2ecbb9c4711c
parent e1ad836
2 files changed +37 -2
modified libpkg/pkg.h.in
@@ -73,8 +73,7 @@ struct pkgdb_it;

struct pkg_jobs;

-
struct pkg_repos;
-
struct pkg_repos_entry;
+
struct pkg_repo;

struct pkg_config;
struct pkg_config_kv;
@@ -1352,4 +1351,10 @@ int pkg_from_old(struct pkg *pkg);
int pkg_to_old(struct pkg *pkg);
int pkg_register_old(struct pkg *pkg);
int pkg_sshserve(void);
+

+
int pkg_repos(struct pkg_repo **);
+
const char *pkg_repo_url(struct pkg_repo *r);
+
const char *pkg_repo_name(struct pkg_repo *r);
+
const char *pkg_repo_key(struct pkg_repo *r);
+
bool pkg_repo_enabled(struct pkg_repo *r);
#endif
modified libpkg/pkg_config.c
@@ -1128,3 +1128,33 @@ pkg_shutdown(void)

	return (EPKG_OK);
}
+

+
int
+
pkg_repos(struct pkg_repo **r)
+
{
+
	HASH_NEXT(repos, (*r));
+
}
+

+
const char *
+
pkg_repo_url(struct pkg_repo *r)
+
{
+
	return (r->url);
+
}
+

+
const char *
+
pkg_repo_name(struct pkg_repo *r)
+
{
+
	return (r->name);
+
}
+

+
const char *
+
pkg_repo_key(struct pkg_repo *r)
+
{
+
	return (r->pubkey);
+
}
+

+
bool
+
pkg_repo_enabled(struct pkg_repo *r)
+
{
+
	return (r->enable);
+
}