Have GroovePlayer init music db on creation. Make fields correctly be fk.
This commit is contained in:
@@ -20,17 +20,22 @@
|
||||
#ifndef GROOVEPLAYER_H
|
||||
#define GROOVEPLAYER_H
|
||||
|
||||
#include <Wt/Dbo/Session>
|
||||
#include <Wt/Dbo/backend/Sqlite3>
|
||||
|
||||
class GroovePlayer
|
||||
{
|
||||
public:
|
||||
static GroovePlayer* getInstance() {
|
||||
static GroovePlayer instance;
|
||||
static GroovePlayer instance("music.db");
|
||||
return &instance;
|
||||
};
|
||||
GroovePlayer(GroovePlayer const&) = delete;
|
||||
void operator=(GroovePlayer const&) = delete;
|
||||
private:
|
||||
GroovePlayer();
|
||||
GroovePlayer(std::string dbFile);
|
||||
Wt::Dbo::backend::Sqlite3 sqliteConnection;
|
||||
Wt::Dbo::Session sqlSession;
|
||||
};
|
||||
|
||||
#endif // GROOVEPLAYER_H
|
||||
|
||||
Reference in New Issue
Block a user