2019-06-05 00:21:17 -04:00
|
|
|
// Copyright 2019 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "core/loader/loader.h"
|
|
|
|
|
2020-09-16 08:19:25 -04:00
|
|
|
namespace Core {
|
|
|
|
class System;
|
|
|
|
}
|
|
|
|
|
2019-06-05 00:21:17 -04:00
|
|
|
namespace FileSys {
|
|
|
|
class KIP;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace Loader {
|
|
|
|
|
|
|
|
class AppLoader_KIP final : public AppLoader {
|
|
|
|
public:
|
|
|
|
explicit AppLoader_KIP(FileSys::VirtualFile file);
|
|
|
|
~AppLoader_KIP() override;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the type of the file
|
2020-12-10 01:31:58 -05:00
|
|
|
* @param file open file
|
2019-06-05 00:21:17 -04:00
|
|
|
* @return FileType found, or FileType::Error if this loader doesn't know it
|
|
|
|
*/
|
|
|
|
static FileType IdentifyType(const FileSys::VirtualFile& file);
|
|
|
|
|
|
|
|
FileType GetFileType() const override;
|
|
|
|
|
2020-09-16 08:19:25 -04:00
|
|
|
LoadResult Load(Kernel::Process& process, Core::System& system) override;
|
2019-06-05 00:21:17 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::unique_ptr<FileSys::KIP> kip;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Loader
|