2009-07-24 22:34:55 +02:00
|
|
|
/****************************************************************************
|
|
|
|
* libwiigui Template
|
|
|
|
* Tantric 2009
|
2009-07-30 07:41:12 +02:00
|
|
|
*
|
2009-07-24 22:34:55 +02:00
|
|
|
* modified by dimok
|
|
|
|
*
|
|
|
|
* filebrowser.h
|
|
|
|
*
|
|
|
|
* Generic file routines - reading, writing, browsing
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _FILEBROWSER_H_
|
|
|
|
#define _FILEBROWSER_H_
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <gccore.h>
|
|
|
|
|
|
|
|
#define MAXJOLIET 255
|
2009-07-30 07:41:12 +02:00
|
|
|
#define MAXDISPLAY MAXPATHLEN
|
|
|
|
|
|
|
|
|
|
|
|
enum {
|
|
|
|
SD,
|
|
|
|
USB
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
char dir[MAXPATHLEN]; // directory path of browserList
|
|
|
|
char rootdir[10]; // directory path of browserList
|
|
|
|
int numEntries; // # of entries in browserList
|
|
|
|
int selIndex; // currently selected index of browserList
|
|
|
|
int pageIndex; // starting index of browserList page display
|
2009-07-24 22:34:55 +02:00
|
|
|
} BROWSERINFO;
|
|
|
|
|
2009-07-30 07:41:12 +02:00
|
|
|
typedef struct {
|
|
|
|
u64 offset; // DVD offset
|
|
|
|
u64 length; // file length in 64 bytes for sizes higher than 4GB
|
|
|
|
char isdir; // 0 - file, 1 - directory
|
|
|
|
char filename[MAXJOLIET + 1]; // full filename
|
|
|
|
char displayname[MAXDISPLAY + 1]; // name for browser display
|
|
|
|
} BROWSERENTRY;
|
2009-07-24 22:34:55 +02:00
|
|
|
|
|
|
|
extern BROWSERINFO browser;
|
|
|
|
extern BROWSERENTRY * browserList;
|
|
|
|
|
|
|
|
int UpdateDirName();
|
|
|
|
int FileSortCallback(const void *f1, const void *f2);
|
2009-07-30 07:41:12 +02:00
|
|
|
void ResetBrowser();
|
2009-07-24 22:34:55 +02:00
|
|
|
int ParseDirectory();
|
|
|
|
int BrowserChangeFolder();
|
|
|
|
int BrowseDevice(int device);
|
2009-07-25 11:39:01 +02:00
|
|
|
int BrowseDevice(char * var, int force =-1);
|
2009-07-24 22:34:55 +02:00
|
|
|
|
|
|
|
#endif
|