vcpkg/toolsrc/include/StatusParagraph.h

42 lines
753 B
C
Raw Normal View History

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
{
ERROR_STATE,
NOT_INSTALLED,
HALF_INSTALLED,
INSTALLED,
2016-09-19 11:50:08 +08:00
};
2017-04-04 06:25:53 +08:00
enum class Want
2016-09-19 11:50:08 +08:00
{
ERROR_STATE,
UNKNOWN,
INSTALL,
HOLD,
DEINSTALL,
PURGE
2016-09-19 11:50:08 +08:00
};
struct StatusParagraph
{
StatusParagraph();
explicit StatusParagraph(const std::unordered_map<std::string, std::string>& fields);
BinaryParagraph package;
2017-04-04 06:25:53 +08:00
Want 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
2017-04-04 06:25:53 +08:00
std::string to_string(Want f);
2016-09-19 11:50:08 +08:00
}