2010-02-15 00:22:52 +01:00
|
|
|
#ifndef _H
|
|
|
|
#define _H
|
|
|
|
|
2010-10-01 20:53:38 +02:00
|
|
|
#include "libs/libwbfs/libwbfs.h"
|
2010-02-15 00:22:52 +01:00
|
|
|
#include "usbloader/utils.h"
|
|
|
|
#include "usbloader/frag.h"
|
|
|
|
|
|
|
|
class Wbfs
|
|
|
|
{
|
2010-09-19 01:16:05 +02:00
|
|
|
public:
|
2010-09-24 02:48:03 +02:00
|
|
|
Wbfs(u32, u32, u32);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
2010-09-24 02:48:03 +02:00
|
|
|
void GetProgressValue(s32 * d, s32 * m);
|
|
|
|
static s32 Init(u32);
|
2010-09-19 01:16:05 +02:00
|
|
|
void Close();
|
2010-09-24 02:48:03 +02:00
|
|
|
s32 CheckGame(u8 *);
|
|
|
|
s32 GameSize(u8 *, f32 *);
|
|
|
|
wbfs_t *GetHddInfo(void);
|
2010-09-19 01:16:05 +02:00
|
|
|
bool Mounted();
|
2010-09-24 02:48:03 +02:00
|
|
|
virtual int GetFragList(u8 *id);
|
|
|
|
virtual int GetFragList(char *filename, _frag_append_t append_fragment, FragList *);
|
|
|
|
virtual bool ShowFreeSpace(void);
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
virtual s32 Open() = 0;
|
2010-09-24 02:48:03 +02:00
|
|
|
virtual wbfs_disc_t* OpenDisc(u8 *discid) = 0;
|
|
|
|
virtual void CloseDisc(wbfs_disc_t *disc) = 0;
|
2010-09-19 01:16:05 +02:00
|
|
|
virtual s32 Format();
|
2010-09-24 02:48:03 +02:00
|
|
|
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 f32 EstimateGameSize(void) = 0;
|
2010-09-19 01:16:05 +02:00
|
|
|
|
|
|
|
/*
|
2010-09-24 02:48:03 +02:00
|
|
|
static s32 OpenPart(u32 part_fat, u32 part_idx, u32 part_lba, u32 part_size, char *partition);
|
|
|
|
static s32 OpenNamed(char *partition);
|
|
|
|
static s32 OpenLBA(u32 lba, u32 size);
|
|
|
|
*/
|
2010-09-19 01:16:05 +02:00
|
|
|
protected:
|
|
|
|
static u32 nb_sectors;
|
|
|
|
|
|
|
|
/* WBFS HDD */
|
|
|
|
wbfs_t *hdd;
|
|
|
|
|
|
|
|
u32 device, lba, size;
|
|
|
|
private:
|
|
|
|
|
|
|
|
static s32 total, done;
|
2010-02-15 00:22:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //_H
|