vcpkg/toolsrc/include/vcpkg_Dependencies.h

52 lines
1.2 KiB
C
Raw Normal View History

#pragma once
#include <vector>
#include "package_spec.h"
#include "StatusParagraphs.h"
#include "vcpkg_paths.h"
2017-01-06 06:14:11 +08:00
namespace vcpkg::Dependencies
{
2016-11-16 03:56:46 +08:00
enum class install_plan_type
{
BUILD_AND_INSTALL,
INSTALL,
ALREADY_INSTALLED
};
struct install_plan_action
{
2016-11-16 03:56:46 +08:00
install_plan_type type;
2017-01-31 04:36:27 +08:00
std::unique_ptr<BinaryParagraph> binary_pgh;
std::unique_ptr<SourceParagraph> source_pgh;
};
2016-11-16 03:56:46 +08:00
struct package_spec_with_install_plan
{
package_spec spec;
2016-11-16 03:56:46 +08:00
install_plan_action plan;
2016-11-16 03:56:46 +08:00
};
2017-01-27 06:25:36 +08:00
enum class remove_plan_type
{
NOT_INSTALLED,
2017-01-31 04:34:36 +08:00
REMOVE_AUTO_SELECTED,
2017-01-27 09:53:45 +08:00
REMOVE_USER_REQUESTED
2017-01-27 06:25:36 +08:00
};
2017-01-27 09:53:45 +08:00
struct remove_plan_action
{
remove_plan_type type;
2017-01-31 04:34:36 +08:00
std::unique_ptr<StatusParagraph> status_pgh;
2017-01-27 09:53:45 +08:00
};
struct package_spec_with_remove_plan
{
package_spec spec;
remove_plan_action plan;
};
2017-01-27 06:25:36 +08:00
2016-11-16 03:56:46 +08:00
std::vector<package_spec_with_install_plan> create_install_plan(const vcpkg_paths& paths, const std::vector<package_spec>& specs, const StatusParagraphs& status_db);
2017-01-27 09:53:45 +08:00
std::vector<package_spec_with_remove_plan> create_remove_plan(const vcpkg_paths& paths, const std::vector<package_spec>& specs, const StatusParagraphs& status_db);
2017-01-06 06:14:11 +08:00
}