usbloadergx/source/usbloader/wbfs/wbfs_base.h
dimok321 6f63f9cf05 *Prepare source code for devkitPPC r23 - replaced removed directory functions
*Added additional sort mode - "Sort by number of players"
*Added support for multiple game partitions.

Note: You can activate multiple game partitions support in the Loader Settings. When it is active, all games from all partitions will be listed in the game list. Partitions can be mixed up as you wish wbfs/fat/ntfs/ext. When the multiple partitions feature is activated than the partition in "Game/Install Partition" setting is taken for new game installation. Also the free space amount will be shown from that game installation partition. This will be clickable in the future listing all partitions with their sizes.
2011-02-02 18:30:15 +00:00

45 lines
1.3 KiB
C++

#ifndef _H
#define _H
#include "libs/libwbfs/libwbfs.h"
#include "usbloader/utils.h"
#include "usbloader/frag.h"
#define CACHE_SIZE 32
#define CACHED_SECTORS 64
class Wbfs
{
public:
Wbfs(u32, u32, u32);
static s32 Init(u32);
s32 CheckGame(u8 *);
s32 GameSize(u8 *, f32 *);
bool IsMounted() { return hdd == 0; };
virtual int GetFragList(u8 *id) { return 0; };
virtual bool ShowFreeSpace(void);
virtual s32 Open() = 0;
virtual void Close() = 0;
virtual wbfs_disc_t* OpenDisc(u8 *discid) = 0;
virtual void CloseDisc(wbfs_disc_t *disc) = 0;
virtual s32 Format();
virtual s32 GetCount(u32 *) = 0;
virtual s32 GetHeaders(struct discHdr *, u32, u32) = 0;
virtual s32 AddGame(void) = 0;
virtual s32 RemoveGame(u8 *) = 0;
virtual s32 DiskSpace(f32 *, f32 *) = 0;
virtual s32 RenameGame(u8 *, const void *) = 0;
virtual s32 ReIDGame(u8 *discid, const void *newID) = 0;
virtual u64 EstimateGameSize(void) = 0;
virtual const u8 GetFSType(void) const = 0;
const wbfs_t *GetHDDHandle(void) const { return hdd; }
protected:
wbfs_t *hdd;
u32 device, lba, size;
u8 wbfs_part_fs;
};
#endif //_H