2014-12-17 11:08:14 +05:30
|
|
|
// Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project
|
|
|
|
// Licensed under GPLv2 or any later version
|
2014-03-25 20:17:12 +05:30
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2014-06-17 15:53:46 +05:30
|
|
|
#include "common/common_types.h"
|
2014-06-19 04:28:09 +05:30
|
|
|
#include "core/loader/loader.h"
|
2014-06-17 08:35:10 +05:30
|
|
|
|
2014-06-19 04:28:09 +05:30
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Loader namespace
|
2014-06-17 08:35:10 +05:30
|
|
|
|
2014-06-19 04:28:09 +05:30
|
|
|
namespace Loader {
|
2014-06-17 08:35:10 +05:30
|
|
|
|
2014-06-19 04:28:09 +05:30
|
|
|
/// Loads an ELF/AXF file
|
2014-07-04 22:50:40 +05:30
|
|
|
class AppLoader_ELF final : public AppLoader {
|
2014-06-17 08:35:10 +05:30
|
|
|
public:
|
2015-01-07 03:00:40 +05:30
|
|
|
AppLoader_ELF(std::unique_ptr<FileUtil::IOFile>&& file) : AppLoader(std::move(file)) { }
|
2014-06-17 08:35:10 +05:30
|
|
|
|
2015-01-07 04:40:13 +05:30
|
|
|
/**
|
|
|
|
* Returns the type of the file
|
|
|
|
* @param file FileUtil::IOFile open file
|
|
|
|
* @return FileType found, or FileType::Error if this loader doesn't know it
|
|
|
|
*/
|
|
|
|
static FileType IdentifyType(FileUtil::IOFile& file);
|
|
|
|
|
2014-06-19 04:28:09 +05:30
|
|
|
/**
|
|
|
|
* Load the bootable file
|
|
|
|
* @return ResultStatus result of function
|
|
|
|
*/
|
2014-07-04 22:55:30 +05:30
|
|
|
ResultStatus Load() override;
|
2014-03-25 20:17:12 +05:30
|
|
|
};
|
2014-06-17 08:48:10 +05:30
|
|
|
|
|
|
|
} // namespace Loader
|