elf.h 843 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright 2013 Dolphin Emulator Project / 2014 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include <string>
  6. #include "common/common_types.h"
  7. #include "core/loader/loader.h"
  8. namespace Loader {
  9. /// Loads an ELF/AXF file
  10. class AppLoader_ELF final : public AppLoader {
  11. public:
  12. explicit AppLoader_ELF(FileSys::VirtualFile file);
  13. /**
  14. * Returns the type of the file
  15. * @param file std::shared_ptr<VfsFile> open file
  16. * @return FileType found, or FileType::Error if this loader doesn't know it
  17. */
  18. static FileType IdentifyType(const FileSys::VirtualFile& file);
  19. FileType GetFileType() const override {
  20. return IdentifyType(file);
  21. }
  22. ResultStatus Load(Kernel::Process& process) override;
  23. };
  24. } // namespace Loader