blob: 83a32b2af133df0c17c0eafb8a4dc2cb6fd783f8 (
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
|
#pragma once
#include "BinaryParagraph.h"
#include "VcpkgPaths.h"
#include "VersionT.h"
#include "filesystem_fs.h"
#include "vcpkg_expected.h"
#include <map>
namespace vcpkg::Paragraphs
{
using ParagraphDataMap = std::unordered_map<std::string, std::string>;
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);
Expected<ParagraphDataMap> parse_single_paragraph(const std::string& str);
Expected<std::vector<ParagraphDataMap>> parse_paragraphs(const std::string& str);
ExpectedT<SourceControlFile, ParseControlErrorInfo> try_load_port(const Files::Filesystem& fs,
const fs::path& control_path);
Expected<BinaryParagraph> try_load_cached_package(const VcpkgPaths& paths, const PackageSpec& spec);
struct LoadResults
{
std::vector<SourceControlFile> paragraphs;
std::vector<ParseControlErrorInfo> errors;
};
LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir);
std::vector<SourceControlFile> load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir);
std::map<std::string, VersionT> extract_port_names_and_versions(
const std::vector<SourceParagraph>& source_paragraphs);
}
|