aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/include
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-10 12:57:49 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-21 18:06:51 -0700
commit92cf32d59a5b3a1fd68bce4edf5c5d576e637678 (patch)
tree7ac33576ea94f3bfaa234a5cbc82d7feba31eb50 /toolsrc/include
parent47322f74bdefea394fdd07989a9535c35caeb8a3 (diff)
downloadvcpkg-92cf32d59a5b3a1fd68bce4edf5c5d576e637678.tar.gz
vcpkg-92cf32d59a5b3a1fd68bce4edf5c5d576e637678.zip
Add skeleton code for `vcpkg export`
Diffstat (limited to 'toolsrc/include')
-rw-r--r--toolsrc/include/vcpkg_Commands.h5
-rw-r--r--toolsrc/include/vcpkg_Dependencies.h26
2 files changed, 31 insertions, 0 deletions
diff --git a/toolsrc/include/vcpkg_Commands.h b/toolsrc/include/vcpkg_Commands.h
index 9760b5a35..68689bf1e 100644
--- a/toolsrc/include/vcpkg_Commands.h
+++ b/toolsrc/include/vcpkg_Commands.h
@@ -65,6 +65,11 @@ namespace vcpkg::Commands
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
}
+ namespace Export
+ {
+ void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
+ }
+
namespace CI
{
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths, const Triplet& default_triplet);
diff --git a/toolsrc/include/vcpkg_Dependencies.h b/toolsrc/include/vcpkg_Dependencies.h
index 247113573..ec3759a64 100644
--- a/toolsrc/include/vcpkg_Dependencies.h
+++ b/toolsrc/include/vcpkg_Dependencies.h
@@ -73,7 +73,33 @@ namespace vcpkg::Dependencies
RequestType request_type;
};
+ enum class ExportPlanType
+ {
+ UNKNOWN,
+ PORT_AVAILABLE_BUT_NOT_BUILT,
+ ALREADY_BUILT
+ };
+
+ struct ExportPlanAction
+ {
+ static bool compare_by_name(const ExportPlanAction* left, const ExportPlanAction* right);
+
+ ExportPlanAction();
+ ExportPlanAction(const PackageSpec& spec, const AnyParagraph& any_paragraph, const RequestType& request_type);
+ ExportPlanAction(const ExportPlanAction&) = delete;
+ ExportPlanAction(ExportPlanAction&&) = default;
+ ExportPlanAction& operator=(const ExportPlanAction&) = delete;
+ ExportPlanAction& operator=(ExportPlanAction&&) = default;
+
+ PackageSpec spec;
+ AnyParagraph any_paragraph;
+ ExportPlanType plan_type;
+ RequestType request_type;
+ };
+
std::vector<InstallPlanAction> create_install_plan(const VcpkgPaths& paths, const std::vector<PackageSpec>& specs, const StatusParagraphs& status_db);
std::vector<RemovePlanAction> create_remove_plan(const std::vector<PackageSpec>& specs, const StatusParagraphs& status_db);
+
+ std::vector<ExportPlanAction> create_export_plan(const VcpkgPaths& paths, const std::vector<PackageSpec>& specs, const StatusParagraphs& status_db);
}