File size: 1,898 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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | // Copyright (c) 2023, 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_SOLVER_LIBSOLV_PARAMETERS_HPP
#define MAMBA_SOLVER_LIBSOLV_PARAMETERS_HPP
#include <string>
#include <nlohmann/json_fwd.hpp>
namespace mamba::solver::libsolv
{
enum class RepodataParser
{
Mamba,
Libsolv,
};
enum class MatchSpecParser
{
Mixed,
Mamba,
Libsolv,
};
enum class PipAsPythonDependency : bool
{
No = false,
Yes = true,
};
enum class PackageTypes
{
CondaOnly,
TarBz2Only,
CondaAndTarBz2,
CondaOrElseTarBz2,
};
enum class VerifyPackages : bool
{
No = false,
Yes = true,
};
enum class LogLevel
{
Debug,
Warning,
Error,
Fatal,
};
struct Priorities
{
using value_type = int;
value_type priority = 0;
value_type subpriority = 0;
};
[[nodiscard]] auto operator==(const Priorities& lhs, const Priorities& rhs) -> bool;
[[nodiscard]] auto operator!=(const Priorities& lhs, const Priorities& rhs) -> bool;
/**
* Metadata serialized with a repository index.
*
* This is used to identify if the binary serialization is out of date with the expected
* index.
*/
struct RepodataOrigin
{
std::string url = {};
std::string etag = {};
std::string mod = {};
};
auto operator==(const RepodataOrigin& lhs, const RepodataOrigin& rhs) -> bool;
auto operator!=(const RepodataOrigin& lhs, const RepodataOrigin& rhs) -> bool;
void to_json(nlohmann::json& j, const RepodataOrigin& m);
void from_json(const nlohmann::json& j, RepodataOrigin& p);
}
#endif
|