2012-01-21 21:57:41 +01:00
|
|
|
#ifndef CCACHE
|
|
|
|
#define CCACHE
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <ogcsys.h>
|
|
|
|
#include <fstream>
|
2012-05-06 14:03:43 +02:00
|
|
|
#include <vector>
|
2012-08-05 15:48:15 +02:00
|
|
|
#include "loader/disc.h"
|
2012-01-21 21:57:41 +01:00
|
|
|
|
2012-12-08 17:17:35 +01:00
|
|
|
//#include "gecko.hpp"
|
2012-01-21 21:57:41 +01:00
|
|
|
using namespace std;
|
|
|
|
|
2018-07-15 22:23:32 +02:00
|
|
|
const char io[2][3] = {
|
2012-01-21 21:57:41 +01:00
|
|
|
"wb",
|
|
|
|
"rb",
|
|
|
|
};
|
|
|
|
|
|
|
|
enum CMode
|
|
|
|
{
|
|
|
|
SAVE,
|
|
|
|
LOAD,
|
|
|
|
};
|
|
|
|
|
|
|
|
class CCache
|
|
|
|
{
|
|
|
|
public:
|
2018-07-15 22:23:32 +02:00
|
|
|
CCache(vector<dir_discHdr> &list, string path, CMode mode);
|
2012-01-21 21:57:41 +01:00
|
|
|
~CCache();
|
|
|
|
private:
|
2012-08-16 16:09:02 +02:00
|
|
|
void SaveAll(vector<dir_discHdr> list);
|
|
|
|
void LoadAll(vector<dir_discHdr> &list);
|
2012-01-21 21:57:41 +01:00
|
|
|
|
|
|
|
FILE *cache;
|
|
|
|
string filename;
|
|
|
|
};
|
|
|
|
#endif
|