File size: 1,458 Bytes
2492322 | 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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | // Copyright (c) 2019, QuantStack and Mamba Contributors
//
// Distributed under the terms of the BSD 3-Clause License.
//
// The full license is in the file LICENSE, distributed with this software.
#ifndef MAMBA_API_CHANNEL_LOADER_HPP
#define MAMBA_API_CHANNEL_LOADER_HPP
#include "mamba/core/error_handling.hpp"
namespace mamba
{
namespace solver::libsolv
{
class Database;
}
class Context;
class ChannelContext;
class MultiPackageCache;
/* Brief Creates channels and mirrors objects
* and loads channels.
*
* Creates and stores channels in the ChannelContext,
* and mirrors objects in the Context object. Then
* loads channels, i.e. download repodata.json files
* if they are not cached locally.
*/
auto load_channels(
Context& ctx,
ChannelContext& channel_context,
solver::libsolv::Database& database,
MultiPackageCache& package_caches
) -> expected_t<void, mamba_aggregated_error>;
/* Brief Creates channels and mirrors objects,
* but does not load channels.
*
* Creates and stores channels in the ChannelContext,
* and mirrors objects in the Context object.
*/
void init_channels(Context& context, ChannelContext& channel_context);
void init_channels_from_package_urls(
Context& context,
ChannelContext& channel_context,
const std::vector<std::string>& specs
);
}
#endif
|