aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include/StatusParagraph.h
blob: 1386bbdf4495d540bb7991a9acdf6175ca54badf (plain)
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
#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);
}