2016-09-19 11:50:08 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <unordered_map>
|
|
|
|
#include "BinaryParagraph.h"
|
|
|
|
|
|
|
|
namespace vcpkg
|
|
|
|
{
|
2017-04-04 06:14:17 +08:00
|
|
|
enum class InstallState
|
2016-09-19 11:50:08 +08:00
|
|
|
{
|
2017-04-04 06:25:34 +08:00
|
|
|
ERROR_STATE,
|
|
|
|
NOT_INSTALLED,
|
|
|
|
HALF_INSTALLED,
|
|
|
|
INSTALLED,
|
2016-09-19 11:50:08 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
enum class want_t
|
|
|
|
{
|
|
|
|
error,
|
|
|
|
unknown,
|
|
|
|
install,
|
|
|
|
hold,
|
|
|
|
deinstall,
|
|
|
|
purge
|
|
|
|
};
|
|
|
|
|
|
|
|
struct StatusParagraph
|
|
|
|
{
|
|
|
|
StatusParagraph();
|
|
|
|
explicit StatusParagraph(const std::unordered_map<std::string, std::string>& fields);
|
|
|
|
|
|
|
|
BinaryParagraph package;
|
|
|
|
want_t want;
|
2017-04-04 06:14:17 +08:00
|
|
|
InstallState state;
|
2016-09-19 11:50:08 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
std::ostream& operator<<(std::ostream& os, const StatusParagraph& pgh);
|
|
|
|
|
2017-04-04 06:14:17 +08:00
|
|
|
std::string to_string(InstallState f);
|
2016-09-19 11:50:08 +08:00
|
|
|
|
|
|
|
std::string to_string(want_t f);
|
|
|
|
}
|