ctr_Repair/trunk/ConsoleDataMigration/sources/common/SaveDataMover.h
N2614 2d011dee6f CARDBOARD用APIでシステムセーブデータを出力するように
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@474 385bec56-5757-e545-9c3a-d8741f4650f1
2011-11-02 06:00:40 +00:00

62 lines
1.8 KiB
C++

/*---------------------------------------------------------------------------*
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 <nn.h>
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();
//! @brief システムセーブデータを出力します
void ExportSystemSaveData(void* buf, size_t bufSize, u64* progress);
nn::Result CopyFile(nn::fs::FileInputStream& is, nn::fs::FileOutputStream& os, void* pBuffer, const s32 bufferSize,
u64* progress);
NN_PADDING4;
u64 m_Progress;
u64 m_FinishedSize;
u64 m_TotalSize;
nn::Result m_Result;
};
} /* namespace common */
#endif /* SAVEDATAMOVER_H_ */