/*---------------------------------------------------------------------------* Project: Horizon File: PreorderTitleRestorer.h Copyright (C)2015 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev$ *---------------------------------------------------------------------------*/ #ifndef SOURCES_CONSOLERESTORE_PREORDERTITLERESTORER_H_ #define SOURCES_CONSOLERESTORE_PREORDERTITLERESTORER_H_ #include #include #include #include #include #include #include namespace ConsoleRestore { class PreorderTitleRestorer { public: PreorderTitleRestorer(); virtual ~PreorderTitleRestorer(); //! @brief 予約販売タイトルの修復を行います //! @param[in] list[] Personalized eTicketで権利を持っているタイトルの配列 //! @param[in] size listのサイズ //! @param[in] country 国コード。国コードが取得できない場合はCFG_COUNTRY_UNDEFINEDを渡してください //! @param[in] region リージョンコード nn::Result Execute(nn::ProgramId list[], size_t size, nn::cfg::CTR::CfgCountryCode country, nn::cfg::CTR::CfgRegionCode region); // @brief 進捗状況を取得します // @return 0-100の進捗 u64 GetProgress(); private: nn::Result GetExternalSeedInfo( nn::cfg::CTR::CfgCountryCode* deliveredCountry, std::string& xml, nn::ProgramId programId, nn::cfg::CTR::CfgCountryCode country, nn::cfg::CTR::CfgRegionCode region); nn::Result GetNsUid(std::string& nsUid, nn::ProgramId programId); nn::Result GetEcInfo(std::string& ecInfo, std::string nsUid, nn::cfg::CfgCountryCode country); nn::Result SetExternalSeedOrPlayableDate(nn::ProgramId programId, nn::cfg::CTR::CfgCountryCode country, std::string& xml); nn::Result GetEcInfoAndCountryRepeatedly(std::string& ecInfo, nn::cfg::CfgCountryCode* deliveredCountry, std::string nsUid, nn::cfg::CTR::CfgRegionCode region); bool IsLocked(std::string xml); bool HasExternal_Seed(std::string xml); nn::Result SetExternalKey(nn::ProgramId programId, nn::cfg::CTR::CfgCountryCode country); void SetTitleTag(nn::ProgramId programId, nn::cfg::CTR::CfgCountryCode country, std::string xml); bool IsValidCountry(nn::cfg::CfgCountryCode countryCode, nn::cfg::CfgRegionCode region); std::map m_SuccessfulCountryMap; u64 m_Progress; }; } /* namespace ConsoleRestore */ #endif /* SOURCES_CONSOLERESTORE_PREORDERTITLERESTORER_H_ */