Debian Codegraph @

Source/Core/DiscIO/DiscExtractor.h

raw symbols SCIP
1 // Copyright 2017 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <functional>
7 #include <string>
8 #include <string_view>
9
10 #include "Common/CommonTypes.h"
11
12 namespace DiscIO
13 {
14 class FileInfo;
15 struct Partition;
16 class Volume;
17
18 u64 ReadFile(const Volume& volume, const Partition& partition, const FileInfo* file_info,
19 u8* buffer, u64 max_buffer_size, u64 offset_in_file = 0);
20 u64 ReadFile(const Volume& volume, const Partition& partition, std::string_view path, u8* buffer,
21 u64 max_buffer_size, u64 offset_in_file = 0);
22 bool ExportData(const Volume& volume, const Partition& partition, u64 offset, u64 size,
23 const std::string& export_filename);
24 bool ExportFile(const Volume& volume, const Partition& partition, const FileInfo* file_info,
25 const std::string& export_filename);
26 bool ExportFile(const Volume& volume, const Partition& partition, std::string_view path,
27 const std::string& export_filename);
28
29 // update_progress is called once for each child (file or directory).
30 // If update_progress returns true, the extraction gets cancelled.
31 // filesystem_path is supposed to be the path corresponding to the directory argument.
32 void ExportDirectory(const Volume& volume, const Partition& partition, const FileInfo& directory,
33 bool recursive, const std::string& filesystem_path,
34 const std::string& export_folder,
35 const std::function<bool(const std::string& path)>& update_progress);
36
37 // To export everything listed below, you can use ExportSystemData
38
39 bool ExportWiiUnencryptedHeader(const Volume& volume, const std::string& export_filename);
40 bool ExportWiiRegionData(const Volume& volume, const std::string& export_filename);
41
42 bool ExportTicket(const Volume& volume, const Partition& partition,
43 const std::string& export_filename);
44 bool ExportTMD(const Volume& volume, const Partition& partition,
45 const std::string& export_filename);
46 bool ExportCertificateChain(const Volume& volume, const Partition& partition,
47 const std::string& export_filename);
48 bool ExportH3Hashes(const Volume& volume, const Partition& partition,
49 const std::string& export_filename);
50
51 bool ExportHeader(const Volume& volume, const Partition& partition,
52 const std::string& export_filename);
53 bool ExportBI2Data(const Volume& volume, const Partition& partition,
54 const std::string& export_filename);
55 bool ExportApploader(const Volume& volume, const Partition& partition,
56 const std::string& export_filename);
57 bool ExportDOL(const Volume& volume, const Partition& partition,
58 const std::string& export_filename);
59 bool ExportFST(const Volume& volume, const Partition& partition,
60 const std::string& export_filename);
61
62 bool ExportSystemData(const Volume& volume, const Partition& partition,
63 const std::string& export_folder);
64
65 } // namespace DiscIO