diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-16 12:21:37 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-01-16 12:21:37 +0200 |
commit | 25616b791461608b082291dda431d8247fe8fb21 (patch) | |
tree | af54231bc50a628aa3aefb33f8c9b8cd3bf30f38 /bpkg/rep-fetch.hxx | |
parent | ce76d4774a9e9d6b6c57d2c21f45f289eedccd56 (diff) |
Factor out bpkg repository fetching code used in rep-fetch and rep-info
Note that now rep-info in the manifest mode does not dump any of the
repository type-specific information.
Diffstat (limited to 'bpkg/rep-fetch.hxx')
-rw-r--r-- | bpkg/rep-fetch.hxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/bpkg/rep-fetch.hxx b/bpkg/rep-fetch.hxx index ccc9e11..c54119f 100644 --- a/bpkg/rep-fetch.hxx +++ b/bpkg/rep-fetch.hxx @@ -5,6 +5,8 @@ #ifndef BPKG_REP_FETCH_HXX #define BPKG_REP_FETCH_HXX +#include <libbpkg/manifest.hxx> + #include <bpkg/types.hxx> #include <bpkg/utility.hxx> @@ -14,6 +16,27 @@ namespace bpkg { int rep_fetch (const rep_fetch_options&, cli::scanner& args); + + // Fetch and authenticate repositories and packages manifests. + // + // If conf is NULL, then assume not running in a bpkg configuration. If it + // is empty, then check if the bpkg configuration exists in the current + // working directory. + // + class certificate; + + struct rep_fetch_data + { + std::vector<repository_manifest> repositories; + std::vector<package_manifest> packages; + shared_ptr<const bpkg::certificate> certificate; // Can be NULL. + }; + + rep_fetch_data + rep_fetch (const common_options& co, + const dir_path* conf, + const repository_location& rl, + bool ignore_unknown); } #endif // BPKG_REP_FETCH_HXX |