aboutsummaryrefslogtreecommitdiff
path: root/src/core/loader/loader.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-10-01 23:35:19 -0400
committerbunnei <bunneidev@gmail.com>2015-10-01 23:35:19 -0400
commit11a64acf236851f88a023bcfa1eecb02991bdccc (patch)
tree814484ca15050312eec965740d5f6d2b6c814a80 /src/core/loader/loader.h
parent1f18d64d1fde22c44ed46287e27450f3c240e79c (diff)
parent0fae76c741b84cfe6d31a9079b818866778dfa31 (diff)
Merge pull request #1095 from archshift/game-list
Initial implementation of a game list
Diffstat (limited to 'src/core/loader/loader.h')
-rw-r--r--src/core/loader/loader.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h
index a37d3348ce..8de95dacf7 100644
--- a/src/core/loader/loader.h
+++ b/src/core/loader/loader.h
@@ -33,6 +33,34 @@ enum class FileType {
THREEDSX, //3DSX
};
+/**
+ * Identifies the type of a bootable file based on the magic value in its header.
+ * @param file open file
+ * @return FileType of file
+ */
+FileType IdentifyFile(FileUtil::IOFile& file);
+
+/**
+ * Identifies the type of a bootable file based on the magic value in its header.
+ * @param file_name path to file
+ * @return FileType of file. Note: this will return FileType::Unknown if it is unable to determine
+ * a filetype, and will never return FileType::Error.
+ */
+FileType IdentifyFile(const std::string& file_name);
+
+/**
+ * Guess the type of a bootable file from its extension
+ * @param extension String extension of bootable file
+ * @return FileType of file. Note: this will return FileType::Unknown if it is unable to determine
+ * a filetype, and will never return FileType::Error.
+ */
+FileType GuessFromExtension(const std::string& extension_);
+
+/**
+ * Convert a FileType into a string which can be displayed to the user.
+ */
+const char* GetFileTypeString(FileType type);
+
/// Return type for functions in Loader namespace
enum class ResultStatus {
Success,