aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/StatusParagraph.h
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-09-18 20:50:08 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2016-09-18 20:54:03 -0700
commitccca198c1b1730b0241911cb56dc8e3504958b2a (patch)
treea2dd9b8b087a09afdcecc5cbb3377bed15127eb2 /toolsrc/include/StatusParagraph.h
downloadvcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.tar.gz
vcpkg-ccca198c1b1730b0241911cb56dc8e3504958b2a.zip
Initial commit
Diffstat (limited to 'toolsrc/include/StatusParagraph.h')
-rw-r--r--toolsrc/include/StatusParagraph.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/toolsrc/include/StatusParagraph.h b/toolsrc/include/StatusParagraph.h
new file mode 100644
index 000000000..1386bbdf4
--- /dev/null
+++ b/toolsrc/include/StatusParagraph.h
@@ -0,0 +1,41 @@
+#pragma once
+
+#include <unordered_map>
+#include "BinaryParagraph.h"
+
+namespace vcpkg
+{
+ enum class install_state_t
+ {
+ error,
+ not_installed,
+ half_installed,
+ installed,
+ };
+
+ 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;
+ install_state_t state;
+ };
+
+ std::ostream& operator<<(std::ostream& os, const StatusParagraph& pgh);
+
+ std::string to_string(install_state_t f);
+
+ std::string to_string(want_t f);
+}