2016-11-07 16:06:36 -08:00
|
|
|
#pragma once
|
|
|
|
|
2017-02-27 15:45:56 -08:00
|
|
|
#include "BinaryParagraph.h"
|
2017-04-03 16:29:11 -07:00
|
|
|
#include "VcpkgPaths.h"
|
2017-04-03 16:13:46 -07:00
|
|
|
#include "VersionT.h"
|
2017-04-27 17:56:06 -07:00
|
|
|
#include "filesystem_fs.h"
|
|
|
|
#include "vcpkg_expected.h"
|
|
|
|
#include <map>
|
2016-11-07 16:06:36 -08:00
|
|
|
|
2017-01-05 14:25:50 -08:00
|
|
|
namespace vcpkg::Paragraphs
|
2016-11-07 16:06:36 -08:00
|
|
|
{
|
2017-04-01 03:30:52 -07:00
|
|
|
using ParagraphDataMap = std::unordered_map<std::string, std::string>;
|
|
|
|
|
2017-04-08 20:19:35 -07:00
|
|
|
Expected<ParagraphDataMap> get_single_paragraph(const Files::Filesystem& fs, const fs::path& control_path);
|
|
|
|
Expected<std::vector<ParagraphDataMap>> get_paragraphs(const Files::Filesystem& fs, const fs::path& control_path);
|
2017-04-03 16:26:54 -07:00
|
|
|
Expected<ParagraphDataMap> parse_single_paragraph(const std::string& str);
|
|
|
|
Expected<std::vector<ParagraphDataMap>> parse_paragraphs(const std::string& str);
|
2017-02-27 15:45:56 -08:00
|
|
|
|
2017-04-08 20:19:35 -07:00
|
|
|
Expected<SourceParagraph> try_load_port(const Files::Filesystem& fs, const fs::path& control_path);
|
2017-02-27 15:45:56 -08:00
|
|
|
|
2017-04-03 16:29:11 -07:00
|
|
|
Expected<BinaryParagraph> try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec);
|
2017-02-27 15:45:56 -08:00
|
|
|
|
2017-04-08 20:19:35 -07:00
|
|
|
std::vector<SourceParagraph> load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir);
|
2017-02-27 16:14:36 -08:00
|
|
|
|
2017-04-28 12:38:13 -07:00
|
|
|
std::map<std::string, VersionT> extract_port_names_and_versions(
|
|
|
|
const std::vector<SourceParagraph>& source_paragraphs);
|
2017-01-05 14:25:50 -08:00
|
|
|
}
|