about summary refs log tree commit diff stats
path: root/database.h
diff options
context:
space:
mode:
Diffstat (limited to 'database.h')
-rw-r--r--database.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/database.h b/database.h deleted file mode 100644 index 50f5b55..0000000 --- a/database.h +++ /dev/null
@@ -1,62 +0,0 @@
1#ifndef DATABASE_H_75C3CE0F
2#define DATABASE_H_75C3CE0F
3
4#include <string>
5
6struct sqlite3;
7
8struct achievement {
9 int achievementId;
10 int gameId;
11 std::string title;
12 std::string color;
13};
14
15struct did {
16 int profileId;
17 std::string date;
18};
19
20class database {
21public:
22
23 // Constructor
24
25 explicit database(std::string path);
26
27 // Disable copying
28
29 database(const database& other) = delete;
30 database& operator=(const database& other) = delete;
31
32 // Move constructor and move assignment
33
34 database(database&& other);
35 database& operator=(database&& other);
36
37 // Swap
38
39 friend void swap(database& first, database& second);
40
41 // Destructor
42
43 ~database();
44
45 // Accessors
46
47 achievement getRandomAchievement() const;
48
49 bool doesGameHaveImages(int gameId) const;
50
51 std::string getRandomImageForGame(int gameId) const;
52
53 did getRandomDidForAchievement(int achievementId) const;
54
55private:
56
57 database() = default;
58
59 sqlite3* ppdb_ = nullptr;
60};
61
62#endif /* end of include guard: DATABASE_H_75C3CE0F */