summaryrefslogtreecommitdiff
path: root/src/core/loader/loader.h
diff options
context:
space:
mode:
authorGravatar bunnei2014-06-16 18:03:13 -0400
committerGravatar bunnei2014-06-16 18:03:13 -0400
commit0aca202ae936d3fccbab34f36d9246e0598849a5 (patch)
treefff4a16ed505ebddcc3048cf734db0237839d338 /src/core/loader/loader.h
parentLoader: Added stubbed detection of CXI and CCI files. (diff)
downloadyuzu-0aca202ae936d3fccbab34f36d9246e0598849a5.tar.gz
yuzu-0aca202ae936d3fccbab34f36d9246e0598849a5.tar.xz
yuzu-0aca202ae936d3fccbab34f36d9246e0598849a5.zip
Loader: Moved elf and loader modules to a "loader" subdirectory.
Diffstat (limited to 'src/core/loader/loader.h')
-rw-r--r--src/core/loader/loader.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
new file mode 100644
index 000000000..9d4aaa874
--- /dev/null
+++ b/src/core/loader/loader.h
@@ -0,0 +1,54 @@
1// Copyright 2014 Citra Emulator Project
2// Licensed under GPLv2
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "common/common.h"
8
9////////////////////////////////////////////////////////////////////////////////////////////////////
10
11namespace Loader {
12
13enum FileType {
14 FILETYPE_ERROR,
15
16 FILETYPE_CTR_CCI,
17 FILETYPE_CTR_CIA,
18 FILETYPE_CTR_CXI,
19 FILETYPE_CTR_ELF,
20 FILETYPE_CTR_BIN,
21
22 FILETYPE_LAUNCHER_DAT,
23
24 FILETYPE_DIRECTORY_CXI,
25
26 FILETYPE_UNKNOWN_BIN,
27 FILETYPE_UNKNOWN_ELF,
28
29 FILETYPE_ARCHIVE_RAR,
30 FILETYPE_ARCHIVE_ZIP,
31
32 FILETYPE_NORMAL_DIRECTORY,
33
34 FILETYPE_UNKNOWN
35};
36
37////////////////////////////////////////////////////////////////////////////////////////////////////
38
39/**
40 * Identifies the type of a bootable file
41 * @param filename String filename of bootable file
42 * @return FileType of file
43 */
44FileType IdentifyFile(std::string &filename);
45
46/**
47 * Identifies and loads a bootable file
48 * @param filename String filename of bootable file
49 * @param error_string Point to string to put error message if an error has occurred
50 * @return True on success, otherwise false
51 */
52bool LoadFile(std::string &filename, std::string *error_string);
53
54} // namespace