Skip to content
Snippets Groups Projects
Commit 9a35d1fb authored by Emmanuel Gil Peyrot's avatar Emmanuel Gil Peyrot
Browse files

Loader: Add a GetFileType method to get the type of a loaded file

parent 8fc9c031
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,14 @@ public: ...@@ -27,6 +27,14 @@ public:
*/ */
static FileType IdentifyType(FileUtil::IOFile& file); static FileType IdentifyType(FileUtil::IOFile& file);
/**
* Returns the type of this file
* @return FileType corresponding to the loaded file
*/
FileType GetFileType() override {
return IdentifyType(file);
}
/** /**
* Load the bootable file * Load the bootable file
* @return ResultStatus result of function * @return ResultStatus result of function
......
...@@ -27,6 +27,14 @@ public: ...@@ -27,6 +27,14 @@ public:
*/ */
static FileType IdentifyType(FileUtil::IOFile& file); static FileType IdentifyType(FileUtil::IOFile& file);
/**
* Returns the type of this file
* @return FileType corresponding to the loaded file
*/
FileType GetFileType() override {
return IdentifyType(file);
}
/** /**
* Load the bootable file * Load the bootable file
* @return ResultStatus result of function * @return ResultStatus result of function
......
...@@ -131,6 +131,12 @@ public: ...@@ -131,6 +131,12 @@ public:
AppLoader(FileUtil::IOFile&& file) : file(std::move(file)) { } AppLoader(FileUtil::IOFile&& file) : file(std::move(file)) { }
virtual ~AppLoader() { } virtual ~AppLoader() { }
/**
* Returns the type of this file
* @return FileType corresponding to the loaded file
*/
virtual FileType GetFileType() = 0;
/** /**
* Load the application * Load the application
* @return ResultStatus result of function * @return ResultStatus result of function
......
...@@ -173,6 +173,14 @@ public: ...@@ -173,6 +173,14 @@ public:
*/ */
static FileType IdentifyType(FileUtil::IOFile& file); static FileType IdentifyType(FileUtil::IOFile& file);
/**
* Returns the type of this file
* @return FileType corresponding to the loaded file
*/
FileType GetFileType() override {
return IdentifyType(file);
}
/** /**
* Load the application * Load the application
* @return ResultStatus result of function * @return ResultStatus result of function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment