2009-10-01 01:10:58 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* HomebrewFiles Class
|
|
|
|
* for USB Loader GX
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef ___HOMEBREWFILES_H_
|
|
|
|
#define ___HOMEBREWFILES_H_
|
|
|
|
|
|
|
|
#define MAXHOMEBREWS 500
|
|
|
|
|
2010-09-19 01:16:05 +02:00
|
|
|
typedef struct
|
|
|
|
{
|
2010-09-24 02:48:03 +02:00
|
|
|
char FileName[100];
|
|
|
|
char FilePath[150];
|
|
|
|
unsigned int FileSize;
|
2009-10-01 01:10:58 +02:00
|
|
|
} FileInfos;
|
|
|
|
|
2010-09-19 01:16:05 +02:00
|
|
|
class HomebrewFiles
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
//!Constructor
|
|
|
|
//!\param path Path where to check for homebrew files
|
2010-09-24 02:48:03 +02:00
|
|
|
HomebrewFiles(const char * path);
|
2010-09-19 01:16:05 +02:00
|
|
|
//!Destructor
|
|
|
|
~HomebrewFiles();
|
|
|
|
//! Load the dol/elf list of a path
|
|
|
|
//!\param path Path where to check for homebrew files
|
2010-09-24 02:48:03 +02:00
|
|
|
bool LoadPath(const char * path);
|
2010-09-19 01:16:05 +02:00
|
|
|
//! Get the a filename of the list
|
|
|
|
//!\param list index
|
2010-09-24 02:48:03 +02:00
|
|
|
char * GetFilename(int index);
|
2010-09-19 01:16:05 +02:00
|
|
|
//! Get the a filepath of the list
|
|
|
|
//!\param list index
|
2010-09-24 02:48:03 +02:00
|
|
|
char * GetFilepath(int index);
|
2010-09-19 01:16:05 +02:00
|
|
|
//! Get the a filesize of the list
|
|
|
|
//!\param list index
|
2010-09-24 02:48:03 +02:00
|
|
|
unsigned int GetFilesize(int index);
|
2010-09-19 01:16:05 +02:00
|
|
|
//! Get the filecount of the whole list
|
2010-11-14 16:19:42 +01:00
|
|
|
int GetFilecount() { return filecount; };
|
2010-09-19 01:16:05 +02:00
|
|
|
//! Sort list by filepath
|
|
|
|
void SortList();
|
|
|
|
protected:
|
|
|
|
int filecount;
|
|
|
|
FileInfos *FileInfo;
|
2009-10-01 01:10:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|