// SPDX-License-Identifier: MPL-2.0 // Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/) #pragma once #include #include #include #include #include "loader.h" namespace skyline::loader { /** * @brief The NspLoader class consolidates all the data in an NSP providing a simple way to load an application and access its metadata * @url https://switchbrew.org/wiki/NCA_Format#PFS0 */ class NspLoader : public Loader { private: std::shared_ptr nsp; //!< A shared pointer to the NSP's PFS0 std::shared_ptr controlRomFs; //!< A shared pointer to the control NCA's RomFS std::optional programNca; //!< The main program NCA within the NSP std::optional controlNca; //!< The main control NCA within the NSP public: NspLoader(const std::shared_ptr &backing, const std::shared_ptr &keyStore); std::vector GetIcon(language::ApplicationLanguage language) override; void *LoadProcessData(const std::shared_ptr &process, const DeviceState &state) override; }; }