2010-12-12 17:31:13 +01:00
|
|
|
#ifndef _NEWTITLES_H
|
|
|
|
#define _NEWTITLES_H
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
class NewTitles
|
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
public:
|
|
|
|
static NewTitles *Instance() { if(!instance) instance = new NewTitles(); return instance; }
|
|
|
|
static void DestroyInstance() { delete instance; instance = NULL; }
|
2010-12-12 17:31:13 +01:00
|
|
|
|
2012-05-09 21:27:54 +02:00
|
|
|
void Save(void);
|
|
|
|
void Clean(void);
|
|
|
|
void Reload(void);
|
2011-07-26 00:28:22 +02:00
|
|
|
void CheckGame(const u8 *titleid);
|
|
|
|
bool IsNew(const u8 *titleid) const;
|
|
|
|
void Remove(const u8 *titleid);
|
|
|
|
private:
|
|
|
|
NewTitles();
|
|
|
|
~NewTitles();
|
2010-12-12 17:31:13 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
static NewTitles *instance;
|
2010-12-12 17:31:13 +01:00
|
|
|
|
2012-05-09 21:27:54 +02:00
|
|
|
struct Title
|
2011-07-26 00:28:22 +02:00
|
|
|
{
|
2012-05-09 21:27:54 +02:00
|
|
|
char titleId[7];
|
|
|
|
time_t timestamp;
|
|
|
|
Title *next;
|
|
|
|
bool isNew;
|
2011-07-26 00:28:22 +02:00
|
|
|
};
|
2010-12-12 17:31:13 +01:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
Title *firstTitle;
|
|
|
|
Title *lastTitle;
|
|
|
|
bool isDirty;
|
|
|
|
bool isNewFile;
|
2010-12-12 17:31:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //_NEWTITLES_H
|