22 enum ProfileLoadResult LoadDBFromDir(
const std::string& dir);
23 ProfileLoadResult LoadDBFromDir(
const std::string& dir,
Profile* profile);
25 ProfileLoadResult SaveDBToDir(
const std::string& sDir,
27 DBProfileMode mode)
const;
29 static void MoveBackupToDir(
const std::string& sFromDir,
30 const std::string& sToDir,
33 void SetLoadingProfile(
Profile* p) { loadingProfile = p; }
35 static auto WriteReplayData(
const HighScore* hs) -> bool;
38 Profile* loadingProfile{
nullptr };
39 static auto GetChartKeyID(SQLite::Database* db,
const std::string& key) -> int;
40 static auto GetChartKeyByID(SQLite::Database* db,
int id) -> std::string;
41 static auto FindOrCreateChartKey(SQLite::Database* db,
const std::string& key)
43 static auto FindOrCreateSong(SQLite::Database* db,
44 const std::string& pack,
45 const std::string& song) -> int;
46 static auto FindOrCreateChart(SQLite::Database* db,
47 const std::string& chartkey,
48 const std::string& pack,
49 const std::string& song,
50 Difficulty diff) -> int;
51 static auto GetScoreKeyID(SQLite::Database* db,
const std::string& key) -> int;
52 static auto FindOrCreateScoreKey(SQLite::Database* db,
const std::string& key)
55 void LoadFavourites(SQLite::Database* db);
56 void LoadPlayLists(SQLite::Database* db);
57 static void LoadPlayerScores(SQLite::Database* db);
58 auto LoadGeneralData(SQLite::Database* db) -> bool;
59 void LoadPermaMirrors(SQLite::Database* db);
60 void LoadScoreGoals(SQLite::Database* db);
62 static void SaveFavourites(SQLite::Database* db,
const Profile* profile);
63 static void SavePlayLists(SQLite::Database* db,
const Profile* profile);
64 static void SavePlayerScores(SQLite::Database* db,
67 static void SaveGeneralData(SQLite::Database* db,
const Profile* profile);
68 static void SavePermaMirrors(SQLite::Database* db,
const Profile* profile);
69 static void SaveScoreGoals(SQLite::Database* db,
const Profile* profile);