/*---------------------------------------------------------------------------* Project: Horizon File: SaveDataMover.h Copyright (C)2011 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 SAVEDATAMOVER_H_ #define SAVEDATAMOVER_H_ #include namespace common { class SaveDataMover { public: SaveDataMover(); virtual ~SaveDataMover(); //! @brief SDカードへの出力を開始します void StartExport(void* buf, size_t bufSize, u64* progress); //! @brief SDカードからの入力を開始します void StartImport(void* buf, size_t bufSize, u64* progress); //! @brief 処理の結果を取得します nn::Result GetLastResult(); private: //! @brief 出力を準備します void SetupExport(); //! @brief 出力するファイルサイズを計算します void CalculateFileSize(); void CalculateSystemSaveDataSize(); void CalculateSharedExtSaveDataSize(); //! @brief システムセーブデータを出力します void ExportSystemSaveData(void* buf, size_t bufSize, u64* progress); //! @brief 共有拡張セーブデータを出力します void ExportSharedExtSaveData(void* buf, size_t bufSize, u64* progress); //! @breif 共有拡張セーブデータを出力します nn::Result Export(void* buf, size_t bufSize, bit32 id, u64* progress); nn::Result CopyFile(nn::fs::FileInputStream& is, nn::fs::FileOutputStream& os, void* pBuffer, const s32 bufferSize, u64* progress); nn::Result CopyRecursivly(void* buf, size_t bufSize, const char* src, const char* dest, u64* progress); NN_PADDING4; s64 m_Progress; s64 m_FinishedSize; s64 m_TotalSize; nn::Result m_Result; }; } /* namespace common */ #endif /* SAVEDATAMOVER_H_ */