2010-12-12 17:31:13 +01:00
|
|
|
#ifndef _NEWTITLES_H
|
|
|
|
#define _NEWTITLES_H
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
class NewTitles
|
|
|
|
{
|
|
|
|
public:
|
2011-01-13 20:05:31 +01:00
|
|
|
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
|
|
|
|
|
|
|
void Save();
|
2011-01-13 20:05:31 +01:00
|
|
|
void CheckGame(const u8 *titleid);
|
|
|
|
bool IsNew(const u8 *titleid) const;
|
|
|
|
void Remove(const u8 *titleid);
|
2010-12-12 17:31:13 +01:00
|
|
|
private:
|
|
|
|
NewTitles();
|
|
|
|
~NewTitles();
|
|
|
|
|
|
|
|
static NewTitles *instance;
|
|
|
|
|
|
|
|
class Title
|
|
|
|
{
|
|
|
|
public:
|
2011-01-13 20:05:31 +01:00
|
|
|
char titleId[7];
|
2010-12-12 17:31:13 +01:00
|
|
|
time_t timestamp;
|
2011-01-13 20:05:31 +01:00
|
|
|
Title *next;
|
|
|
|
bool isNew;
|
2010-12-12 17:31:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
Title *firstTitle;
|
|
|
|
Title *lastTitle;
|
|
|
|
bool isDirty;
|
|
|
|
bool isNewFile;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif //_NEWTITLES_H
|