2020-02-02 16:14:45 +00:00
|
|
|
#include "AppMode.h"
|
|
|
|
#include "AbstractMenuMode.h"
|
|
|
|
|
2020-02-02 21:13:42 +00:00
|
|
|
#define DIR_ENTRY_NAME_SIZE 16
|
|
|
|
typedef struct {
|
|
|
|
char name[DIR_ENTRY_NAME_SIZE];
|
|
|
|
unsigned long bytes;
|
|
|
|
void* next;
|
|
|
|
} dir_entry_t;
|
|
|
|
|
2020-02-02 16:14:45 +00:00
|
|
|
class SdCardMenuMode : public AbstractMenuMode
|
|
|
|
{
|
|
|
|
public:
|
2020-02-02 21:13:42 +00:00
|
|
|
void start();
|
|
|
|
void finish();
|
2020-02-02 16:14:45 +00:00
|
|
|
|
|
|
|
protected:
|
2020-02-02 21:13:42 +00:00
|
|
|
char* getTitle();
|
|
|
|
char** getOptions();
|
|
|
|
int getOptionsSize();
|
|
|
|
void onOptionSelected(int option);
|
|
|
|
int getOptionsX();
|
|
|
|
int getOptionsFont();
|
2020-02-02 16:14:45 +00:00
|
|
|
|
|
|
|
private:
|
2020-02-02 21:13:42 +00:00
|
|
|
char* basedir = "/sdcard/";
|
|
|
|
char** options;
|
|
|
|
char* optionsNames;
|
|
|
|
unsigned long* optionsBytes;
|
|
|
|
int optionsSize;
|
2020-02-02 16:14:45 +00:00
|
|
|
};
|