#ifndef CCACHE #define CCACHE #include #include #include #include #include "loader/disc.h" //#include "gecko.hpp" using namespace std; const char io[4][5] = { "wb", "rb", "ab", "wb", }; enum CMode { SAVE, LOAD, ADD, REMOVE }; class CCache { public: CCache(dir_discHdr &tmp, string path, u32 index, CMode mode); /* Load/Save One */ CCache(vector &list, string path, CMode mode); /* Load/Save All */ CCache(vector &list, string path, dir_discHdr tmp, CMode mode); /* Add One */ CCache(vector &list, string path, u32 index, CMode mode); /* Remove One */ ~CCache(); private: void SaveAll(vector list); void SaveOne(dir_discHdr tmp, u32 index); void LoadAll(vector &list); void LoadOne(dir_discHdr &tmp, u32 index); void AddOne(vector &list, dir_discHdr tmp); void RemoveOne(vector &list, u32 index); FILE *cache; string filename; }; #endif