summaryrefslogtreecommitdiff
path: root/src/core/loader.h
diff options
context:
space:
mode:
authorGravatar bunnei2014-04-08 19:25:03 -0400
committerGravatar bunnei2014-04-08 19:25:03 -0400
commit63e46abdb8764bc97e91bae862c8d461e61b1965 (patch)
treee73f4aa25d7b4015a265e7bbfb6004dab7561027 /src/core/loader.h
parentfixed some license headers that I missed (diff)
downloadyuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.gz
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.tar.xz
yuzu-63e46abdb8764bc97e91bae862c8d461e61b1965.zip
got rid of 'src' folders in each sub-project
Diffstat (limited to 'src/core/loader.h')
-rw-r--r--src/core/loader.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/core/loader.h b/src/core/loader.h
new file mode 100644
index 000000000..46525fcf8
--- /dev/null
+++ b/src/core/loader.h
@@ -0,0 +1,51 @@
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.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
21 FILETYPE_DIRECTORY_CXI,
22
23 FILETYPE_UNKNOWN_BIN,
24 FILETYPE_UNKNOWN_ELF,
25
26 FILETYPE_ARCHIVE_RAR,
27 FILETYPE_ARCHIVE_ZIP,
28
29 FILETYPE_NORMAL_DIRECTORY,
30
31 FILETYPE_UNKNOWN
32};
33
34////////////////////////////////////////////////////////////////////////////////////////////////////
35
36/**
37 * Identifies the type of a bootable file
38 * @param filename String filename of bootable file
39 * @return FileType of file
40 */
41FileType IdentifyFile(std::string &filename);
42
43/**
44 * Identifies and loads a bootable file
45 * @param filename String filename of bootable file
46 * @param error_string Point to string to put error message if an error has occurred
47 * @return True on success, otherwise false
48 */
49bool LoadFile(std::string &filename, std::string *error_string);
50
51} // namespace