ctr_Repair/trunk/CardSaveData/common/savefile/exsave.h

71 lines
1.9 KiB
C++

/*---------------------------------------------------------------------------*
Project: Horizon
File: irp.h
Copyright (C)2009 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 EXSAVE_H_
#define EXSAVE_H_
#include <nn/types.h>
#include <nn/Result.h>
#include "../my_defs.h"
#include "savefile.h"
class ExSave
{
public:
s64 FileSize;
nn::Result LastNnResult;
private:
nn::fs::FileReader reader;
nn::fs::FileWriter writer;
nn::fs::FileReader readerSys;
nn::fs::FileWriter writerSys;
wchar_t *pPathTop;
tArcInfo m_info;
int s_lv;
int exrootlen;
bool IsMounted;
bool s_serch;
public:
ExSave();
~ExSave();
void Finalize();
myResult Create(const void* icon,size_t iconSize,u32 entryDir,u32 entryFile);
myResult CreateSys(const void* icon,size_t iconSize);
myResult Mount();
myResult MountSys();
bool IsExist();
void Unmount();
bool Delete();
void CloseW();
bool OpenW(wchar_t *path,s64 size);
bool OpenSysW();//暫定
void CloseSysW();//暫定
bool OpenSysR();//暫定
void CloseSysR();//暫定
s32 Write(char *buffer,size_t size);
bool WriteSys(tArcInfo *pinfo);
bool ReadSys(tArcInfo *pinfo);
void ResetPath();
s32 Read(char *buffer,size_t size);
void Close();
bool Open(wchar_t *path);
myResult GetPath(wchar_t *path);
bool GetInfo(tArcInfo *pinfo);
};
#endif