diff options
Diffstat (limited to 'src/core/loader.h')
| -rw-r--r-- | src/core/loader.h | 51 |
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 | |||
| 11 | namespace Loader { | ||
| 12 | |||
| 13 | enum 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 | */ | ||
| 41 | FileType 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 | */ | ||
| 49 | bool LoadFile(std::string &filename, std::string *error_string); | ||
| 50 | |||
| 51 | } // namespace | ||