loader.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2
  3. // Refer to the license.txt file included.
  4. #pragma once
  5. #include "common.h"
  6. ////////////////////////////////////////////////////////////////////////////////////////////////////
  7. namespace Loader {
  8. enum FileType {
  9. FILETYPE_ERROR,
  10. FILETYPE_CTR_CCI,
  11. FILETYPE_CTR_CIA,
  12. FILETYPE_CTR_CXI,
  13. FILETYPE_CTR_ELF,
  14. FILETYPE_DIRECTORY_CXI,
  15. FILETYPE_UNKNOWN_BIN,
  16. FILETYPE_UNKNOWN_ELF,
  17. FILETYPE_ARCHIVE_RAR,
  18. FILETYPE_ARCHIVE_ZIP,
  19. FILETYPE_NORMAL_DIRECTORY,
  20. FILETYPE_UNKNOWN
  21. };
  22. ////////////////////////////////////////////////////////////////////////////////////////////////////
  23. /**
  24. * Identifies the type of a bootable file
  25. * @param filename String filename of bootable file
  26. * @return FileType of file
  27. */
  28. FileType IdentifyFile(std::string &filename);
  29. /**
  30. * Identifies and loads a bootable file
  31. * @param filename String filename of bootable file
  32. * @param error_string Point to string to put error message if an error has occurred
  33. * @return True on success, otherwise false
  34. */
  35. bool LoadFile(std::string &filename, std::string *error_string);
  36. } // namespace