From 25616b791461608b082291dda431d8247fe8fb21 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 16 Jan 2018 12:21:37 +0200 Subject: 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. --- bpkg/rep-fetch.hxx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'bpkg/rep-fetch.hxx') 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 + #include #include @@ -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 repositories; + std::vector packages; + shared_ptr 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 -- cgit v1.1