80bffc0fdd
Add Database class with SQLite fetch/fetchAlbum methods. Refactor PlaybackEngine (data callback, seek, getPosition, decoder lifecycle) and Player API (PlaybackEngine member, queue handling, PlayerLocal). Update Metadata::Track fields to include artist/title/album/trackNr/length.
20 lines
393 B
C++
20 lines
393 B
C++
#pragma once
|
|
|
|
#include "Metadata.h"
|
|
|
|
#include <sqlite3.h>
|
|
|
|
using queue = std::vector<Track>;
|
|
|
|
class Database {
|
|
public:
|
|
Database( const char* filename, sqlite3** db );
|
|
~Database();
|
|
void fetch( const std::string& query );
|
|
void fetchAlbum( const std::string& album );
|
|
void addSong( );
|
|
private:
|
|
sqlite3* db_;
|
|
sqlite3_stmt* stmnt;
|
|
};
|